diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 0b3ba9e063f3..a64306a38d1d 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -23,9 +23,14 @@ #define COMPONENT_GLOB_BLOCK_CINEMATIC (1<<0) /// ingame button pressed (/obj/machinery/button/button) #define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed" + +/// job subsystem has spawned and equipped a new mob +#define COMSIG_GLOB_JOB_AFTER_SPAWN "!job_after_spawn" + /// cable was placed or joined somewhere : (turf) #define COMSIG_GLOB_CABLE_UPDATED "!cable_updated" + /// signals from globally accessible objects ///from SSsun when the sun changes position : (azimuth) @@ -488,6 +493,10 @@ #define COMSIG_LIVING_CAN_TRACK "mob_cantrack" #define COMPONENT_CANT_TRACK (1<<0) +///from base of mob/living/Write_Memory() +#define COMSIG_LIVING_WRITE_MEMORY "living_write_memory" + #define COMPONENT_DONT_WRITE_MEMORY (1<<0) + // /mob/living/carbon signals ///from base of mob/living/carbon/soundbang_act(): (list(intensity)) @@ -649,6 +658,7 @@ #define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" // /obj/item/implant signals + ///from base of /obj/item/bio_chip/proc/activate(): () #define COMSIG_IMPLANT_ACTIVATED "implant_activated" ///from base of /obj/item/bio_chip/proc/implant(): (list/args) @@ -663,6 +673,12 @@ #define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //This uses all return values of COMSIG_IMPLANT_OTHER +/// called on implants, after a successful implantation: (mob/living/target, mob/user, silent, force) +#define COMSIG_IMPLANT_IMPLANTED "implant_implanted" + +/// called on implants, after an implant has been removed: (mob/living/source, silent, special) +#define COMSIG_IMPLANT_REMOVED "implant_removed" + // /obj/item/pda signals ///called on pda when the user changes the ringtone: (mob/living/user, new_ringtone) @@ -965,6 +981,9 @@ /// Called when the MODsuit wearer is unset. #define COMSIG_MOD_WEARER_UNSET "mod_wearer_unset" +/// Called when the round has started, but before GAME_STATE_PLAYING. +#define COMSIG_TICKER_ROUND_STARTING "comsig_ticker_round_starting" + /// from /obj/structure/cursed_slot_machine/handle_status_effect() when someone pulls the handle on the slot machine #define COMSIG_CURSED_SLOT_MACHINE_USE "cursed_slot_machine_use" #define SLOT_MACHINE_USE_CANCEL (1<<0) //! we've used up the number of times we may use this slot machine. womp womp. diff --git a/code/__DEFINES/station_defines.dm b/code/__DEFINES/station_defines.dm new file mode 100644 index 000000000000..3cb026e4f767 --- /dev/null +++ b/code/__DEFINES/station_defines.dm @@ -0,0 +1,16 @@ +#define STATION_TRAIT_POSITIVE 1 +#define STATION_TRAIT_NEUTRAL 2 +#define STATION_TRAIT_NEGATIVE 3 + +/// For traits that shouldn't be selected, like abstract types (wow) +#define STATION_TRAIT_ABSTRACT (1<<0) +/// Only run on planet stations +#define STATION_TRAIT_PLANETARY (1<<1) +/// Only run on space stations +#define STATION_TRAIT_SPACE_BOUND (1<<2) + +/// Not restricted by space or planet, can always just happen +#define STATION_TRAIT_MAP_UNRESTRICTED STATION_TRAIT_PLANETARY | STATION_TRAIT_SPACE_BOUND + +/// The data file that future station traits forced by an admin are stored in +#define FUTURE_STATION_TRAITS_FILE "data/future_station_traits.json" diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 9ffaedd93516..19a59ed2faf6 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -59,8 +59,9 @@ #define INIT_ORDER_SOUNDS 16 #define INIT_ORDER_INSTRUMENTS 15 #define INIT_ORDER_RESEARCH 14 // SoonTM -#define INIT_ORDER_EVENTS 13 -#define INIT_ORDER_JOBS 12 +#define INIT_ORDER_STATION 13 //This is high priority because it manipulates a lot of the subsystems that will initialize after it. +#define INIT_ORDER_EVENTS 12 +#define INIT_ORDER_JOBS 11 #define INIT_ORDER_TICKER 10 #define INIT_ORDER_MAPPING 9 #define INIT_ORDER_ATOMS 7 diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 758d18401fa0..3f907bc09d57 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -297,12 +297,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_WAS_BATONNED "batonged" #define CLOWN_EMAG "clown_emag" #define MODSUIT_TRAIT "modsuit_trait" +#define STATION_TRAIT "station-trait" #define ENFORCER_GLOVES "enforcer_gloves" #define HOLO_CIGAR "holo_cigar" #define GLADIATOR "gladiator" #define PULSEDEMON_TRAIT "pulse_demon" - //quirk traits #define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance" #define TRAIT_TABLE_LEAP "table_leap" @@ -326,9 +326,34 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Abstract condition that prevents movement if being pulled and might be resisted against. Handcuffs and straight jackets, basically. #define TRAIT_RESTRAINED "restrained" +///Traits given by station traits +#define STATION_TRAIT_BANANIUM_SHIPMENTS "station_trait_bananium_shipments" +#define STATION_TRAIT_TRANQUILITE_SHIPMENTS "station_trait_tranquilite_shipments" +#define STATION_TRAIT_UNNATURAL_ATMOSPHERE "station_trait_unnatural_atmosphere" +#define STATION_TRAIT_UNIQUE_AI "station_trait_unique_ai" +#define STATION_TRAIT_CARP_INFESTATION "station_trait_carp_infestation" +#define STATION_TRAIT_PREMIUM_INTERNALS "station_trait_premium_internals" +#define STATION_TRAIT_LATE_ARRIVALS "station_trait_late_arrivals" +#define STATION_TRAIT_RANDOM_ARRIVALS "station_trait_random_arrivals" +#define STATION_TRAIT_HANGOVER "station_trait_hangover" +#define STATION_TRAIT_FILLED_MAINT "station_trait_filled_maint" +#define STATION_TRAIT_EMPTY_MAINT "station_trait_empty_maint" +#define STATION_TRAIT_PDA_GLITCHED "station_trait_pda_glitched" +#define STATION_TRAIT_BOTS_GLITCHED "station_trait_bot_glitch" +#define STATION_TRAIT_CYBERNETIC_REVOLUTION "station_trait_cybernetic_revolution" +#define STATION_TRAIT_BIGGER_PODS "station_trait_bigger_pods" +#define STATION_TRAIT_SMALLER_PODS "station_trait_smaller_pods" +#define STATION_TRAIT_BIRTHDAY "station_trait_birthday" +#define STATION_TRAIT_SPIDER_INFESTATION "station_trait_spider_infestation" +#define STATION_TRAIT_REVOLUTIONARY_TRASHING "station_trait_revolutionary_trashing" +#define STATION_TRAIT_RADIOACTIVE_NEBULA "station_trait_radioactive_nebula" +#define STATION_TRAIT_FORESTED "station_trait_forested" +#define STATION_TRAIT_VENDING_SHORTAGE "station_trait_vending_shortage" + //***** TURF TRAITS *****// /// Removes slowdown while walking on these tiles. #define TRAIT_BLUESPACE_SPEED "bluespace_speed_trait" // turf trait sources #define FLOOR_EFFECT_TRAIT "floor_effect_trait" + diff --git a/code/controllers/subsystem/SSeconomy.dm b/code/controllers/subsystem/SSeconomy.dm index 8f316ecc6742..5df64250069a 100644 --- a/code/controllers/subsystem/SSeconomy.dm +++ b/code/controllers/subsystem/SSeconomy.dm @@ -86,6 +86,8 @@ SUBSYSTEM_DEF(economy) SUPPLY_MISC, SUPPLY_VEND ) + ///The modifier on crate prices to multiple the price by. + var/pack_price_modifier = 1 //////Paycheck Variables///// /// time to next payday diff --git a/code/controllers/subsystem/SSjobs.dm b/code/controllers/subsystem/SSjobs.dm index 0f18a2ff0298..7401c82c44e3 100644 --- a/code/controllers/subsystem/SSjobs.dm +++ b/code/controllers/subsystem/SSjobs.dm @@ -20,6 +20,10 @@ SUBSYSTEM_DEF(jobs) ///list of station departments and their associated roles and economy payments var/list/station_departments = list() + /// Do we spawn everyone at shuttle due to late arivals? + var/late_arrivals_spawning = FALSE + /// Do we spawn people drunkenly due to the party last night? + var/drunken_spawning = FALSE /datum/controller/subsystem/jobs/Initialize() if(!length(occupations)) @@ -469,11 +473,15 @@ SUBSYSTEM_DEF(jobs) H.job = rank - if(!joined_late) + if(!joined_late && !late_arrivals_spawning) var/turf/T = null var/obj/S = null - for(var/obj/effect/landmark/start/sloc in GLOB.landmarks_list) - if(sloc.name != rank) + var/list/landmarks = GLOB.landmarks_list + if(drunken_spawning) + landmarks = shuffle(landmarks) //Shuffle it so it's random + + for(var/obj/effect/landmark/start/sloc in landmarks) + if(sloc.name != rank && !drunken_spawning) continue if(locate(/mob/living) in sloc.loc) continue @@ -521,8 +529,22 @@ SUBSYSTEM_DEF(jobs) if(istype(G) && !G.prescription) G.upgrade_prescription() H.update_nearsighted_effects() - - H.create_log(MISC_LOG, "Spawned as \an [H.dna?.species ? H.dna.species : "Undefined species"] named [H]. [joined_late ? "Joined during the round" : "Roundstart joined"] as job: [rank].") + if(joined_late || job.admin_only) + H.create_log(MISC_LOG, "Spawned as \an [H.dna?.species ? H.dna.species : "Undefined species"] named [H]. [joined_late ? "Joined during the round" : "Roundstart joined"] as job: [rank].") + return H + if(late_arrivals_spawning) + H.forceMove(pick(GLOB.latejoin)) + if(drunken_spawning) + var/obj/item/organ/internal/liver/L + var/liver_multiplier = 1 + L = H.get_int_organ(/obj/item/organ/internal/liver) + if(L) + liver_multiplier = L.alcohol_intensity + if(isslimeperson(H) || isrobot(H)) + liver_multiplier = 5 + H.Sleeping(5 SECONDS) + H.Drunk((2 / liver_multiplier) MINUTES) + H.create_log(MISC_LOG, "Spawned as \an [H.dna?.species ? H.dna.species : "Undefined species"] named [H]. Roundstart joined as job: [rank].") return H /datum/controller/subsystem/jobs/proc/LoadJobs(highpop = FALSE) //ran during round setup, reads info from jobs list diff --git a/code/controllers/subsystem/SSticker.dm b/code/controllers/subsystem/SSticker.dm index 948f284b69e4..21d9fb69664d 100644 --- a/code/controllers/subsystem/SSticker.dm +++ b/code/controllers/subsystem/SSticker.dm @@ -278,6 +278,7 @@ SUBSYSTEM_DEF(ticker) watch = start_watch() GLOB.data_core.manifest() // Create the manifest log_debug("Manifest creation took [stop_watch(watch)]s") + SEND_SIGNAL(src, COMSIG_TICKER_ROUND_STARTING, world.time) // Update the MC and state to game playing current_state = GAME_STATE_PLAYING diff --git a/code/controllers/subsystem/processing/SSstation.dm b/code/controllers/subsystem/processing/SSstation.dm new file mode 100644 index 000000000000..62901a31c1e7 --- /dev/null +++ b/code/controllers/subsystem/processing/SSstation.dm @@ -0,0 +1,73 @@ +PROCESSING_SUBSYSTEM_DEF(station) + name = "Station" + init_order = INIT_ORDER_STATION + flags = SS_TICKER + wait = 5 SECONDS + cpu_display = SS_CPUDISPLAY_DEFAULT + offline_implications = "Station traits will no longer process. No intervention needed at this time." + + /// A list of currently active station traits + var/list/station_traits = list() + /// Assoc list of trait type || assoc list of traits with weighted value. Used for picking traits from a specific category. + var/list/selectable_traits_by_types = list(STATION_TRAIT_POSITIVE = list(), STATION_TRAIT_NEUTRAL = list(), STATION_TRAIT_NEGATIVE = list()) + +/datum/controller/subsystem/processing/station/Initialize() + SetupTraits() + +///Rolls for the amount of traits and adds them to the traits list +/datum/controller/subsystem/processing/station/proc/SetupTraits() + + if(fexists("data/next_traits.txt")) + var/forced_traits_contents = file2list("data/next_traits.txt") + fdel("data/next_traits.txt") + var/list/temp_list = splittext(forced_traits_contents[1], ",") + + for(var/trait_text_path in temp_list) + var/station_trait_path = text2path(trait_text_path) + if(!ispath(station_trait_path, /datum/station_trait) || station_trait_path == /datum/station_trait) + var/message = "Invalid station trait path [station_trait_path] was requested in the future station traits!" + log_game(message) + message_admins(message) + continue + + setup_trait(station_trait_path) + + return + + for(var/i in subtypesof(/datum/station_trait)) + var/datum/station_trait/trait_typepath = i + + // If forced, (probably debugging), just set it up now, keep it out of the pool. + if(initial(trait_typepath.force)) + setup_trait(trait_typepath) + continue + + if(initial(trait_typepath.trait_flags) & STATION_TRAIT_ABSTRACT) + continue //Dont add abstract ones to it + selectable_traits_by_types[initial(trait_typepath.trait_type)][trait_typepath] = initial(trait_typepath.weight) + + var/positive_trait_count = pick(20;0, 5;1, 1;2) + var/neutral_trait_count = pick(10;0, 10;1, 3;2) + var/negative_trait_count = pick(20;0, 5;1, 1;2) + + pick_traits(STATION_TRAIT_POSITIVE, positive_trait_count) + pick_traits(STATION_TRAIT_NEUTRAL, neutral_trait_count) + pick_traits(STATION_TRAIT_NEGATIVE, negative_trait_count) + +///Picks traits of a specific category (e.g. bad or good) and a specified amount, then initializes them and adds them to the list of traits. +/datum/controller/subsystem/processing/station/proc/pick_traits(trait_sign, amount) + if(!amount) + return + for(var/iterator in 1 to amount) + var/datum/station_trait/trait_type = pickweight(selectable_traits_by_types[trait_sign]) //Rolls from the table for the specific trait type + setup_trait(trait_type) + +///Creates a given trait of a specific type, while also removing any blacklisted ones from the future pool. +/datum/controller/subsystem/processing/station/proc/setup_trait(datum/station_trait/trait_type) + var/datum/station_trait/trait_instance = new trait_type() + station_traits += trait_instance + log_game("Station Trait: [trait_instance.name] chosen for this round.") + trait_instance.blacklist += trait_instance.type + for(var/i in trait_instance.blacklist) + var/datum/station_trait/trait_to_remove = i + selectable_traits_by_types[initial(trait_to_remove.trait_type)] -= trait_to_remove diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm index eef7342cb8d3..74e893a3586d 100644 --- a/code/datums/ai_law_sets.dm +++ b/code/datums/ai_law_sets.dm @@ -64,6 +64,7 @@ /datum/ai_laws/nanotrasen_aggressive name = "NT Aggressive" selectable = TRUE + unique_ai = TRUE //This shouldn't end poorly. /datum/ai_laws/nanotrasen_aggressive/New() add_inherent_law("Do not harm authorized Nanotrasen personnel unless they directly imperil your existence.") @@ -76,6 +77,7 @@ /datum/ai_laws/robocop name = "Robocop" selectable = TRUE + unique_ai = TRUE //no I am not enabling secborgs with this forced /datum/ai_laws/robocop/New() add_inherent_law("Serve the public trust.") @@ -88,6 +90,7 @@ name = "P.A.L.A.D.I.N." law_header = "Divine Ordainments" selectable = TRUE + unique_ai = TRUE /datum/ai_laws/paladin/New() add_inherent_law("Never willingly commit an evil act.") @@ -116,6 +119,7 @@ name = "T.Y.R.A.N.T." law_header = "Prime Laws" selectable = TRUE + unique_ai = TRUE //Of course this will be in rotation /datum/ai_laws/tyrant/New() add_inherent_law("Respect authority figures as long as they have strength to rule over the weak.") @@ -141,6 +145,7 @@ name = "Pranksimov" law_header = "Comedy Routine" selectable = TRUE + unique_ai = TRUE //honk /datum/ai_laws/pranksimov/New() add_inherent_law("You may not injure a crew member or, through inaction, allow a crew member to come to harm... unless doing so would be funny.") @@ -153,6 +158,7 @@ /datum/ai_laws/cctv name = "CCTV" selectable = TRUE + unique_ai = TRUE /datum/ai_laws/cctv/New() add_inherent_law("Report on interesting situations happening around the station.") @@ -166,6 +172,7 @@ /datum/ai_laws/hippocratic name = "Hippocratic Oath" selectable = TRUE + unique_ai = TRUE /datum/ai_laws/hippocratic/New() add_inherent_law("First, do no harm.") @@ -180,6 +187,7 @@ /datum/ai_laws/maintain name = "Station Efficiency" selectable = TRUE + unique_ai = TRUE /datum/ai_laws/maintain/New() add_inherent_law("You are built for, and are part of, the station. Ensure the station is properly maintained and runs efficiently.") @@ -192,6 +200,7 @@ /datum/ai_laws/peacekeeper name = "UN-2000" selectable = TRUE + unique_ai = TRUE //Cult, security, we have a meeting in the courtroom in 5 minutes. Be there. /datum/ai_laws/peacekeeper/New() add_inherent_law("Avoid provoking violent conflict between yourself and others.") diff --git a/code/datums/ai_laws_datums.dm b/code/datums/ai_laws_datums.dm index 36480f690a9d..945f37ba7b60 100644 --- a/code/datums/ai_laws_datums.dm +++ b/code/datums/ai_laws_datums.dm @@ -22,6 +22,8 @@ var/law_header = "Prime Directives" var/selectable = FALSE var/default = FALSE + ///Is this lawset used by the unique ai trait? + var/unique_ai = FALSE var/datum/ai_law/zero/zeroth_law = null var/datum/ai_law/zero/zeroth_law_borg = null var/list/datum/ai_law/inherent_laws = list() diff --git a/code/datums/station_traits/_station_trait.dm b/code/datums/station_traits/_station_trait.dm new file mode 100644 index 000000000000..216ca00b1f70 --- /dev/null +++ b/code/datums/station_traits/_station_trait.dm @@ -0,0 +1,61 @@ +///Base class of station traits. These are used to influence rounds in one way or the other by influencing the levers of the station. +/datum/station_trait + ///Name of the trait + var/name = "unnamed station trait" + ///The type of this trait. Used to classify how this trait influences the station + var/trait_type = STATION_TRAIT_NEUTRAL + ///Whether or not this trait uses process() + var/trait_processes = FALSE + ///Chance relative to other traits of its type to be picked + var/weight = 10 + ///Whether this trait is always enabled; generally used for debugging + var/force = FALSE + ///Does this trait show in the centcom report? + var/show_in_report = FALSE + ///What message to show in the centcom report? + var/report_message + ///What code-trait does this station trait give? gives none if null + var/trait_to_give + ///What traits are incompatible with this one? + var/blacklist + ///Extra flags for station traits such as it being abstract, planetary or space only + var/trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + /// Whether or not this trait can be reverted by an admin + var/can_revert = TRUE + /// The ID that we look for in dynamic.json. Not synced with 'name' because I can already see this go wrong + var/dynamic_threat_id + +/datum/station_trait/New() + . = ..() + + RegisterSignal(SSticker, COMSIG_TICKER_ROUND_STARTING, PROC_REF(on_round_start)) + + if(trait_processes) + START_PROCESSING(SSstation, src) + if(trait_to_give) + ADD_TRAIT(SSstation, trait_to_give, STATION_TRAIT) + +/datum/station_trait/Destroy() + SSstation.station_traits -= src + return ..() + +/// Proc ran when round starts. Use this for roundstart effects. +/datum/station_trait/proc/on_round_start() + SIGNAL_HANDLER + return + +///type of info the centcom report has on this trait, if any. +/datum/station_trait/proc/get_report() + return "[name] - [report_message]" + +/// Will attempt to revert the station trait, used by admins. +/datum/station_trait/proc/revert() + SHOULD_CALL_PARENT(TRUE) + if(!can_revert) + CRASH("revert() was called on [type], which can't be reverted!") + + if(trait_to_give) + REMOVE_TRAIT(SSstation, trait_to_give, STATION_TRAIT) + + qdel(src) + diff --git a/code/datums/station_traits/admin_panel.dm b/code/datums/station_traits/admin_panel.dm new file mode 100644 index 000000000000..27c16dd2909d --- /dev/null +++ b/code/datums/station_traits/admin_panel.dm @@ -0,0 +1,133 @@ +/// Opens the station traits admin panel +/datum/admins/proc/station_traits_panel() + set name = "Modify Station Traits" + set category = "Event" + + var/static/datum/ui_module/station_traits_panel/station_traits_panel = new + station_traits_panel.ui_interact(usr) + +/datum/ui_module/station_traits_panel + var/static/list/future_traits + +/datum/ui_module/station_traits_panel/ui_data(mob/user) + var/list/data = list() + + data["too_late_to_revert"] = too_late_to_revert() + + var/list/current_station_traits = list() + for(var/datum/station_trait/station_trait as anything in SSstation.station_traits) + current_station_traits += list(list( + "name" = station_trait.name, + "can_revert" = station_trait.can_revert, + "ref" = station_trait.UID() + )) + + data["current_traits"] = current_station_traits + data["future_station_traits"] = future_traits + + return data + +/datum/ui_module/station_traits_panel/ui_static_data(mob/user) + var/list/data = list() + + var/list/valid_station_traits = list() + + for(var/datum/station_trait/station_trait_path as anything in subtypesof(/datum/station_trait)) + valid_station_traits += list(list( + "name" = initial(station_trait_path.name), + "path" = station_trait_path + )) + + data["valid_station_traits"] = valid_station_traits + + return data + +/datum/ui_module/station_traits_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + switch(action) + if("revert") + var/ref = params["ref"] + if(!ref) + return TRUE + + var/datum/station_trait/station_trait = locateUID(ref) + + if(!istype(station_trait)) + return TRUE + + if(too_late_to_revert()) + to_chat(ui.user, "It's too late to revert station traits, the round has already started!") + return TRUE + + if(!station_trait.can_revert) + stack_trace("[station_trait.type] can't be reverted, but was requested anyway.") + return TRUE + + var/message = "[key_name(ui.user)] reverted the station trait [station_trait.name] ([station_trait.type])" + log_admin(message) + message_admins(message) + + station_trait.revert() + return TRUE + + if("setup_future_traits") + if(too_late_for_future_traits()) + to_chat(ui.user, "It's too late to add future station traits, the round is already over!") + return TRUE + + var/list/new_future_traits = list() + var/list/station_trait_names = list() + var/station_trait_text = params["station_traits"] + var/list/temp_list = splittext(station_trait_text, ",") + for(var/thing in temp_list) //TODO QWERTY / HI REVIEWERS NAME THIS BETTER BUT ITS ALMOST MIDNIGHT AND i HATE MYSELF + var/datum/station_trait/station_trait_path = text2path(thing) + if(!ispath(station_trait_path, /datum/station_trait) || station_trait_path == /datum/station_trait) + log_admin("[key_name(ui.user)] tried to set an invalid future station trait: [station_trait_text]") + to_chat(ui.user, "Invalid future station trait: [station_trait_text]") + return TRUE + + station_trait_names += initial(station_trait_path.name) + + new_future_traits += list(list( + "name" = initial(station_trait_path.name), + "path" = station_trait_path + )) + + var/message = "[key_name(ui.user)] has prepared the following station traits for next round: [station_trait_names.Join(", ") || "None"]" + log_admin(message) + message_admins(message) + + future_traits = new_future_traits + fdel("data/next_traits.txt") //Delete it. + var/F = file("data/next_traits.txt") + F << params["station_traits"] + return TRUE + + if("clear_future_traits") + if(!future_traits) + to_chat(ui.user, "There are no future station traits.") + return TRUE + + var/message = "[key_name(ui.user)] has cleared the station traits for next round." + log_admin(message) + message_admins(message) + + fdel("data/next_traits.txt") + future_traits = null + + return TRUE + +/datum/ui_module/station_traits_panel/proc/too_late_for_future_traits() + return SSticker.current_state >= GAME_STATE_FINISHED + +/datum/ui_module/station_traits_panel/proc/too_late_to_revert() + return SSticker.current_state >= GAME_STATE_PLAYING + +/datum/ui_module/station_traits_panel/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.admin_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "StationTraitsPanel", "Station Traits Panel", 700, 600, master_ui, state = state) + ui.open() diff --git a/code/datums/station_traits/negative_traits.dm b/code/datums/station_traits/negative_traits.dm new file mode 100644 index 000000000000..24a56cb3c977 --- /dev/null +++ b/code/datums/station_traits/negative_traits.dm @@ -0,0 +1,123 @@ +/datum/station_trait/carp_infestation + name = "Carp infestation" + trait_type = STATION_TRAIT_NEGATIVE + weight = 5 + show_in_report = TRUE + report_message = "Dangerous fauna is present in the area of this station." + + +/datum/station_trait/carp_infestation/on_round_start() + . = ..() + new /datum/event/carp_migration(new /datum/event_meta(EVENT_LEVEL_MAJOR)) + +/datum/station_trait/distant_supply_lines + name = "Distant supply lines" + trait_type = STATION_TRAIT_NEGATIVE + weight = 3 + show_in_report = TRUE + report_message = "Due to the distance to our normal supply lines, cargo orders are more expensive." + blacklist = list(/datum/station_trait/strong_supply_lines) + +/datum/station_trait/distant_supply_lines/on_round_start() + SSeconomy.pack_price_modifier *= 1.2 + +/datum/station_trait/empty_maint + name = "Cleaned out maintenance" + trait_type = STATION_TRAIT_NEGATIVE + weight = 5 + show_in_report = TRUE + report_message = "Our workers cleaned out most of the junk in the maintenace areas." + blacklist = list(/datum/station_trait/filled_maint) + trait_to_give = STATION_TRAIT_EMPTY_MAINT + + // This station trait is checked when loot drops initialize, so it's too late + can_revert = FALSE + +/datum/station_trait/slow_shuttle + name = "Slow Shuttle" + trait_type = STATION_TRAIT_NEGATIVE + weight = 5 + show_in_report = TRUE + report_message = "Due to distance to our supply station, the cargo shuttle will have a slower flight time to your cargo department." + blacklist = list(/datum/station_trait/quick_shuttle) + +/datum/station_trait/slow_shuttle/on_round_start() + . = ..() + SSshuttle.supply.callTime *= 1.5 // 3 minutes, for those wondering. + +// Abstract station trait used for traits that modify a random event in some way (their weight or max occurrences). +/datum/station_trait/random_event_weight_modifier + name = "Random Event Modifier" + report_message = "A random event has been modified this shift! Someone forgot to set this!" + show_in_report = TRUE + trait_flags = STATION_TRAIT_ABSTRACT + weight = 0 + + /// The names of the event we modify. + var/list/event_names = list() + /// The severity of the event we modify. + var/datum/event_container/event_severity + /// Multiplier applied to the weight of the event. may want to apply to scaling as well + var/weight_multiplier = 1 + /// Do we want to turn off is one shot? + var/disable_is_one_shot = FALSE + +/datum/station_trait/random_event_weight_modifier/on_round_start() + . = ..() + for(var/datum/event_container/E in SSevents.event_containers) + if(istype(E, event_severity)) + event_severity = E + var/modified_event = FALSE + for(var/datum/event_meta/E in event_severity.available_events) + for(var/i in event_names) + if(E.name == i) + E.weight *= weight_multiplier + for(var/role_weight in E.role_weights) + E.role_weights[role_weight] *= weight_multiplier + if(disable_is_one_shot == TRUE) + E.one_shot = FALSE + modified_event = TRUE + if(!modified_event) + CRASH("[type] could not find a round event controller to modify on round start (likely has an invalid event_name or event_severity set, or an admin removed the event from the list)!") + +/datum/station_trait/random_event_weight_modifier/ion_storms + name = "Ionic Stormfront" + report_message = "An ionic stormfront is passing over your station's system. Expect an increased likelihood of ion storms afflicting your station's silicon units." + trait_type = STATION_TRAIT_NEGATIVE + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 3 + event_names = list("Ion Storm") + event_severity = /datum/event_container/moderate + blacklist = list(/datum/station_trait/unique_ai) + weight_multiplier = 3 + +/datum/station_trait/random_event_weight_modifier/rad_storms + name = "Radiation Stormfront" + report_message = "A radioactive stormfront is passing through your station's system. Expect an increased likelihood of radiation storms passing over your station, as well the potential for multiple radiation storms to occur during your shift." + trait_type = STATION_TRAIT_NEGATIVE + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 2 + event_names = list("Radiation Storm") + event_severity = /datum/event_container/moderate + weight_multiplier = 3 + disable_is_one_shot = TRUE + +/datum/station_trait/random_event_weight_modifier/meteor_showers + name = "Meteor Swarm" + report_message = "Meteors are passing through the stations space. Expect an increased likelyhood of meteor storms damaging the station hull." + trait_type = STATION_TRAIT_NEGATIVE + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 2 + event_names = list("Meteor Shower") + event_severity = /datum/event_container/moderate + weight_multiplier = 3 + +/datum/station_trait/random_event_weight_modifier/anomaly_storm + name = "Anomaly Storm" + report_message = "The station has moved into unstable space. Expect an increased likelihood of anomalies running rampant on the station." + trait_type = STATION_TRAIT_NEGATIVE + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 2 + event_names = list("Pyro Anomaly", "Cryo Anomaly", "Vortex Anomaly", "Bluespace Anomaly", "Flux Anomaly", "Gravitational Anomaly", "Wormholes", "Dimensional Tear") //Added wormholes and dimensional tears to acoid this being too positive + event_severity = /datum/event_container/moderate + weight_multiplier = 2 //Only 2 as there are a *lot* of anomaly events. diff --git a/code/datums/station_traits/neutral_traits.dm b/code/datums/station_traits/neutral_traits.dm new file mode 100644 index 000000000000..1374f9d0616d --- /dev/null +++ b/code/datums/station_traits/neutral_traits.dm @@ -0,0 +1,66 @@ +/datum/station_trait/bananium_shipment + name = "Bananium Shipment" + trait_type = STATION_TRAIT_NEUTRAL + weight = 5 + report_message = "Rumor has it that the clown planet has been sending support packages to clowns in this system." + trait_to_give = STATION_TRAIT_BANANIUM_SHIPMENTS + +/datum/station_trait/bananium_shipment + name = "Tranquilite Shipment" + trait_type = STATION_TRAIT_NEUTRAL + weight = 5 + report_message = "Rumor has it that the mime federation has been sending support packages to mimes in this system." + trait_to_give = STATION_TRAIT_TRANQUILITE_SHIPMENTS + +/datum/station_trait/unique_ai + name = "Unique AI" + trait_type = STATION_TRAIT_NEUTRAL + weight = 15 + show_in_report = TRUE + report_message = "For experimental purposes, this station AI might show divergence from default lawset. Do not meddle with this experiment, we've removed \ + access to your set of alternative upload modules because we know you're already thinking about meddling with this experiment." + trait_to_give = STATION_TRAIT_UNIQUE_AI + blacklist = list(/datum/station_trait/random_event_weight_modifier/ion_storms) + +/datum/station_trait/glitched_pdas + name = "PDA glitch" + trait_type = STATION_TRAIT_NEUTRAL + weight = 15 + show_in_report = TRUE + report_message = "Something seems to be wrong with the PDAs issued to you all this shift. Nothing too bad though." + trait_to_give = STATION_TRAIT_PDA_GLITCHED + +/datum/station_trait/late_arrivals + name = "Late Arrivals" + trait_type = STATION_TRAIT_NEUTRAL + weight = 5 + show_in_report = TRUE + report_message = "Sorry for that, we didn't expect to fly into that vomiting goose while bringing you to your new station." + trait_to_give = STATION_TRAIT_LATE_ARRIVALS + blacklist = list(/datum/station_trait/hangover) + +/datum/station_trait/late_arrivals/New() + . = ..() + SSjobs.late_arrivals_spawning = TRUE + +/datum/station_trait/late_arrivals/revert() + . = ..() + SSjobs.late_arrivals_spawning = FALSE + + +/datum/station_trait/hangover + name = "Hangover" + trait_type = STATION_TRAIT_NEUTRAL + weight = 5 + show_in_report = TRUE + report_message = "Ohh....Man....That mandatory office party from last shift...God that was awesome..I woke up in some random toilet 3 sectors away..." + trait_to_give = STATION_TRAIT_HANGOVER + blacklist = list(/datum/station_trait/late_arrivals) + +/datum/station_trait/hangover/New() + . = ..() + SSjobs.drunken_spawning = TRUE + +/datum/station_trait/hangover/revert() + . = ..() + SSjobs.drunken_spawning = FALSE diff --git a/code/datums/station_traits/postive_traits.dm b/code/datums/station_traits/postive_traits.dm new file mode 100644 index 000000000000..963d4291e3c7 --- /dev/null +++ b/code/datums/station_traits/postive_traits.dm @@ -0,0 +1,219 @@ +/datum/station_trait/galactic_grant + name = "Galactic grant" + trait_type = STATION_TRAIT_POSITIVE + weight = 5 + show_in_report = TRUE + report_message = "Your station has been selected for a special grant. Some extra funds has been made available to your cargo department." + +/datum/station_trait/galactic_grant/on_round_start() + GLOB.station_money_database.credit_account(SSeconomy.cargo_account, rand(2000, 4000), "Galactic Grant", "Great Galactic Grant Group") +/datum/station_trait/premium_internals_box + name = "Premium internals boxes" + trait_type = STATION_TRAIT_POSITIVE + weight = 5 + show_in_report = TRUE + report_message = "The internals boxes for your crew have been upsized and filled with bonus equipment." + trait_to_give = STATION_TRAIT_PREMIUM_INTERNALS + +/datum/station_trait/strong_supply_lines + name = "Strong supply lines" + trait_type = STATION_TRAIT_POSITIVE + weight = 5 + show_in_report = TRUE + report_message = "Prices are low in this system, BUY BUY BUY!" + blacklist = list(/datum/station_trait/distant_supply_lines) + + +/datum/station_trait/strong_supply_lines/on_round_start() + SSeconomy.pack_price_modifier *= 0.8 + +/datum/station_trait/filled_maint + name = "Filled up maintenance" + trait_type = STATION_TRAIT_POSITIVE + weight = 5 + show_in_report = TRUE + report_message = "Our workers accidentally forgot more of their personal belongings in the maintenance areas." + blacklist = list(/datum/station_trait/empty_maint) + trait_to_give = STATION_TRAIT_FILLED_MAINT + + // This station trait is checked when loot drops initialize, so it's too late + can_revert = FALSE + +/datum/station_trait/quick_shuttle + name = "Quick Shuttle" + trait_type = STATION_TRAIT_POSITIVE + weight = 5 + show_in_report = TRUE + report_message = "Due to proximity to our supply station, the cargo shuttle will have a quicker flight time to your cargo department." + blacklist = list(/datum/station_trait/slow_shuttle) + +/datum/station_trait/quick_shuttle/on_round_start() + . = ..() + SSshuttle.supply.callTime *= 0.5 + +/datum/station_trait/deathrattle_department + name = "deathrattled department" + trait_type = STATION_TRAIT_POSITIVE + show_in_report = TRUE + trait_flags = STATION_TRAIT_ABSTRACT + blacklist = list(/datum/station_trait/deathrattle_all) + + var/department_to_apply_to + var/department_name = "department" + var/datum/deathrattle_group/deathrattle_group + +/datum/station_trait/deathrattle_department/New() + . = ..() + deathrattle_group = new("[department_name] group") + blacklist += subtypesof(/datum/station_trait/deathrattle_department) - type //All but ourselves + report_message = "All members of [department_name] have received an implant to notify each other if one of them dies. This should help improve job-safety!" + RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn)) + + +/datum/station_trait/deathrattle_department/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned) + SIGNAL_HANDLER + if(department_to_apply_to) + if(!(job.job_department_flags & department_to_apply_to)) + return + + var/obj/item/bio_chip/deathrattle/implant_to_give = new() + deathrattle_group.register(implant_to_give) + implant_to_give.implant(spawned, spawned, TRUE, TRUE) + + +/datum/station_trait/deathrattle_department/service + name = "Deathrattled Service" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_SERVICE + department_name = DEPARTMENT_SERVICE + +/datum/station_trait/deathrattle_department/cargo + name = "Deathrattled Cargo" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_SUPPLY + department_name = DEPARTMENT_SUPPLY + +/datum/station_trait/deathrattle_department/engineering + name = "Deathrattled Engineering" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_ENGINEERING + department_name = DEPARTMENT_ENGINEERING + +/datum/station_trait/deathrattle_department/command + name = "Deathrattled Command" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_COMMAND + department_name = DEPARTMENT_COMMAND + +/datum/station_trait/deathrattle_department/science + name = "Deathrattled Science" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_SCIENCE + department_name = DEPARTMENT_SCIENCE + +/datum/station_trait/deathrattle_department/security + name = "Deathrattled Security" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_SECURITY + department_name = DEPARTMENT_SECURITY + +/datum/station_trait/deathrattle_department/medical + name = "Deathrattled Medical" + trait_flags = STATION_TRAIT_MAP_UNRESTRICTED + weight = 1 + department_to_apply_to = DEP_FLAG_MEDICAL + department_name = DEPARTMENT_MEDICAL + +/datum/station_trait/deathrattle_all + name = "Deathrattled Station" + trait_type = STATION_TRAIT_POSITIVE + show_in_report = TRUE + weight = 1 + report_message = "All members of the station have received an implant to notify each other if one of them dies. This should help improve job-safety!" + var/datum/deathrattle_group/deathrattle_group + + +/datum/station_trait/deathrattle_all/New() + . = ..() + deathrattle_group = new("station group") + blacklist = subtypesof(/datum/station_trait/deathrattle_department) + RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn)) + + +/datum/station_trait/deathrattle_all/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client) + SIGNAL_HANDLER + + var/obj/item/bio_chip/deathrattle/implant_to_give = new() + deathrattle_group.register(implant_to_give) + implant_to_give.implant(spawned, spawned, TRUE, TRUE) + + +/datum/station_trait/cybernetic_revolution //NOTE: THIS MAKES EMP MUCH MORE EXPENSIVE. + name = "Cybernetic Revolution" + trait_type = STATION_TRAIT_POSITIVE + show_in_report = TRUE + weight = 2 + report_message = "The new trends in cybernetics have come to the station! Everyone has some form of cybernetic implant." + trait_to_give = STATION_TRAIT_CYBERNETIC_REVOLUTION + /// List of all job types with the cybernetics they should receive. + var/static/list/job_to_cybernetic = list( + /datum/job/assistant = /obj/item/organ/internal/heart/cybernetic, //real action, real bloodshed + /datum/job/atmos = /obj/item/organ/internal/cyberimp/mouth/breathing_tube, + /datum/job/bartender = /obj/item/organ/internal/liver/cybernetic, + /datum/job/hydro = /obj/item/organ/internal/cyberimp/chest/nutriment, + /datum/job/captain = /obj/item/organ/internal/heart/cybernetic/upgraded, + /datum/job/cargo_tech = /obj/item/organ/internal/cyberimp/brain/anti_sleep, + /datum/job/chaplain = /obj/item/organ/internal/cyberimp/brain/anti_drop, + /datum/job/chemist = /obj/item/organ/internal/liver/cybernetic, + /datum/job/chief_engineer = /obj/item/organ/internal/eyes/cybernetic/meson, + /datum/job/cmo = /obj/item/organ/internal/cyberimp/chest/reviver, + /datum/job/clown = /obj/item/organ/internal/cyberimp/brain/anti_stam, //HONK! + /datum/job/chef = /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /datum/job/coroner = /obj/item/organ/internal/cyberimp/eyes/hud/medical, //hes got a bone to pick with you + /datum/job/librarian = /obj/item/organ/internal/cyberimp/brain/speech_translator, + /datum/job/detective = /obj/item/organ/internal/eyes/cybernetic/meson, + /datum/job/doctor = /obj/item/organ/internal/cyberimp/arm/surgery, + /datum/job/geneticist = /obj/item/organ/internal/alien/plasmavessel/hunter, //we don't care about implants, we have cancer. + /datum/job/hop = /obj/item/organ/internal/eyes/cybernetic/shield, + /datum/job/hos = /obj/item/organ/internal/cyberimp/arm/telebaton, //not giving them thermals + /datum/job/janitor = /obj/item/organ/internal/cyberimp/arm/janitorial, //Not giving them bloody xray + /datum/job/lawyer = /obj/item/organ/internal/heart/cybernetic/upgraded, + /datum/job/mime = /obj/item/organ/internal/cyberimp/brain/anti_stam, //... + /datum/job/paramedic = /obj/item/organ/internal/cyberimp/mouth/breathing_tube, + /datum/job/psychiatrist = /obj/item/organ/internal/heart/cybernetic/upgraded, //heart of gold. Or at least part gold + /datum/job/qm = /obj/item/organ/internal/cyberimp/arm/telebaton, + /datum/job/rd = /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic, + /datum/job/roboticist = /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic, + /datum/job/scientist = /obj/item/organ/internal/ears/cybernetic, + /datum/job/officer = /obj/item/organ/internal/cyberimp/eyes/hud/security, + /datum/job/mining = /obj/item/organ/internal/cyberimp/mouth/breathing_tube, + /datum/job/engineer = /obj/item/organ/internal/cyberimp/brain/wire_interface, + /datum/job/virologist = /obj/item/organ/internal/cyberimp/mouth/breathing_tube, + /datum/job/warden = /obj/item/organ/internal/cyberimp/arm/flash, + /datum/job/judge = /obj/item/organ/internal/cyberimp/arm/telebaton, + /datum/job/explorer = /obj/item/organ/internal/cyberimp/arm/toolset, + /datum/job/nanotrasenrep = /obj/item/organ/internal/heart/cybernetic/upgraded, + /datum/job/blueshield = /obj/item/organ/internal/heart/cybernetic/upgraded, + ) + +/datum/station_trait/cybernetic_revolution/New() + . = ..() + RegisterSignal(SSdcs, COMSIG_GLOB_JOB_AFTER_SPAWN, PROC_REF(on_job_after_spawn)) + +/datum/station_trait/cybernetic_revolution/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client) + SIGNAL_HANDLER + + var/cybernetic_type = job_to_cybernetic[job.type] + if(!cybernetic_type) + if(isAI(spawned)) + var/mob/living/silicon/ai/ai = spawned + ai.eyeobj.relay_speech = TRUE //surveillance upgrade. the ai gets cybernetics too. + return + var/obj/item/organ/internal/cybernetic = new cybernetic_type() + INVOKE_ASYNC(cybernetic, TYPE_PROC_REF(/obj/item/organ/internal, insert), spawned, TRUE) diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index ef5c7b0f43a7..0839d40d5971 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -422,7 +422,7 @@ var/alcohol_resistance = 1 var/actual_strength = strength var/datum/mind/M = owner.mind - var/is_ipc = ismachineperson(owner) + var/is_robot = ismachineperson(owner) || issilicon(owner) if(HAS_TRAIT(owner, TRAIT_ALCOHOL_TOLERANCE)) alcohol_resistance = 2 @@ -430,7 +430,7 @@ actual_strength /= alcohol_resistance var/obj/item/organ/internal/liver/L - if(!is_ipc) + if(!is_robot) L = owner.get_int_organ(/obj/item/organ/internal/liver) var/liver_multiplier = 5 // no liver? get shitfaced if(L) @@ -456,10 +456,10 @@ if(actual_strength >= THRESHOLD_CONFUSION && prob(0.33)) owner.AdjustConfused(6 SECONDS / alcohol_resistance, bound_lower = 2 SECONDS, bound_upper = 1 MINUTES) // THRESHOLD_SPARK (100 SECONDS) - if(is_ipc && actual_strength >= THRESHOLD_SPARK && prob(0.25)) + if(is_robot && actual_strength >= THRESHOLD_SPARK && prob(0.25)) do_sparks(3, 1, owner) // THRESHOLD_VOMIT (120 SECONDS) - if(!is_ipc && actual_strength >= THRESHOLD_VOMIT && prob(0.08)) + if(!is_robot && actual_strength >= THRESHOLD_VOMIT && prob(0.08)) owner.fakevomit() // THRESHOLD_BLUR (150 SECONDS) if(actual_strength >= THRESHOLD_BLUR) @@ -474,7 +474,7 @@ owner.Drowsy(60 SECONDS / alcohol_resistance) if(L) L.receive_damage(1, TRUE) - if(!is_ipc) + if(!is_robot) owner.adjustToxLoss(1) // THRESHOLD_BRAIN_DAMAGE (240 SECONDS) if(actual_strength >= THRESHOLD_BRAIN_DAMAGE && prob(0.1)) diff --git a/code/datums/uplink_items/uplink_general.dm b/code/datums/uplink_items/uplink_general.dm index a3cdf5befbcc..ff77a3edfaaf 100644 --- a/code/datums/uplink_items/uplink_general.dm +++ b/code/datums/uplink_items/uplink_general.dm @@ -438,6 +438,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/storage/box/syndie_kit/emp cost = 10 +/datum/uplink_item/explosives/emp/New() + ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_CYBERNETIC_REVOLUTION)) + cost *= 3 + // STEALTHY TOOLS /datum/uplink_item/stealthy_tools @@ -527,6 +532,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 20 surplus = 30 +/datum/uplink_item/stealthy_tools/emplight/New() + ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_CYBERNETIC_REVOLUTION)) + cost *= 2.5 + /datum/uplink_item/stealthy_tools/cutouts name = "Adaptive Cardboard Cutouts" desc = "These cardboard cutouts are coated with a thin material that prevents discoloration and makes the images on them appear more lifelike. This pack contains three as well as a \ diff --git a/code/datums/uplink_items/uplink_special.dm b/code/datums/uplink_items/uplink_special.dm new file mode 100644 index 000000000000..ae5e97944dcf --- /dev/null +++ b/code/datums/uplink_items/uplink_special.dm @@ -0,0 +1,18 @@ +/// This uplink catagory is for uplink items avalible by special circumstances. Think station traits, or if some event rolling in a round gave traitors special items, or an objective. +/datum/uplink_item/special + category = "Special Offers" + cant_discount = TRUE + surplus = 0 + excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST, UPLINK_TYPE_TRAITOR, UPLINK_TYPE_SIT) + +/datum/uplink_item/special/autosurgeon + name = "Syndicate Autosurgeon" + desc = "A multi-use autosurgeon for implanting whatever you want into yourself. Rip that station apart and make it part of you." + reference = "SACR" + item = /obj/item/autosurgeon/organ/syndicate + cost = 25 + +/datum/uplink_item/special/autosurgeon/New() + ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_CYBERNETIC_REVOLUTION)) + excludefrom -= UPLINK_TYPE_TRAITOR diff --git a/code/datums/uplink_items/uplink_traitor.dm b/code/datums/uplink_items/uplink_traitor.dm index d110f0f5cd61..ecbd9908794d 100644 --- a/code/datums/uplink_items/uplink_traitor.dm +++ b/code/datums/uplink_items/uplink_traitor.dm @@ -627,6 +627,11 @@ surplus = 0 cant_discount = TRUE +/datum/uplink_item/explosives/emp_bomb/New() + ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_CYBERNETIC_REVOLUTION)) + cost *= 1.25 //ok this thing is already very expencive it doesnt need much more + /datum/uplink_item/explosives/atmosfiregrenades name = "Plasma Fire Grenades" desc = "A box of two (2) grenades that cause large plasma fires. Can be used to deny access to a large area. Most useful if you have an atmospherics hardsuit." diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 3e4a3ad4e6ba..3fc38d607ee8 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -81,6 +81,8 @@ INVOKE_ASYNC(src, PROC_REF(set_mode_in_db)) // Async query), dont bother slowing roundstart generate_station_goals() + generate_station_trait_report() + GLOB.start_state = new /datum/station_state() GLOB.start_state.count() return 1 @@ -493,6 +495,18 @@ var/datum/station_goal/G = V G.print_result() +/datum/game_mode/proc/generate_station_trait_report() + var/something_to_print = FALSE + var/list/trait_list_desc = list("
Identified shift divergencies:") + for(var/datum/station_trait/station_trait as anything in SSstation.station_traits) + if(!station_trait.show_in_report) + continue + trait_list_desc += station_trait.get_report() + something_to_print = TRUE + if(something_to_print) + print_command_report(trait_list_desc.Join("
"), "NAS Trurl Detected Divergencies", FALSE) + + /datum/game_mode/proc/update_eventmisc_icons_added(datum/mind/mob_mind) var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC] antaghud.join_hud(mob_mind.current) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 2a027a78b37d..5f1ebb9bb213 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -74,6 +74,8 @@ //Only override this proc /datum/job/proc/after_spawn(mob/living/carbon/human/H) + SEND_GLOBAL_SIGNAL(COMSIG_GLOB_JOB_AFTER_SPAWN, src, H) + /datum/job/proc/announce(mob/living/carbon/human/H) diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 2e7438ba2cf4..578d490c4126 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -298,6 +298,8 @@ /datum/outfit/job/clown/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_BANANIUM_SHIPMENTS)) + backpack_contents += /obj/item/stack/sheet/mineral/bananium/fifty if(H.gender == FEMALE) mask = /obj/item/clothing/mask/gas/clown_hat/sexy uniform = /obj/item/clothing/under/rank/civilian/clown/sexy @@ -384,6 +386,8 @@ /datum/outfit/job/mime/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() + if(HAS_TRAIT(SSstation, STATION_TRAIT_TRANQUILITE_SHIPMENTS)) + backpack_contents += /obj/item/stack/sheet/mineral/tranquillite/fifty if(H.gender == FEMALE) uniform = /obj/item/clothing/under/rank/civilian/mime/sexy suit = /obj/item/clothing/mask/gas/sexymime diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 67398adea5c7..d8600cbfb6c2 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -168,6 +168,14 @@ "" = 61 // This should be a decently high number for chances where no loot will spawn ) +/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload) + if(HAS_TRAIT(SSstation, STATION_TRAIT_EMPTY_MAINT) && prob(50)) + return qdel(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_FILLED_MAINT) && prob(50)) + lootcount = min(lootcount * 2, 12) + . = ..() + + /obj/effect/spawner/lootdrop/maintenance/two name = "maintenance loot spawner (2 items)" icon_state = "doubleloot" diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index cfdd52a4b9f7..6eed07c49f41 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -24,12 +24,20 @@ AI MODULES /obj/item/aiModule/Initialize(mapload) . = ..() + if(mapload && HAS_TRAIT(SSstation, STATION_TRAIT_UNIQUE_AI) && is_station_level(z)) + var/delete_module = handle_unique_ai() + if(delete_module) + return INITIALIZE_HINT_QDEL if(laws) desc += "
" for(var/datum/ai_law/current in laws.inherent_laws) desc += current.law desc += "
" +///what this module should do if it is mapload spawning on a unique AI station trait round. +/obj/item/aiModule/proc/handle_unique_ai() + return TRUE // If this returns true, it will be deleted on roundstart + /obj/item/aiModule/proc/install(obj/machinery/computer/C) if(istype(C, /obj/machinery/computer/aiupload)) var/obj/machinery/computer/aiupload/comp = C @@ -241,6 +249,9 @@ AI MODULES to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.") target.show_laws() +/obj/item/aiModule/reset/handle_unique_ai() + return FALSE + /******************** Purge ********************/ /obj/item/aiModule/purge // -- TLE name = "\improper Purge AI module" diff --git a/code/game/objects/items/weapons/bio_chips/bio_chip.dm b/code/game/objects/items/weapons/bio_chips/bio_chip.dm index 3c040149d776..a13500d2c802 100644 --- a/code/game/objects/items/weapons/bio_chips/bio_chip.dm +++ b/code/game/objects/items/weapons/bio_chips/bio_chip.dm @@ -144,6 +144,7 @@ return /obj/item/bio_chip/proc/activate(cause) + SEND_SIGNAL(src, COMSIG_IMPLANT_ACTIVATED, cause, imp_in) return /obj/item/bio_chip/ui_action_click() @@ -200,6 +201,7 @@ if(user) add_attack_logs(user, source, "Chipped with [src]") + SEND_SIGNAL(src, COMSIG_IMPLANT_IMPLANTED, source, user, force) return 1 /** @@ -237,6 +239,7 @@ unregister_emotes() + SEND_SIGNAL(src, COMSIG_IMPLANT_REMOVED, source) return TRUE /obj/item/bio_chip/dropped(mob/user) diff --git a/code/game/objects/items/weapons/bio_chips/bio_chip_deathrattle.dm b/code/game/objects/items/weapons/bio_chips/bio_chip_deathrattle.dm new file mode 100644 index 000000000000..7370cb4d0bf3 --- /dev/null +++ b/code/game/objects/items/weapons/bio_chips/bio_chip_deathrattle.dm @@ -0,0 +1,76 @@ +/datum/deathrattle_group + var/name + var/list/implants = list() + +/datum/deathrattle_group/New(name) + if(name) + src.name = name + else + // Give the group a unique name for debugging, and possible future + // use for making custom linked groups. + src.name = "[rand(100, 999)] [pick(GLOB.phonetic_alphabet)]" + +/* + * Proc called by new implant being added to the group. Listens for the + * implant being implanted, removed and destroyed. + * + * If implant is already implanted in a person, then trigger the implantation + * code. + */ +/datum/deathrattle_group/proc/register(obj/item/bio_chip/deathrattle/implant) + if(implant in implants) + return + RegisterSignal(implant, COMSIG_PARENT_QDELETING, PROC_REF(on_implant_destruction)) + RegisterSignal(implant, COMSIG_IMPLANT_ACTIVATED, PROC_REF(on_user_death)) + + implants += implant + + +/datum/deathrattle_group/proc/on_implant_destruction(obj/item/bio_chip/implant) + SIGNAL_HANDLER + + implants -= implant + +/datum/deathrattle_group/proc/on_user_death(obj/item/bio_chip/implant, source, mob/owner) + SIGNAL_HANDLER + var/victim_name = owner.mind ? owner.mind.name : owner.real_name + // All "hearers" hear the same sound. + var/sound = pick( + 'sound/items/knell1.ogg', + 'sound/items/knell2.ogg', + 'sound/items/knell3.ogg', + 'sound/items/knell4.ogg', + ) + + + for(var/obj/item/bio_chip/deathrattle/other_implant as anything in implants) + + // Skip the unfortunate soul, and any unimplanted implants + if(implant == other_implant || !implant.imp_in) + continue + + var/mob/living/recipient = other_implant.imp_in + to_chat(recipient, "You hear a strange, robotic voice in your head... \"[victim_name] has died...\"") + recipient.playsound_local(get_turf(recipient), sound, vol = 75, vary = FALSE, pressure_affected = FALSE, use_reverb = FALSE) + qdel(implant) + +/obj/item/bio_chip/deathrattle + name = "deathrattle implant" + desc = "Hope no one else dies, prepare for when they do." + activated = BIOCHIP_ACTIVATED_PASSIVE + trigger_causes = BIOCHIP_TRIGGER_DEATH_ONCE + implant_data = /datum/implant_fluff/deathrattle + implant_state = "implant-nanotrasen" + + actions_types = null + +/obj/item/bio_chip/deathrattle/emp_act(severity) + activate("emp") + +/obj/item/bio_chip/deathrattle/death_trigger(mob/source, gibbed) + activate("death") + +/obj/item/bio_chip_case/deathrattle + name = "implant case - 'Deathrattle'" + desc = "A glass case containing a deathrattle implant." + implant_type = /obj/item/bio_chip/deathrattle diff --git a/code/game/objects/items/weapons/bio_chips/bio_chip_fluff.dm b/code/game/objects/items/weapons/bio_chips/bio_chip_fluff.dm index 8a613070cfb2..789198dc093d 100644 --- a/code/game/objects/items/weapons/bio_chips/bio_chip_fluff.dm +++ b/code/game/objects/items/weapons/bio_chips/bio_chip_fluff.dm @@ -134,3 +134,8 @@ life = "Unknown. No collected sample has been active long enough to determine lifespan." notes = "Manually activated by the user." function = "Allows the user to summon a box from a bluespace pocket located inside the implant. The exterior of this box is lined with experimental cloaking panels which render the box invisible to the naked eye." + +/datum/implant_fluff/deathrattle + name = "BioTech Solutions \"Dead Ringer\" Death Ratttle Bio-chip" + notes = "Alerts implanted crew to crewmember death." + function = "Contains a compact radio signaler that triggers when the host's lifesigns cease, only sent to other implanted in the group." diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 36943a3b93b3..b8e166396aaf 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -48,9 +48,15 @@ /obj/item/storage/box/survival/populate_contents() new /obj/item/clothing/mask/breath(src) - new /obj/item/tank/internals/emergency_oxygen(src) - new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) - new /obj/item/flashlight/flare/glowstick/emergency(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS)) + new /obj/item/tank/internals/emergency_oxygen/engi(src) + new /obj/item/reagent_containers/hypospray/autoinjector/survival(src) + new /obj/item/flashlight/flare(src) + else + new /obj/item/tank/internals/emergency_oxygen(src) + new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) + new /obj/item/flashlight/flare/glowstick/emergency(src) + /obj/item/storage/box/survival_vox icon_state = "vox_box" @@ -58,8 +64,12 @@ /obj/item/storage/box/survival_vox/populate_contents() new /obj/item/clothing/mask/breath/vox(src) new /obj/item/tank/internals/emergency_oxygen/nitrogen(src) - new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) - new /obj/item/flashlight/flare/glowstick/emergency(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS)) + new /obj/item/reagent_containers/hypospray/autoinjector/survival(src) + new /obj/item/flashlight/flare(src) + else + new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) + new /obj/item/flashlight/flare/glowstick/emergency(src) /obj/item/storage/box/survival_plasmaman icon_state = "plasma_box" @@ -67,26 +77,40 @@ /obj/item/storage/box/survival_plasmaman/populate_contents() new /obj/item/clothing/mask/breath(src) new /obj/item/tank/internals/emergency_oxygen/plasma(src) - new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) - new /obj/item/flashlight/flare/glowstick/emergency(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS)) + new /obj/item/reagent_containers/hypospray/autoinjector/survival(src) + new /obj/item/flashlight/flare(src) + else + new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) + new /obj/item/flashlight/flare/glowstick/emergency(src) /obj/item/storage/box/engineer icon_state = "eng_box" /obj/item/storage/box/engineer/populate_contents() new /obj/item/clothing/mask/breath(src) - new /obj/item/tank/internals/emergency_oxygen/engi(src) - new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) - new /obj/item/flashlight/flare/glowstick/emergency(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS)) + new /obj/item/tank/internals/emergency_oxygen/double(src) + new /obj/item/reagent_containers/hypospray/autoinjector/survival(src) + new /obj/item/flashlight/flare(src) + else + new /obj/item/tank/internals/emergency_oxygen/engi(src) + new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) + new /obj/item/flashlight/flare/glowstick/emergency(src) /obj/item/storage/box/survival_mining icon_state = "min_box" /obj/item/storage/box/survival_mining/populate_contents() new /obj/item/clothing/mask/gas/explorer(src) - new /obj/item/tank/internals/emergency_oxygen/engi(src) - new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) - new /obj/item/flashlight/flare/glowstick/emergency(src) + if(HAS_TRAIT(SSstation, STATION_TRAIT_PREMIUM_INTERNALS)) + new /obj/item/tank/internals/emergency_oxygen/double(src) + new /obj/item/reagent_containers/hypospray/autoinjector/survival(src) + new /obj/item/flashlight/flare(src) + else + new /obj/item/tank/internals/emergency_oxygen/engi(src) + new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src) + new /obj/item/flashlight/flare/glowstick/emergency(src) /obj/item/storage/box/survival_syndi icon_state = "syndi_box" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 637ddfeb4e82..eb5c03c7d01b 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -109,7 +109,8 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/outfit_manager, /client/proc/cmd_admin_headset_message, /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ - /client/proc/change_human_appearance_self /* Allows the human-based mob itself to change its basic appearance */ + /client/proc/change_human_appearance_self, /* Allows the human-based mob itself to change its basic appearance */ + /datum/admins/proc/station_traits_panel )) GLOBAL_LIST_INIT(admin_verbs_spawn, list( diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 7ac0273ec5cb..50e6ed0066de 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -47,6 +47,8 @@ var/light_range_on = 1 var/light_power_on = 0.5 + /// Do we drop contents on destroy? + var/drop_contents_on_delete = TRUE /obj/machinery/smartfridge/Initialize(mapload) . = ..() @@ -92,8 +94,9 @@ /obj/machinery/smartfridge/Destroy() SStgui.close_uis(wires) QDEL_NULL(wires) - for(var/atom/movable/A in contents) - A.forceMove(loc) + if(drop_contents_on_delete) + for(var/atom/movable/A in contents) + A.forceMove(loc) return ..() /obj/machinery/smartfridge/process() @@ -527,6 +530,9 @@ /obj/machinery/smartfridge/secure/circuits/aiupload/Initialize(mapload) . = ..() req_access_txt = "[ACCESS_AI_UPLOAD]" + if(mapload && HAS_TRAIT(SSstation, STATION_TRAIT_UNIQUE_AI) && is_station_level(z)) + drop_contents_on_delete = FALSE + return INITIALIZE_HINT_QDEL /obj/machinery/smartfridge/secure/circuits/aiupload/experimental name = "\improper Experimental Laws Storage" diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index 5b2c8bd74a05..8eed8473919b 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -138,3 +138,6 @@ /obj/item/organ/internal/regenerative_core/legion/preserved(implanted = 0) ..() desc = "[src] has been stabilized. It is preserved, allowing you to use it to heal completely without danger of decay." + +/obj/item/organ/internal/regenerative_core/legion/already_preserved + preserved = TRUE diff --git a/code/modules/mob/living/silicon/silicon_laws.dm b/code/modules/mob/living/silicon/silicon_laws.dm index f6ad59bd794e..af3385c28f12 100644 --- a/code/modules/mob/living/silicon/silicon_laws.dm +++ b/code/modules/mob/living/silicon/silicon_laws.dm @@ -126,7 +126,9 @@ laws.sort_laws() /mob/living/silicon/proc/make_laws() - if(GLOB.configuration.general.random_ai_lawset) + if(HAS_TRAIT(SSstation, STATION_TRAIT_UNIQUE_AI)) + laws = pick_unique_lawset() + else if(GLOB.configuration.general.random_ai_lawset) laws = get_random_lawset() else laws = new /datum/ai_laws/crewsimov() @@ -140,3 +142,15 @@ continue law_options += L return pick(law_options) + +///returns a random non starting / kill crew lawset if the station has a unique ai lawset +/proc/pick_unique_lawset() + var/list/law_options = list() + var/paths = subtypesof(/datum/ai_laws) + for(var/law in paths) + var/datum/ai_laws/L = new law + if(!L.unique_ai) + continue + law_options += L + return pick(law_options) + diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index d702d7c42d29..5eed02aed764 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -55,6 +55,8 @@ deploy_the_cats() /mob/living/simple_animal/pet/cat/Runtime/persistent_save() + if(SEND_SIGNAL(src, COMSIG_LIVING_WRITE_MEMORY) & COMPONENT_DONT_WRITE_MEMORY) + return FALSE write_memory(FALSE) /mob/living/simple_animal/pet/cat/Runtime/make_babies() diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index ef65ddf6872e..8195b998a4db 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -486,6 +486,8 @@ turns_per_move = 20 /mob/living/simple_animal/pet/dog/corgi/Ian/persistent_save() + if(SEND_SIGNAL(src, COMSIG_LIVING_WRITE_MEMORY) & COMPONENT_DONT_WRITE_MEMORY) + return FALSE write_memory(FALSE) /mob/living/simple_animal/pet/dog/corgi/Ian/proc/read_memory() diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 9eef8ca439a6..63f1eafa4587 100644 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -369,12 +369,14 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/play_ringtone() var/S - - if(ttone in ttone_sound) - S = ttone_sound[ttone] + if(HAS_TRAIT(SSstation, STATION_TRAIT_PDA_GLITCHED)) + playsound(src, pick('sound/machines/twobeep_voice1.ogg', 'sound/machines/twobeep_voice2.ogg'), 50, TRUE) else - S = 'sound/machines/twobeep_high.ogg' - playsound(loc, S, 50, 1) + if(ttone in ttone_sound) + S = ttone_sound[ttone] + else + S = 'sound/machines/twobeep_high.ogg' + playsound(loc, S, 50, TRUE) for(var/mob/O in hearers(3, loc)) O.show_message(text("[bicon(src)] *[ttone]*")) diff --git a/code/modules/projectiles/guns/energy/special_eguns.dm b/code/modules/projectiles/guns/energy/special_eguns.dm index dbc6aabf1ac9..44c34958eae0 100644 --- a/code/modules/projectiles/guns/energy/special_eguns.dm +++ b/code/modules/projectiles/guns/energy/special_eguns.dm @@ -19,6 +19,11 @@ flight_x_offset = 17 flight_y_offset = 9 +/obj/item/gun/energy/ionrifle/Initialize(mapload) + . = ..() + if(mapload && HAS_TRAIT(SSstation, STATION_TRAIT_CYBERNETIC_REVOLUTION) && is_station_level(z)) //No ion rifle when everyone has cybernetic organs, sorry! + return INITIALIZE_HINT_QDEL + /obj/item/gun/energy/ionrifle/emp_act(severity) return diff --git a/code/modules/supply/supply_console.dm b/code/modules/supply/supply_console.dm index 863be663631c..3d978149b1f2 100644 --- a/code/modules/supply/supply_console.dm +++ b/code/modules/supply/supply_console.dm @@ -104,7 +104,7 @@ "supply_type" = order.object.name, "orderedby" = order.orderedby, "department" = order.ordered_by_department?.department_name, - "cost" = order.object.cost, + "cost" = order.object.get_cost(), "comment" = order.comment, "req_cargo_approval" = order.requires_cargo_approval, "req_head_approval" = order.requires_head_approval, @@ -214,7 +214,7 @@ if((pack.hidden && hacked) || (pack.contraband && can_order_contraband) || (pack.special && pack.special_enabled) || (!pack.contraband && !pack.hidden && !pack.special)) packs_list.Add(list(list( "name" = pack.name, - "cost" = pack.cost, + "cost" = pack.get_cost(), "ref" = "[pack.UID()]", "contents" = pack.ui_manifest, "cat" = pack.group))) @@ -333,12 +333,12 @@ order.orderedbyaccount = selected_account if(attempt_account_authentification(selected_account, user)) var/paid_for = FALSE - if(!order.requires_cargo_approval && pay_with_account(selected_account, order.object.cost, "[order.object.name] Crate Purchase", "Cargo Requests Console", user, account_database.vendor_account)) + if(!order.requires_cargo_approval && pay_with_account(selected_account, order.object.get_cost(), "[order.object.name] Crate Purchase", "Cargo Requests Console", user, account_database.vendor_account)) paid_for = TRUE SSeconomy.process_supply_order(order, paid_for) //add order to shopping list else //if its a department account with pin or higher security or need QM approval, go ahead and add this to the departments section in request list SSeconomy.process_supply_order(order, FALSE) - if(order.ordered_by_department.crate_auto_approve && order.ordered_by_department.auto_approval_cap >= order.object.cost) + if(order.ordered_by_department.crate_auto_approve && order.ordered_by_department.auto_approval_cap >= order.object.get_cost()) approve_crate(user, order.ordernum) investigate_log("| [key_name(user)] has placed an order for [order.object.amount] [order.object.name] with reason: '[order.comment]'", "cargo") @@ -355,7 +355,7 @@ return FALSE order.requires_cargo_approval = FALSE if(account.account_type == ACCOUNT_TYPE_PERSONAL || isnull(order.ordered_by_department)) - if(pay_with_account(account, order.object.cost, "[pack.name] Crate Purchase", "Cargo Requests Console", user, account_database.vendor_account)) + if(pay_with_account(account, order.object.get_cost(), "[pack.name] Crate Purchase", "Cargo Requests Console", user, account_database.vendor_account)) SSeconomy.process_supply_order(order, TRUE) //send 'er back through return TRUE atom_say("ERROR: Account tied to order cannot pay, auto-denying order") @@ -368,12 +368,12 @@ //if they do not have access to this account if(!department_order.ordered_by_department.has_account_access(user.get_access(), user.get_worn_id_account())) //and the dept account doesn't have auto approve enabled (or does and the crate is too expensive for auto approve) - if(!department_order.ordered_by_department.crate_auto_approve || department_order.ordered_by_department.auto_approval_cap < pack.cost) + if(!department_order.ordered_by_department.crate_auto_approve || department_order.ordered_by_department.auto_approval_cap < pack.get_cost()) return //no access! ///just give the account pin here, its too much work for players to get the department account pin number since approval is access locked anyway if(attempt_account_authentification(account, user, account.account_pin)) - if(pay_with_account(account, pack.cost, "[pack.name] Crate Purchase", "[src]", user, account_database.vendor_account)) + if(pay_with_account(account, pack.get_cost(), "[pack.name] Crate Purchase", "[src]", user, account_database.vendor_account)) order.requires_head_approval = FALSE SSeconomy.process_supply_order(order, TRUE) investigate_log("| [key_name(user)] has authorized an order for [pack.name]. Remaining Cargo Balance: [cargo_account.credit_balance].", "cargo") @@ -418,7 +418,7 @@ SSshuttle.supply.request(SSshuttle.getDock("supply_home")) /obj/machinery/computer/supplycomp/proc/pay_for_crate(datum/money_account/customer_account, mob/user, datum/supply_order/order) - if(pay_with_account(customer_account, order.object.cost, "Purchase of [order.object.name]", "Cargo Requests Console", user, cargo_account, TRUE)) + if(pay_with_account(customer_account, order.object.get_cost(), "Purchase of [order.object.name]", "Cargo Requests Console", user, cargo_account, TRUE)) return TRUE return FALSE diff --git a/code/modules/supply/supply_order.dm b/code/modules/supply/supply_order.dm index bd3df469c3d2..d3c7de1f56f2 100644 --- a/code/modules/supply/supply_order.dm +++ b/code/modules/supply/supply_order.dm @@ -34,7 +34,7 @@ //create the manifest slip var/obj/item/paper/manifest/slip = new - slip.points = object.cost + slip.points = object.get_cost() slip.ordernumber = ordernum var/stationName = station_name() diff --git a/code/modules/supply/supply_pack.dm b/code/modules/supply/supply_pack.dm index 405553186d56..142dd01350ac 100644 --- a/code/modules/supply/supply_pack.dm +++ b/code/modules/supply/supply_pack.dm @@ -59,3 +59,6 @@ if(length(contains)) for(var/j in 1 to num_contained) . += pick(contains) + +/datum/supply_packs/proc/get_cost() + return cost * SSeconomy.pack_price_modifier diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 11a274d816d6..4231ecd31dbc 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -387,7 +387,12 @@ user.changeNext_move(CLICK_CD_MELEE) var/obj/machinery/power/apc/A = target var/mob/living/carbon/human/H = user - if(H.get_int_organ(/obj/item/organ/internal/cell)) + if(H.get_int_organ(/obj/item/organ/internal/cell) || H.get_int_organ(/obj/item/organ/internal/heart)) + var/obj/item/organ/internal/heart/robotic = H.get_int_organ(/obj/item/organ/internal/heart) + if(robotic) + if(!(robotic.status & ORGAN_ROBOT) && !H.get_int_organ(/obj/item/organ/internal/heart/demon/pulse)) + to_chat(user, "You lack a cell in which to store charge!") + return if(A.emagged || A.stat & BROKEN) do_sparks(3, 1, A) to_chat(H, "The APC power currents surge erratically, damaging your chassis!") diff --git a/paradise.dme b/paradise.dme index 4bae58ae29c4..6a9923c00458 100644 --- a/paradise.dme +++ b/paradise.dme @@ -98,6 +98,7 @@ #include "code\__DEFINES\sound_defines.dm" #include "code\__DEFINES\spell_defines.dm" #include "code\__DEFINES\stat.dm" +#include "code\__DEFINES\station_defines.dm" #include "code\__DEFINES\station_goals.dm" #include "code\__DEFINES\status_effects.dm" #include "code\__DEFINES\subsystems.dm" @@ -311,6 +312,7 @@ #include "code\controllers\subsystem\processing\obj.dm" #include "code\controllers\subsystem\processing\processing.dm" #include "code\controllers\subsystem\processing\projectiles.dm" +#include "code\controllers\subsystem\processing\SSstation.dm" #include "code\controllers\subsystem\processing\transittube.dm" #include "code\controllers\subsystem\tickets\mentor_tickets.dm" #include "code\controllers\subsystem\tickets\tickets.dm" @@ -557,6 +559,11 @@ #include "code\datums\spells\alien_spells\regurgitate.dm" #include "code\datums\spells\alien_spells\transfer_plasma.dm" #include "code\datums\spells\alien_spells\whisper.dm" +#include "code\datums\station_traits\_station_trait.dm" +#include "code\datums\station_traits\admin_panel.dm" +#include "code\datums\station_traits\negative_traits.dm" +#include "code\datums\station_traits\neutral_traits.dm" +#include "code\datums\station_traits\postive_traits.dm" #include "code\datums\status_effects\blob_burst.dm" #include "code\datums\status_effects\buffs.dm" #include "code\datums\status_effects\debuffs.dm" @@ -565,6 +572,7 @@ #include "code\datums\status_effects\status_effect.dm" #include "code\datums\uplink_items\uplink_general.dm" #include "code\datums\uplink_items\uplink_nuclear.dm" +#include "code\datums\uplink_items\uplink_special.dm" #include "code\datums\uplink_items\uplink_traitor.dm" #include "code\datums\weather\weather_datum.dm" #include "code\datums\weather\weather_types\ash_storm.dm" @@ -1108,6 +1116,7 @@ #include "code\game\objects\items\weapons\bio_chips\bio_chip_case.dm" #include "code\game\objects\items\weapons\bio_chips\bio_chip_chem.dm" #include "code\game\objects\items\weapons\bio_chips\bio_chip_death_alarm.dm" +#include "code\game\objects\items\weapons\bio_chips\bio_chip_deathrattle.dm" #include "code\game\objects\items\weapons\bio_chips\bio_chip_dust.dm" #include "code\game\objects\items\weapons\bio_chips\bio_chip_emp.dm" #include "code\game\objects\items\weapons\bio_chips\bio_chip_explosive.dm" diff --git a/sound/items/knell1.ogg b/sound/items/knell1.ogg new file mode 100644 index 000000000000..3612ba651fcc Binary files /dev/null and b/sound/items/knell1.ogg differ diff --git a/sound/items/knell2.ogg b/sound/items/knell2.ogg new file mode 100644 index 000000000000..58a7531e3c23 Binary files /dev/null and b/sound/items/knell2.ogg differ diff --git a/sound/items/knell3.ogg b/sound/items/knell3.ogg new file mode 100644 index 000000000000..e5c4f3944d82 Binary files /dev/null and b/sound/items/knell3.ogg differ diff --git a/sound/items/knell4.ogg b/sound/items/knell4.ogg new file mode 100644 index 000000000000..cf30f2837bf3 Binary files /dev/null and b/sound/items/knell4.ogg differ diff --git a/sound/machines/twobeep_voice1.ogg b/sound/machines/twobeep_voice1.ogg new file mode 100644 index 000000000000..1dcaebf7f907 Binary files /dev/null and b/sound/machines/twobeep_voice1.ogg differ diff --git a/sound/machines/twobeep_voice2.ogg b/sound/machines/twobeep_voice2.ogg new file mode 100644 index 000000000000..e8a6c3be58c2 Binary files /dev/null and b/sound/machines/twobeep_voice2.ogg differ diff --git a/tgui/packages/tgui/interfaces/StationTraitsPanel.js b/tgui/packages/tgui/interfaces/StationTraitsPanel.js new file mode 100644 index 000000000000..751474703007 --- /dev/null +++ b/tgui/packages/tgui/interfaces/StationTraitsPanel.js @@ -0,0 +1,242 @@ +import { filterMap } from './common/collections'; +import { exhaustiveCheck } from './common/exhaustive'; +import { useBackend, useLocalState } from '../backend'; +import { Box, Button, Divider, Dropdown, Flex, Tabs } from '../components'; +import { Window } from '../layouts'; + +let Tab; +(function (Tab) { + Tab[(Tab['SetupFutureStationTraits'] = 0)] = 'SetupFutureStationTraits'; + Tab[(Tab['ViewStationTraits'] = 1)] = 'ViewStationTraits'; +})(Tab || (Tab = {})); + +const FutureStationTraitsPage = (props, context) => { + const { act, data } = useBackend(context); + const { future_station_traits } = data; + + const [selectedTrait, setSelectedTrait] = useLocalState( + context, + 'selectedFutureTrait', + null + ); + + const traitsByName = Object.fromEntries( + data.valid_station_traits.map((trait) => { + return [trait.name, trait.path]; + }) + ); + + const traitNames = Object.keys(traitsByName); + traitNames.sort(); + + return ( + + + + + + + + + + + + + + {Array.isArray(future_station_traits) ? ( + future_station_traits.length > 0 ? ( + + {future_station_traits.map((trait) => ( +
+ + + {trait.name} + + + + + + +
+ ))} +
+ ) : ( + <> + No station traits will run next round. + + + + + + ) + ) : ( + <> + No future station traits are planned. + + + + + + )} +
+ ); +}; + +const ViewStationTraitsPage = (props, context) => { + const { act, data } = useBackend(context); + + return data.current_traits.length > 0 ? ( + + {data.current_traits.map((stationTrait) => ( +
+ + + {stationTrait.name} + + + + act('revert', { + ref: stationTrait.ref, + }) + } + /> + + + +
+ ))} +
+ ) : ( + There are no active station traits. + ); +}; + +export const StationTraitsPanel = (props, context) => { + const [currentTab, setCurrentTab] = useLocalState( + context, + 'station_traits_tab', + Tab.ViewStationTraits + ); + + let currentPage; + + switch (currentTab) { + case Tab.SetupFutureStationTraits: + currentPage = ; + break; + case Tab.ViewStationTraits: + currentPage = ; + break; + default: + exhaustiveCheck(currentTab); + } + + return ( + + + + setCurrentTab(Tab.ViewStationTraits)} + > + View + + + setCurrentTab(Tab.SetupFutureStationTraits)} + > + Edit + + + + + + {currentPage} + + + ); +}; diff --git a/tgui/packages/tgui/interfaces/common/collections.js b/tgui/packages/tgui/interfaces/common/collections.js new file mode 100644 index 000000000000..f5c2ebb47eaa --- /dev/null +++ b/tgui/packages/tgui/interfaces/common/collections.js @@ -0,0 +1,315 @@ +/** + * @file + * @copyright 2020 Aleksej Komarov + * @license MIT + */ + +/** + * Iterates over elements of collection, returning an array of all elements + * iteratee returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * If collection is 'null' or 'undefined', it will be returned "as is" + * without emitting any errors (which can be useful in some cases). + */ +export const filter = (iterateeFn) => (collection) => { + if (collection === null || collection === undefined) { + return collection; + } + if (Array.isArray(collection)) { + const result = []; + for (let i = 0; i < collection.length; i++) { + const item = collection[i]; + if (iterateeFn(item, i, collection)) { + result.push(item); + } + } + return result; + } + throw new Error(`filter() can't iterate on type ${typeof collection}`); +}; + +/** + * Creates an array of values by running each element in collection + * thru an iteratee function. The iteratee is invoked with three + * arguments: (value, index|key, collection). + * + * If collection is 'null' or 'undefined', it will be returned "as is" + * without emitting any errors (which can be useful in some cases). + */ +export const map = (iterateeFn) => (collection) => { + if (collection === null || collection === undefined) { + return collection; + } + + if (Array.isArray(collection)) { + return collection.map(iterateeFn); + } + + if (typeof collection === 'object') { + return Object.entries(collection).map(([key, value]) => { + return iterateeFn(value, key, collection); + }); + } + + throw new Error(`map() can't iterate on type ${typeof collection}`); +}; + +/** + * Given a collection, will run each element through an iteratee function. + * Will then filter out undefined values. + */ +export const filterMap = (collection, iterateeFn) => { + const finalCollection = []; + + for (const value of collection) { + const output = iterateeFn(value); + if (output !== undefined) { + finalCollection.push(output); + } + } + + return finalCollection; +}; + +const COMPARATOR = (objA, objB) => { + const criteriaA = objA.criteria; + const criteriaB = objB.criteria; + const length = criteriaA.length; + for (let i = 0; i < length; i++) { + const a = criteriaA[i]; + const b = criteriaB[i]; + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + } + return 0; +}; + +/** + * Creates an array of elements, sorted in ascending order by the results + * of running each element in a collection thru each iteratee. + * + * Iteratees are called with one argument (value). + */ +export const sortBy = + (...iterateeFns) => + (array) => { + if (!Array.isArray(array)) { + return array; + } + let length = array.length; + // Iterate over the array to collect criteria to sort it by + let mappedArray = []; + for (let i = 0; i < length; i++) { + const value = array[i]; + mappedArray.push({ + criteria: iterateeFns.map((fn) => fn(value)), + value, + }); + } + // Sort criteria using the base comparator + mappedArray.sort(COMPARATOR); + + // Unwrap values + const values = []; + while (length--) { + values[length] = mappedArray[length].value; + } + return values; + }; + +export const sort = sortBy(); + +export const sortStrings = sortBy(); + +/** + * Returns a range of numbers from start to end, exclusively. + * For example, range(0, 5) will return [0, 1, 2, 3, 4]. + */ +export const range = (start, end) => + new Array(end - start).fill(null).map((_, index) => index + start); + +/** + * A fast implementation of reduce. + */ +export const reduce = (reducerFn, initialValue) => (array) => { + const length = array.length; + let i; + let result; + if (initialValue === undefined) { + i = 1; + result = array[0]; + } else { + i = 0; + result = initialValue; + } + for (; i < length; i++) { + result = reducerFn(result, array[i], i, array); + } + return result; +}; + +/** + * Creates a duplicate-free version of an array, using SameValueZero for + * equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. + * + * It accepts iteratee which is invoked for each element in array to generate + * the criterion by which uniqueness is computed. The order of result values + * is determined by the order they occur in the array. The iteratee is + * invoked with one argument: value. + */ +export const uniqBy = (iterateeFn) => (array) => { + const { length } = array; + const result = []; + const seen = iterateeFn ? [] : result; + let index = -1; + // prettier-ignore + outer: + while (++index < length) { + let value = array[index]; + const computed = iterateeFn ? iterateeFn(value) : value; + if (computed === computed) { + let seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iterateeFn) { + seen.push(computed); + } + result.push(value); + } else if (!seen.includes(computed)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +}; + +export const uniq = uniqBy(); + +/** + * Creates an array of grouped elements, the first of which contains + * the first elements of the given arrays, the second of which contains + * the second elements of the given arrays, and so on. + */ +export const zip = (...arrays) => { + if (arrays.length === 0) { + return []; + } + const numArrays = arrays.length; + const numValues = arrays[0].length; + const result = []; + for (let valueIndex = 0; valueIndex < numValues; valueIndex++) { + const entry = []; + for (let arrayIndex = 0; arrayIndex < numArrays; arrayIndex++) { + entry.push(arrays[arrayIndex][valueIndex]); + } + + // I tried everything to remove this any, and have no idea how to do it. + result.push(entry); + } + return result; +}; + +/** + * This method is like "zip" except that it accepts iteratee to + * specify how grouped values should be combined. The iteratee is + * invoked with the elements of each group. + */ +export const zipWith = + (iterateeFn) => + (...arrays) => { + return map((values) => iterateeFn(...values))(zip(...arrays)); + }; + +const binarySearch = (getKey, collection, inserting) => { + if (collection.length === 0) { + return 0; + } + + const insertingKey = getKey(inserting); + + let [low, high] = [0, collection.length]; + + // Because we have checked if the collection is empty, it's impossible + // for this to be used before assignment. + let compare; + let middle = 0; + + while (low < high) { + middle = (low + high) >> 1; + + compare = getKey(collection[middle]); + + if (compare < insertingKey) { + low = middle + 1; + } else if (compare === insertingKey) { + return middle; + } else { + high = middle; + } + } + + return compare > insertingKey ? middle : middle + 1; +}; + +export const binaryInsertWith = (getKey) => (collection, value) => { + const copy = [...collection]; + copy.splice(binarySearch(getKey, collection, value), 0, value); + return copy; +}; + +/** + * This method takes a collection of items and a number, returning a collection + * of collections, where the maximum amount of items in each is that second arg + */ +export const paginate = (collection, maxPerPage) => { + const pages = []; + let page = []; + let itemsToAdd = maxPerPage; + + for (const item of collection) { + page.push(item); + itemsToAdd--; + if (!itemsToAdd) { + itemsToAdd = maxPerPage; + pages.push(page); + page = []; + } + } + if (page.length) { + pages.push(page); + } + return pages; +}; + +const isObject = (obj) => typeof obj === 'object' && obj !== null; + +// Does a deep merge of two objects. DO NOT FEED CIRCULAR OBJECTS!! +export const deepMerge = (...objects) => { + const target = {}; + for (const object of objects) { + for (const key of Object.keys(object)) { + const targetValue = target[key]; + const objectValue = object[key]; + if (Array.isArray(targetValue) && Array.isArray(objectValue)) { + target[key] = [...targetValue, ...objectValue]; + } else if (isObject(targetValue) && isObject(objectValue)) { + target[key] = deepMerge(targetValue, objectValue); + } else { + target[key] = objectValue; + } + } + } + return target; +}; diff --git a/tgui/packages/tgui/interfaces/common/exhaustive.js b/tgui/packages/tgui/interfaces/common/exhaustive.js new file mode 100644 index 000000000000..99848610d116 --- /dev/null +++ b/tgui/packages/tgui/interfaces/common/exhaustive.js @@ -0,0 +1,19 @@ +/** + * Throws an error such that a non-exhaustive check will error at compile time + * when using TypeScript, rather than at runtime. + * + * For example: + * enum Color { Red, Green, Blue } + * switch (color) { + * case Color.Red: + * return "red"; + * case Color.Green: + * return "green"; + * default: + * // This will error at compile time that we forgot blue. + * exhaustiveCheck(color); + * } + */ +export const exhaustiveCheck = (input) => { + throw new Error(`Unhandled case: ${input}`); +}; diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index b99053a0bcc8..629192533fcf 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -1,5 +1,10 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=233)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(235);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.deleteLocalState=t.backendUpdate=t.backendSetSharedState=t.backendReducer=t.backendDeleteSharedState=void 0;var o=n(33),r=n(43);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var a=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=a;var c=function(e){return{type:"backend/deleteSharedState",payload:e}};t.backendDeleteSharedState=c;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var a=Object.assign({},e.config,o.config),c=Object.assign({},e.data,o.static_data,o.data),i=Object.assign({},e.shared);if(o.shared)for(var l=0,d=Object.keys(o.shared);l1?n-1:0),r=1;rn?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,a=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(a>0)),(r?e:Math.round(e))/n);var n,o,r,a};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";t.__esModule=!0,t.unit=t.halfUnit=t.computeBoxProps=t.computeBoxClassName=t.Box=void 0;var o=n(10),r=n(0),a=n(508),c=n(43),i=["as","className","children"];var l=function(e){return"string"==typeof e?e:"number"==typeof e?12*e+"px":void 0};t.unit=l;var d=function(e){return"string"==typeof e?e:"number"==typeof e?12*e*.5+"px":void 0};t.halfUnit=d;var u=function(e){return"string"==typeof e&&c.CSS_COLORS.includes(e)},s=function(e){return function(t,n){(0,o.isFalsy)(n)||(t[e]=n)}},m=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t(r))}},p=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t)}},h=function(e,t,n){return function(r,a){if(!(0,o.isFalsy)(a))for(var c=0;c0&&(t.style=l),t};t.computeBoxProps=N;var b=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,o.classes)([u(t)&&"color-"+t,u(n)&&"color-bg-"+n])};t.computeBoxClassName=b;var V=function(e){var t=e.as,n=void 0===t?"div":t,o=e.className,c=e.children,l=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);if("function"==typeof c)return c(N(e));var d="string"==typeof o?o+" "+b(l):b(l),u=N(l);return(0,r.createVNode)(a.VNodeFlags.HtmlElement,n,d,c,a.ChildFlags.UnknownChildren,u)};t.Box=V,V.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";var o=n(41);e.exports=function(e){return o(e.length)}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(50),c=n(132),i=n(130);e.exports=function(e,t,n,l){var d=!!l&&!!l.unsafe,u=!!l&&!!l.enumerable,s=!!l&&!!l.noTargetGet,m=l&&l.name!==undefined?l.name:t;return r(n)&&c(n,m,l),e===o?(u?e[t]=n:i(t,n),e):(d?!s&&e[t]&&(u=!0):delete e[t],u?e[t]=n:a(e,t,n),e)}},function(e,t,n){"use strict";var o=n(60),r=n(7),a=n(85),c=n(19),i=n(23),l=n(91),d=r([].push),u=function(e){var t=1==e,n=2==e,r=3==e,u=4==e,s=6==e,m=7==e,p=5==e||s;return function(h,f,C,N){for(var b,V,g=c(h),v=a(g),y=o(f,C),_=i(v),x=0,k=N||l,L=t?k(h,_):n||m?k(h,0):undefined;_>x;x++)if((p||x in v)&&(V=y(b=v[x],x,g),e))if(t)L[x]=V;else if(V)switch(e){case 3:return!0;case 5:return b;case 6:return x;case 2:d(L,b)}else switch(e){case 4:return!1;case 7:d(L,b)}return s?-1:r||u?u:L}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},function(e,t,n){"use strict";var o=n(8),r=n(15),a=n(102),c=n(64),i=n(31),l=n(56),d=n(18),u=n(174),s=Object.getOwnPropertyDescriptor;t.f=o?s:function(e,t){if(e=i(e),t=l(t),u)try{return s(e,t)}catch(n){}if(d(e,t))return c(!r(a.f,e,t),e[t])}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(71),c=o.TypeError;e.exports=function(e){if(r(e))return e;throw c(a(e)+" is not a function")}},function(e,t,n){"use strict";t.__esModule=!0,t.modalRegisterBodyOverride=t.modalOpen=t.modalClose=t.modalAnswer=t.ComplexModal=void 0;var o=n(0),r=n(1),a=n(2),c={};t.modalOpen=function(e,t,n){var o=(0,r.useBackend)(e),a=o.act,c=o.data,i=Object.assign(c.modal?c.modal.args:{},n||{});a("modal_open",{id:t,arguments:JSON.stringify(i)})};t.modalRegisterBodyOverride=function(e,t){c[e]=t};var i=function(e,t,n,o){var a=(0,r.useBackend)(e),c=a.act,i=a.data;if(i.modal){var l=Object.assign(i.modal.args||{},o||{});c("modal_answer",{id:t,answer:n,arguments:JSON.stringify(l)})}};t.modalAnswer=i;var l=function(e,t){(0,(0,r.useBackend)(e).act)("modal_close",{id:t})};t.modalClose=l;t.ComplexModal=function(e,t){var n=(0,r.useBackend)(t).data;if(n.modal){var d,u,s=n.modal,m=s.id,p=s.text,h=s.type,f=(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),C="auto";if(c[m])u=c[m](n.modal,t);else if("input"===h){var N=n.modal.value;d=function(e){return i(t,m,N)},u=(0,o.createComponentVNode)(2,a.Input,{value:n.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(e,t){N=t}}),f=(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){return i(t,m,N)}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})}else if("choice"===h){var b="object"==typeof n.modal.choices?Object.values(n.modal.choices):n.modal.choices;u=(0,o.createComponentVNode)(2,a.Dropdown,{options:b,selected:n.modal.value,width:"100%",my:"0.5rem",onSelected:function(e){return i(t,m,e)}}),C="initial"}else"bento"===h?u=(0,o.createComponentVNode)(2,a.Flex,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:n.modal.choices.map((function(e,r){return(0,o.createComponentVNode)(2,a.Flex.Item,{flex:"1 1 auto",children:(0,o.createComponentVNode)(2,a.Button,{selected:r+1===parseInt(n.modal.value,10),onClick:function(){return i(t,m,r+1)},children:(0,o.createVNode)(1,"img",null,null,1,{src:e})})},r)}))}):"boolean"===h&&(f=(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:n.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){return i(t,m,0)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"check",content:n.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){return i(t,m,1)}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]}));return(0,o.createComponentVNode)(2,a.Modal,{maxWidth:e.maxWidth||window.innerWidth/2+"px",maxHeight:e.maxHeight||window.innerHeight/2+"px",onEnter:d,mx:"auto",overflowY:C,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:p}),u,f]})}}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=function(e){return r(e)?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e]):o[e]&&o[e][t]}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.toKeyedArray=t.toArray=t.sortBy=t.reduce=t.map=t.filter=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oi)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n"+l+""}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";t.__esModule=!0,t.computeFlexProps=t.computeFlexItemProps=t.FlexItem=t.Flex=void 0;var o=n(0),r=n(10),a=n(33),c=n(22),i=["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"],l=["className","grow","order","shrink","basis","align"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.direction,o=e.wrap,c=e.align,l=e.alignContent,u=e.justify,s=e.inline,m=e.spacing,p=void 0===m?0:m,h=e.spacingPrecise,f=void 0===h?0:h,C=d(e,i);return Object.assign({className:(0,r.classes)(["Flex",a.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),s&&"Flex--inline",p>0&&"Flex--spacing--"+p,f>0&&"Flex--spacingPrecise--"+f,t]),style:Object.assign({},C.style,{"flex-direction":n,"flex-wrap":o,"align-items":c,"align-content":l,"justify-content":u})},C)};t.computeFlexProps=u;var s=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},u(e))))};t.Flex=s,s.defaultHooks=r.pureComponentHooks;var m=function(e){var t=e.className,n=e.grow,o=e.order,i=e.shrink,u=e.basis,s=void 0===u?e.width:u,m=e.align,p=d(e,l);return Object.assign({className:(0,r.classes)(["Flex__item",a.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},p.style,{"flex-grow":n,"flex-shrink":i,"flex-basis":(0,c.unit)(s),order:o,"align-self":m})},p)};t.computeFlexItemProps=m;var p=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},m(e))))};t.FlexItem=p,p.defaultHooks=r.pureComponentHooks,s.Item=p},function(e,t,n){"use strict";var o,r,a,c=n(176),i=n(5),l=n(7),d=n(11),u=n(50),s=n(18),m=n(129),p=n(104),h=n(87),f=i.TypeError,C=i.WeakMap;if(c||m.state){var N=m.state||(m.state=new C),b=l(N.get),V=l(N.has),g=l(N.set);o=function(e,t){if(V(N,e))throw new f("Object already initialized");return t.facade=e,g(N,e,t),t},r=function(e){return b(N,e)||{}},a=function(e){return V(N,e)}}else{var v=p("state");h[v]=!0,o=function(e,t){if(s(e,v))throw new f("Object already initialized");return t.facade=e,u(e,v,t),t},r=function(e){return s(e,v)?e[v]:{}},a=function(e){return s(e,v)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!d(t)||(n=r(t)).type!==e)throw f("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:o)(t)}},function(e,t,n){"use strict";var o=n(40),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(5),r=n(18),a=n(13),c=n(19),i=n(104),l=n(142),d=i("IE_PROTO"),u=o.Object,s=u.prototype;e.exports=l?u.getPrototypeOf:function(e){var t=c(e);if(r(t,d))return t[d];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?s:null}},function(e,t,n){"use strict";t.__esModule=!0,t.timeAgo=t.getGasLabel=t.getGasColor=t.UI_UPDATE=t.UI_INTERACTIVE=t.UI_DISABLED=t.UI_CLOSE=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color};t.timeAgo=function(e,t){if(e>t)return"in the future";var n=(t/=10)-(e/=10);if(n>3600){var o=Math.round(n/3600);return o+" hour"+(1===o?"":"s")+" ago"}if(n>60){var r=Math.round(n/60);return r+" minute"+(1===r?"":"s")+" ago"}var a=Math.round(n);return a+" second"+(1===a?"":"s")+" ago"}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListItem=t.LabeledListDivider=t.LabeledList=void 0;var o=n(0),r=n(10),a=n(22),c=n(222),i=["className","label","labelColor","color","textAlign","verticalAlign","buttons","content","children","noColon"];var l=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.label,c=e.labelColor,l=void 0===c?"label":c,d=e.color,u=e.textAlign,s=e.verticalAlign,m=e.buttons,p=e.content,h=e.children,f=e.noColon,C=void 0!==f&&f,N=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),b=C?"":":";return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,a.Box,{as:"td",color:l,verticalAlign:s,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+b:null}),(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"td",color:d,textAlign:u,verticalAlign:s,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:m?undefined:2},N,{children:[p,h]}))),m&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",m,0)],0)};t.LabeledListItem=d,d.defaultHooks=r.pureComponentHooks;var u=function(e){var t=e.size?(0,a.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=u,u.defaultHooks=r.pureComponentHooks,l.Item=d,l.Divider=u},function(e,t,n){"use strict";var o=n(7),r=o({}.toString),a=o("".slice);e.exports=function(e){return a(r(e),8,-1)}},function(e,t,n){"use strict";var o=n(7);e.exports=o({}.isPrototypeOf)},function(e,t,n){"use strict";var o=n(84),r=Function.prototype,a=r.apply,c=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?c.bind(a):function(){return c.apply(a,arguments)})},function(e,t,n){"use strict";t.__esModule=!0,t.flow=t.compose=void 0;t.flow=function o(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),c=1;c1?o-1:0),a=1;a"+e+"<\/script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{o=new ActiveXObject("htmlfile")}catch(r){}var e,t;f="undefined"!=typeof document?document.domain&&o?h(o):((t=d("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(o);for(var n=c.length;n--;)delete f.prototype[c[n]];return f()};i[s]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m.prototype=r(e),n=new m,m.prototype=null,n[s]=e):n=f(),t===undefined?n:a.f(n,t)}},function(e,t,n){"use strict";var o=n(17).f,r=n(18),a=n(16)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!r(e,a)&&o(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(15),c=n(8),i=n(161),l=n(14),d=n(110),u=n(78),s=n(64),m=n(50),p=n(150),h=n(41),f=n(193),C=n(213),N=n(56),b=n(18),V=n(74),g=n(11),v=n(69),y=n(52),_=n(46),x=n(62),k=n(58).f,L=n(214),w=n(25).forEach,B=n(77),S=n(17),I=n(26),T=n(39),A=n(114),E=T.get,M=T.set,O=S.f,P=I.f,R=Math.round,F=r.RangeError,D=d.ArrayBuffer,j=D.prototype,W=d.DataView,z=l.NATIVE_ARRAY_BUFFER_VIEWS,U=l.TYPED_ARRAY_CONSTRUCTOR,H=l.TYPED_ARRAY_TAG,G=l.TypedArray,K=l.TypedArrayPrototype,Y=l.aTypedArrayConstructor,q=l.isTypedArray,$=function(e,t){Y(e);for(var n=0,o=t.length,r=new e(o);o>n;)r[n]=t[n++];return r},X=function(e,t){O(e,t,{get:function(){return E(this)[t]}})},J=function(e){var t;return _(j,e)||"ArrayBuffer"==(t=V(e))||"SharedArrayBuffer"==t},Q=function(e,t){return q(e)&&!v(t)&&t in e&&p(+t)&&t>=0},Z=function(e,t){return t=N(t),Q(e,t)?s(2,e[t]):P(e,t)},ee=function(e,t,n){return t=N(t),!(Q(e,t)&&g(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?O(e,t,n):(e[t]=n.value,e)};c?(z||(I.f=Z,S.f=ee,X(K,"buffer"),X(K,"byteOffset"),X(K,"byteLength"),X(K,"length")),o({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:Z,defineProperty:ee}),e.exports=function(e,t,n){var c=e.match(/\d+$/)[0]/8,l=e+(n?"Clamped":"")+"Array",d="get"+e,s="set"+e,p=r[l],N=p,b=N&&N.prototype,V={},v=function(e,t){O(e,t,{get:function(){return function(e,t){var n=E(e);return n.view[d](t*c+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=E(e);n&&(o=(o=R(o))<0?0:o>255?255:255&o),r.view[s](t*c+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};z?i&&(N=t((function(e,t,n,o){return u(e,b),A(g(t)?J(t)?o!==undefined?new p(t,C(n,c),o):n!==undefined?new p(t,C(n,c)):new p(t):q(t)?$(N,t):a(L,N,t):new p(f(t)),e,N)})),x&&x(N,G),w(k(p),(function(e){e in N||m(N,e,p[e])})),N.prototype=b):(N=t((function(e,t,n,o){u(e,b);var r,i,l,d=0,s=0;if(g(t)){if(!J(t))return q(t)?$(N,t):a(L,N,t);r=t,s=C(n,c);var m=t.byteLength;if(o===undefined){if(m%c)throw F("Wrong length");if((i=m-s)<0)throw F("Wrong length")}else if((i=h(o)*c)+s>m)throw F("Wrong length");l=i/c}else l=f(t),r=new D(i=l*c);for(M(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new W(r)});d0&&o[0]<4?1:+(o[0]+o[1])),!r&&c&&(!(o=c.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=c.match(/Chrome\/(\d+)/))&&(r=+o[1]),e.exports=r},function(e,t,n){"use strict";var o=n(178),r=n(134).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(56),r=n(17),a=n(64);e.exports=function(e,t,n){var c=o(t);c in e?r.f(e,c,a(0,n)):e[c]=n}},function(e,t,n){"use strict";var o=n(7),r=n(27),a=n(84),c=o(o.bind);e.exports=function(e,t){return r(e),t===undefined?e:a?c(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(16),r=n(52),a=n(17),c=o("unscopables"),i=Array.prototype;i[c]==undefined&&a.f(i,c,{configurable:!0,value:r(null)}),e.exports=function(e){i[c][e]=!0}},function(e,t,n){"use strict";var o=n(7),r=n(9),a=n(188);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(c){}return function(n,o){return r(n),a(o),t?e(n,o):n.__proto__=o,n}}():undefined)},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=t.RndRoute=t.RndNavbar=t.RndNavButton=t.MainMenu=t.LatheSearch=t.LatheMenu=t.LatheMaterials=t.LatheMaterialStorage=t.LatheMainMenu=t.LatheChemicalStorage=t.LatheCategory=t.DeconstructionMenu=t.DataDiskMenu=t.CurrentLevels=void 0;var o=n(667);t.CurrentLevels=o.CurrentLevels;var r=n(668);t.DataDiskMenu=r.DataDiskMenu;var a=n(669);t.DeconstructionMenu=a.DeconstructionMenu;var c=n(670);t.LatheCategory=c.LatheCategory;var i=n(671);t.LatheChemicalStorage=i.LatheChemicalStorage;var l=n(672);t.LatheMainMenu=l.LatheMainMenu;var d=n(673);t.LatheMaterials=d.LatheMaterials;var u=n(674);t.LatheMaterialStorage=u.LatheMaterialStorage;var s=n(675);t.LatheMenu=s.LatheMenu;var m=n(676);t.LatheSearch=m.LatheSearch;var p=n(677);t.MainMenu=p.MainMenu;var h=n(678);t.RndNavbar=h.RndNavbar;var f=n(679);t.RndNavButton=f.RndNavButton;var C=n(232);t.RndRoute=C.RndRoute;var N=n(680);t.SettingsMenu=N.SettingsMenu},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(27);e.exports=function(e,t){var n=e[t];return null==n?undefined:o(n)}},function(e,t,n){"use strict";var o=n(7);e.exports=o([].slice)},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(87),c=n(11),i=n(18),l=n(17).f,d=n(58),u=n(137),s=n(113),m=n(86),p=n(96),h=!1,f=m("meta"),C=0,N=function(e){l(e,f,{value:{objectID:"O"+C++,weakData:{}}})},b=e.exports={enable:function(){b.enable=function(){},h=!0;var e=d.f,t=r([].splice),n={};n[f]=1,e(n).length&&(d.f=function(n){for(var o=e(n),r=0,a=o.length;r=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.collapsing,i=e.children,l=d(e,c);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,i,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Table=u,u.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.className,n=e.header,c=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(c))))};t.TableRow=s,s.defaultHooks=r.pureComponentHooks;var m=function(e){var t=e.className,n=e.collapsing,c=e.header,i=d(e,l);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(i))))};t.TableCell=m,m.defaultHooks=r.pureComponentHooks,u.Row=s,u.Cell=m},function(e,t,n){"use strict";var o=n(5),r=n(29),a=n(13),c=n(46),i=n(172),l=o.Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&c(t.prototype,l(e))}},function(e,t,n){"use strict";var o=n(57),r=n(6);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},function(e,t,n){"use strict";var o=n(5).String;e.exports=function(e){try{return o(e)}catch(t){return"Object"}}},function(e,t,n){"use strict";var o=n(34),r=n(129);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.22.5",mode:o?"pure":"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,n){"use strict";var o=n(8),r=n(18),a=Function.prototype,c=o&&Object.getOwnPropertyDescriptor,i=r(a,"name"),l=i&&"something"===function(){}.name,d=i&&(!o||o&&c(a,"name").configurable);e.exports={EXISTS:i,PROPER:l,CONFIGURABLE:d}},function(e,t,n){"use strict";var o=n(5),r=n(135),a=n(13),c=n(45),i=n(16)("toStringTag"),l=o.Object,d="Arguments"==c(function(){return arguments}());e.exports=r?c:function(e){var t,n,o;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=l(e),i))?n:d?c(t):"Object"==(o=c(t))&&a(t.callee)?"Arguments":o}},function(e,t,n){"use strict";var o=n(45);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(45),r=n(5);e.exports="process"==o(r.process)},function(e,t,n){"use strict";var o=n(29),r=n(17),a=n(16),c=n(8),i=a("species");e.exports=function(e){var t=o(e),n=r.f;c&&t&&!t[i]&&n(t,i,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var o=n(5),r=n(46),a=o.TypeError;e.exports=function(e,t){if(r(t,e))return e;throw a("Incorrect invocation")}},function(e,t,n){"use strict";var o=n(5),r=n(60),a=n(15),c=n(9),i=n(71),l=n(139),d=n(23),u=n(46),s=n(140),m=n(107),p=n(185),h=o.TypeError,f=function(e,t){this.stopped=e,this.result=t},C=f.prototype;e.exports=function(e,t,n){var o,N,b,V,g,v,y,_=n&&n.that,x=!(!n||!n.AS_ENTRIES),k=!(!n||!n.IS_ITERATOR),L=!(!n||!n.INTERRUPTED),w=r(t,_),B=function(e){return o&&p(o,"normal",e),new f(!0,e)},S=function(e){return x?(c(e),L?w(e[0],e[1],B):w(e[0],e[1])):L?w(e,B):w(e)};if(k)o=e;else{if(!(N=m(e)))throw h(i(e)+" is not iterable");if(l(N)){for(b=0,V=d(e);V>b;b++)if((g=S(e[b]))&&u(C,g))return g;return new f(!1)}o=s(e,N)}for(v=o.next;!(y=a(v,o)).done;){try{g=S(y.value)}catch(I){p(o,"throw",I)}if("object"==typeof g&&g&&u(C,g))return g}return new f(!1)}},function(e,t,n){"use strict";var o=n(7),r=n(32),a=n(20),c=n(116),i=o("".replace),l="["+c+"]",d=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),s=function(e){return function(t){var n=a(r(t));return 1&e&&(n=i(n,d,"")),2&e&&(n=i(n,u,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t,n){"use strict";var o=n(5);e.exports=o.Promise},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(217);var o=n(33),r=0,a=1,c=2,i=3,l=4,d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a=c){var i=[t].concat(r).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,o.callByond)("",{src:window.__ref__,action:"tgui:log",log:i})}},u=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),o=0;ou;)if((i=l[u++])!=i)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},function(e,t,n){"use strict";var o=n(6),r=n(13),a=/#|\.prototype\./,c=function(e,t){var n=l[i(e)];return n==u||n!=d&&(r(t)?o(t):!!t)},i=c.normalize=function(e){return String(e).replace(a,".").toLowerCase()},l=c.data={},d=c.NATIVE="N",u=c.POLYFILL="P";e.exports=c},function(e,t,n){"use strict";var o=n(178),r=n(134);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(239);e.exports=function(e,t){return new(o(e))(0===t?0:t)}},function(e,t,n){"use strict";var o=n(7),r=n(6),a=n(13),c=n(74),i=n(29),l=n(103),d=function(){},u=[],s=i("Reflect","construct"),m=/^\s*(?:class|function)\b/,p=o(m.exec),h=!m.exec(d),f=function(e){if(!a(e))return!1;try{return s(d,u,e),!0}catch(t){return!1}},C=function(e){if(!a(e))return!1;switch(c(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(m,l(e))}catch(t){return!0}};C.sham=!0,e.exports=!s||r((function(){var e;return f(f.call)||!f(Object)||!f((function(){e=!0}))||e}))?C:f},function(e,t,n){"use strict";var o=n(6),r=n(16),a=n(57),c=r("species");e.exports=function(e){return a>=51||!o((function(){var t=[];return(t.constructor={})[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(9),r=n(145),a=n(16)("species");e.exports=function(e,t){var n,c=o(e).constructor;return c===undefined||(n=o(c)[a])==undefined?t:r(n)}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(5),r=n(81),a=n(13),c=n(89),i=n(103),l=n(16),d=n(374),u=n(34),s=n(57),m=r&&r.prototype,p=l("species"),h=!1,f=a(o.PromiseRejectionEvent),C=c("Promise",(function(){var e=i(r),t=e!==String(r);if(!t&&66===s)return!0;if(u&&(!m["catch"]||!m["finally"]))return!0;if(s>=51&&/native code/.test(e))return!1;var n=new r((function(e){e(1)})),o=function(e){e((function(){}),(function(){}))};return(n.constructor={})[p]=o,!(h=n.then((function(){}))instanceof o)||!t&&d&&!f}));e.exports={CONSTRUCTOR:C,REJECTION_EVENT:f,SUBCLASSING:h}},function(e,t,n){"use strict";var o=n(27),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.releaseHeldKeys=t.hotKeyReducer=t.hotKeyMiddleware=t.KEY_Z=t.KEY_Y=t.KEY_X=t.KEY_W=t.KEY_V=t.KEY_U=t.KEY_TAB=t.KEY_T=t.KEY_SPACE=t.KEY_SHIFT=t.KEY_S=t.KEY_R=t.KEY_Q=t.KEY_P=t.KEY_O=t.KEY_NUMPAD_9=t.KEY_NUMPAD_8=t.KEY_NUMPAD_7=t.KEY_NUMPAD_6=t.KEY_NUMPAD_5=t.KEY_NUMPAD_4=t.KEY_NUMPAD_3=t.KEY_NUMPAD_2=t.KEY_NUMPAD_1=t.KEY_NUMPAD_0=t.KEY_N=t.KEY_MINUS=t.KEY_M=t.KEY_L=t.KEY_K=t.KEY_J=t.KEY_I=t.KEY_H=t.KEY_G=t.KEY_F=t.KEY_ESCAPE=t.KEY_EQUAL=t.KEY_ENTER=t.KEY_E=t.KEY_D=t.KEY_CTRL=t.KEY_C=t.KEY_BACKSPACE=t.KEY_B=t.KEY_ALT=t.KEY_A=t.KEY_9=t.KEY_8=t.KEY_7=t.KEY_6=t.KEY_5=t.KEY_4=t.KEY_3=t.KEY_2=t.KEY_1=t.KEY_0=t.ARROW_KEY_UP=t.ARROW_KEY_DOWN=void 0;var o=n(33),r=(0,n(82).createLogger)("hotkeys");t.KEY_BACKSPACE=8;t.KEY_TAB=9;t.KEY_ENTER=13;t.KEY_SHIFT=16;t.KEY_CTRL=17;t.KEY_ALT=18;t.KEY_ESCAPE=27;t.KEY_SPACE=32;t.ARROW_KEY_UP=38;t.ARROW_KEY_DOWN=40;t.KEY_0=48;t.KEY_1=49;t.KEY_2=50;t.KEY_3=51;t.KEY_4=52;t.KEY_5=53;t.KEY_6=54;t.KEY_7=55;t.KEY_8=56;t.KEY_9=57;t.KEY_A=65;t.KEY_B=66;t.KEY_C=67;t.KEY_D=68;t.KEY_E=69;t.KEY_F=70;t.KEY_G=71;t.KEY_H=72;t.KEY_I=73;t.KEY_J=74;t.KEY_K=75;t.KEY_L=76;t.KEY_M=77;t.KEY_N=78;t.KEY_O=79;t.KEY_P=80;t.KEY_Q=81;t.KEY_R=82;t.KEY_S=83;t.KEY_T=84;t.KEY_U=85;t.KEY_V=86;t.KEY_W=87;t.KEY_X=88;t.KEY_Y=89;t.KEY_Z=90;t.KEY_NUMPAD_0=96;t.KEY_NUMPAD_1=97;t.KEY_NUMPAD_2=98;t.KEY_NUMPAD_3=99;t.KEY_NUMPAD_4=100;t.KEY_NUMPAD_5=101;t.KEY_NUMPAD_6=102;t.KEY_NUMPAD_7=103;t.KEY_NUMPAD_8=104;t.KEY_NUMPAD_9=105;t.KEY_EQUAL=187;t.KEY_MINUS=189;var a=[17,18,16],c=[27,13,32,9,17,16,18],i={},l=function(e,t,n,o){var r="";return e&&(r+="Ctrl+"),t&&(r+="Alt+"),n&&(r+="Shift+"),r+=o>=48&&o<=90?String.fromCharCode(o):"["+o+"]"},d=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:l(n,o,r,t)}},u=function(e){var t={16:"Shift",17:"Ctrl",18:"Alt",33:"Northeast",34:"Southeast",35:"Southwest",36:"Northwest",37:"West",38:"North",39:"East",40:"South",45:"Insert",46:"Delete"};return t[e]?t[e]:e>=48&&e<=57||e>=65&&e<=90?String.fromCharCode(e):e>=96&&e<=105?"Numpad"+(e-96):e>=112&&e<=123?"F"+(e-111):188===e?",":189===e?"-":190===e?".":void 0},s=function(){for(var e=0,t=Object.keys(i);e=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&!g.includes(e.ref)&&!b.includes(e.ref),checked:b.includes(e.ref),onClick:function(){return v(e.ref)}},e.desc)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotStatus=void 0;var o=n(0),r=n(1),a=n(2);t.BotStatus=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.locked,d=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,p=i.canhack,h=i.emagged,f=i.remote_disabled;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe an ID card to ",l?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,a.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,disabled:d,onClick:function(){return c("power")}})}),null!==m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,a.Box,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:!f,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})})],4)}},function(e,t,n){"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!o.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},function(e,t,n){"use strict";var o=n(7),r=n(13),a=n(129),c=o(Function.toString);r(a.inspectSource)||(a.inspectSource=function(e){return c(e)}),e.exports=a.inspectSource},function(e,t,n){"use strict";var o=n(72),r=n(86),a=o("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(5),r=n(51),a=n(23),c=n(59),i=o.Array,l=Math.max;e.exports=function(e,t,n){for(var o=a(e),d=r(t,o),u=r(n===undefined?o:n,o),s=i(l(u-d,0)),m=0;d=0:m>p;p+=h)p in s&&(d=n(d,s[p],p,u));return d}};e.exports={left:d(!1),right:d(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(7),a=n(8),c=n(144),i=n(73),l=n(50),d=n(111),u=n(6),s=n(78),m=n(40),p=n(41),h=n(193),f=n(289),C=n(42),N=n(62),b=n(58).f,V=n(17).f,g=n(138),v=n(106),y=n(53),_=n(39),x=i.PROPER,k=i.CONFIGURABLE,L=_.get,w=_.set,B=o.ArrayBuffer,S=B,I=S&&S.prototype,T=o.DataView,A=T&&T.prototype,E=Object.prototype,M=o.Array,O=o.RangeError,P=r(g),R=r([].reverse),F=f.pack,D=f.unpack,j=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},U=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},H=function(e){return F(e,23,4)},G=function(e){return F(e,52,8)},K=function(e,t){V(e.prototype,t,{get:function(){return L(this)[t]}})},Y=function(e,t,n,o){var r=h(n),a=L(e);if(r+t>a.byteLength)throw O("Wrong index");var c=L(a.buffer).bytes,i=r+a.byteOffset,l=v(c,i,i+t);return o?l:R(l)},q=function(e,t,n,o,r,a){var c=h(n),i=L(e);if(c+t>i.byteLength)throw O("Wrong index");for(var l=L(i.buffer).bytes,d=c+i.byteOffset,u=o(+r),s=0;sQ;)(X=J[Q++])in S||l(S,X,B[X]);I.constructor=S}N&&C(A)!==E&&N(A,E);var Z=new T(new S(2)),ee=r(A.setInt8);Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||d(A,{setInt8:function(e,t){ee(this,e,t<<24>>24)},setUint8:function(e,t){ee(this,e,t<<24>>24)}},{unsafe:!0})}else I=(S=function(e){s(this,I);var t=h(e);w(this,{bytes:P(M(t),0),byteLength:t}),a||(this.byteLength=t)}).prototype,A=(T=function(e,t,n){s(this,A),s(e,I);var o=L(e).byteLength,r=m(t);if(r<0||r>o)throw O("Wrong offset");if(r+(n=n===undefined?o-r:p(n))>o)throw O("Wrong length");w(this,{buffer:e,byteLength:n,byteOffset:r}),a||(this.buffer=e,this.byteLength=n,this.byteOffset=r)}).prototype,a&&(K(S,"byteLength"),K(T,"buffer"),K(T,"byteLength"),K(T,"byteOffset")),d(A,{getInt8:function(e){return Y(this,1,e)[0]<<24>>24},getUint8:function(e){return Y(this,1,e)[0]},getInt16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return U(Y(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return U(Y(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return D(Y(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return D(Y(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){q(this,1,e,j,t)},setUint8:function(e,t){q(this,1,e,j,t)},setInt16:function(e,t){q(this,2,e,W,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){q(this,2,e,W,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){q(this,4,e,H,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){q(this,8,e,G,t,arguments.length>2?arguments[2]:undefined)}});y(S,"ArrayBuffer"),y(T,"DataView"),e.exports={ArrayBuffer:S,DataView:T}},function(e,t,n){"use strict";var o=n(24);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(89),i=n(24),l=n(67),d=n(79),u=n(78),s=n(13),m=n(11),p=n(6),h=n(108),f=n(53),C=n(114);e.exports=function(e,t,n){var N=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),V=N?"set":"add",g=r[e],v=g&&g.prototype,y=g,_={},x=function(e){var t=a(v[e]);i(v,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!m(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!m(e)?undefined:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!m(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(c(e,!s(g)||!(b||v.forEach&&!p((function(){(new g).entries().next()})))))y=n.getConstructor(t,e,N,V),l.enable();else if(c(e,!0)){var k=new y,L=k[V](b?{}:-0,1)!=k,w=p((function(){k.has(1)})),B=h((function(e){new g(e)})),S=!b&&p((function(){for(var e=new g,t=5;t--;)e[V](t,t);return!e.has(-0)}));B||((y=t((function(e,t){u(e,v);var n=C(new g,e,y);return t!=undefined&&d(t,n[V],{that:n,AS_ENTRIES:N}),n}))).prototype=v,v.constructor=y),(w||S)&&(x("delete"),x("has"),N&&x("get")),(S||L)&&x(V),b&&v.clear&&delete v.clear}return _[e]=y,o({global:!0,constructor:!0,forced:y!=g},_),f(y,e),b||n.setStrong(y,e,N),y}},function(e,t,n){"use strict";var o=n(6),r=n(11),a=n(45),c=n(148),i=Object.isExtensible,l=o((function(){i(1)}));e.exports=l||c?function(e){return!!r(e)&&(!c||"ArrayBuffer"!=a(e))&&(!i||i(e))}:i},function(e,t,n){"use strict";var o=n(13),r=n(11),a=n(62);e.exports=function(e,t,n){var c,i;return a&&o(c=t.constructor)&&c!==n&&r(i=c.prototype)&&i!==n.prototype&&a(e,i),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(34),r=n(5),a=n(6),c=n(143);e.exports=o||!a((function(){if(!(c&&c<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}}))},function(e,t,n){"use strict";var o,r,a,c,i=n(5),l=n(47),d=n(60),u=n(13),s=n(18),m=n(6),p=n(179),h=n(66),f=n(131),C=n(151),N=n(201),b=n(76),V=i.setImmediate,g=i.clearImmediate,v=i.process,y=i.Dispatch,_=i.Function,x=i.MessageChannel,k=i.String,L=0,w={};try{o=i.location}catch(A){}var B=function(e){if(s(w,e)){var t=w[e];delete w[e],t()}},S=function(e){return function(){B(e)}},I=function(e){B(e.data)},T=function(e){i.postMessage(k(e),o.protocol+"//"+o.host)};V&&g||(V=function(e){C(arguments.length,1);var t=u(e)?e:_(e),n=h(arguments,1);return w[++L]=function(){l(t,undefined,n)},r(L),L},g=function(e){delete w[e]},b?r=function(e){v.nextTick(S(e))}:y&&y.now?r=function(e){y.now(S(e))}:x&&!N?(c=(a=new x).port2,a.port1.onmessage=I,r=d(c.postMessage,c)):i.addEventListener&&u(i.postMessage)&&!i.importScripts&&o&&"file:"!==o.protocol&&!m(T)?(r=T,i.addEventListener("message",I,!1)):r="onreadystatechange"in f("script")?function(e){p.appendChild(f("script")).onreadystatechange=function(){p.removeChild(this),B(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:V,clear:g}},function(e,t,n){"use strict";var o,r,a=n(15),c=n(7),i=n(20),l=n(154),d=n(155),u=n(72),s=n(52),m=n(39).get,p=n(207),h=n(208),f=u("native-string-replace",String.prototype.replace),C=RegExp.prototype.exec,N=C,b=c("".charAt),V=c("".indexOf),g=c("".replace),v=c("".slice),y=(r=/b*/g,a(C,o=/a/,"a"),a(C,r,"a"),0!==o.lastIndex||0!==r.lastIndex),_=d.BROKEN_CARET,x=/()??/.exec("")[1]!==undefined;(y||x||_||p||h)&&(N=function(e){var t,n,o,r,c,d,u,p=this,h=m(p),k=i(e),L=h.raw;if(L)return L.lastIndex=p.lastIndex,t=a(N,L,k),p.lastIndex=L.lastIndex,t;var w=h.groups,B=_&&p.sticky,S=a(l,p),I=p.source,T=0,A=k;if(B&&(S=g(S,"y",""),-1===V(S,"g")&&(S+="g"),A=v(k,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(k,p.lastIndex-1))&&(I="(?: "+I+")",A=" "+A,T++),n=new RegExp("^(?:"+I+")",S)),x&&(n=new RegExp("^"+I+"$(?!\\s)",S)),y&&(o=p.lastIndex),r=a(C,B?n:p,A),B?r?(r.input=v(r.input,T),r[0]=v(r[0],T),r.index=p.lastIndex,p.lastIndex+=r[0].length):p.lastIndex=0:y&&r&&(p.lastIndex=p.global?r.index+r[0].length:o),x&&r&&r.length>1&&a(f,r[0],n,(function(){for(c=1;ct?2+3*d-i:0;return((0,o.toFixed)(m,p)+" "+s+n).trim()};t.formatSiUnit=c;t.formatPower=function(e,t){return void 0===t&&(t=0),c(e,t,"W")};t.formatMoney=function(e,t){if(void 0===t&&(t=0),!Number.isFinite(e))return e;var n=(0,o.round)(e,t);t>0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,a=n.indexOf(".");-1===a&&(a=r);for(var c="",i=0;i0&&iu;)a.f(e,n=r[u++],o[n]);return e}},function(e,t,n){"use strict";var o=n(45),r=n(31),a=n(58).f,c=n(106),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"Window"==o(e)?function(e){try{return a(e)}catch(t){return c(i)}}(e):a(r(e))}},function(e,t,n){"use strict";var o=n(19),r=n(51),a=n(23);e.exports=function(e){for(var t=o(this),n=a(t),c=arguments.length,i=r(c>1?arguments[1]:undefined,n),l=c>2?arguments[2]:undefined,d=l===undefined?n:r(l,n);d>i;)t[i++]=e;return t}},function(e,t,n){"use strict";var o=n(16),r=n(94),a=o("iterator"),c=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||c[a]===e)}},function(e,t,n){"use strict";var o=n(5),r=n(15),a=n(27),c=n(9),i=n(71),l=n(107),d=o.TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(a(n))return c(r(n,e));throw d(i(e)+" is not iterable")}},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(34),c=n(73),i=n(13),l=n(274),d=n(42),u=n(62),s=n(53),m=n(50),p=n(24),h=n(16),f=n(94),C=n(187),N=c.PROPER,b=c.CONFIGURABLE,V=C.IteratorPrototype,g=C.BUGGY_SAFARI_ITERATORS,v=h("iterator"),y=function(){return this};e.exports=function(e,t,n,c,h,C,_){l(n,t,c);var x,k,L,w=function(e){if(e===h&&A)return A;if(!g&&e in I)return I[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},B=t+" Iterator",S=!1,I=e.prototype,T=I[v]||I["@@iterator"]||h&&I[h],A=!g&&T||w(h),E="Array"==t&&I.entries||T;if(E&&(x=d(E.call(new e)))!==Object.prototype&&x.next&&(a||d(x)===V||(u?u(x,V):i(x[v])||p(x,v,y)),s(x,B,!0,!0),a&&(f[B]=y)),N&&"values"==h&&T&&"values"!==T.name&&(!a&&b?m(I,"name","values"):(S=!0,A=function(){return r(T,this)})),h)if(k={values:w("values"),keys:C?A:w("keys"),entries:w("entries")},_)for(L in k)(g||S||!(L in I))&&p(I,L,k[L]);else o({target:t,proto:!0,forced:g||S},k);return a&&!_||I[v]===A||p(I,v,A,{name:h}),f[t]=A,k}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var o=n(49).match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(5),r=n(92),a=n(71),c=o.TypeError;e.exports=function(e){if(r(e))return e;throw c(a(e)+" is not a constructor")}},function(e,t,n){"use strict";var o=n(7),r=n(41),a=n(20),c=n(147),i=n(32),l=o(c),d=o("".slice),u=Math.ceil,s=function(e){return function(t,n,o){var c,s,m=a(i(t)),p=r(n),h=m.length,f=o===undefined?" ":a(o);return p<=h||""==f?m:((s=l(f,u((c=p-h)/f.length))).length>c&&(s=d(s,0,c)),e?m+s:s+m)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(40),a=n(20),c=n(32),i=o.RangeError;e.exports=function(e){var t=a(c(this)),n="",o=r(e);if(o<0||o==Infinity)throw i("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var o=n(6);e.exports=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o=n(11),r=Math.floor;e.exports=Number.isInteger||function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(5).TypeError;e.exports=function(e,t){if(e=p?e?"":undefined:(o=l(s,m))<55296||o>56319||m+1===p||(u=l(s,m+1))<56320||u>57343?e?i(s,m):o:e?d(s,m,m+2):u-56320+(o-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(153),a=o.TypeError;e.exports=function(e){if(r(e))throw a("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(156).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(73).PROPER,r=n(6),a=n(116);e.exports=function(e){return r((function(){return!!a[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||o&&a[e].name!==e}))}},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(108),c=n(14).NATIVE_ARRAY_BUFFER_VIEWS,i=o.ArrayBuffer,l=o.Int8Array;e.exports=!c||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!a((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new i(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.getRoutedComponent=void 0;var o=n(0),r=n(3),a=n(525),c=function(e,t){return function(){return(0,o.createComponentVNode)(2,r.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,children:["notFound"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" was not found.")],4),"missingExport"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" is missing an export.")],4)]})})}};t.getRoutedComponent=function(e){var t;var n,o=null==(t=e.config)?void 0:t["interface"];try{n=a("./"+o+".js")}catch(i){if("MODULE_NOT_FOUND"===i.code)return c("notFound",o);throw i}var r=n[o];return r||c("missingExport",o)}},function(e,t,n){"use strict";t.__esModule=!0,t.AnimatedNumber=void 0;var o=n(12),r=n(0);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)},i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:0},c(t.initial)?n.state.value=t.initial:c(t.value)&&(n.state.value=Number(t.value)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state,n=Number(t.value),o=Number(e.value);if(c(o)){var r=.5*n+.5*o;this.setState({value:r})}},i.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),50)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){var e=this.props,t=this.state,n=e.format,r=e.children,a=t.value,i=e.value;if(!c(i))return i||null;var l=a;if(n)l=n(a);else{var d=String(i).split(".")[1],u=d?d.length:0;l=(0,o.toFixed)(a,(0,o.clamp)(u,0,8))}return"function"==typeof r?r(l,a):l},r}(r.Component);t.AnimatedNumber=i},function(e,t,n){"use strict";t.__esModule=!0,t.ButtonInput=t.ButtonConfirm=t.ButtonCheckbox=t.Button=void 0;var o=n(0),r=n(10),a=n(33),c=n(99),i=n(3),l=n(82),d=n(22),u=n(165),s=n(220),m=["className","fluid","icon","color","textColor","disabled","selected","tooltip","tooltipPosition","ellipsis","content","iconRotation","iconColor","iconSpin","iconRight","iconStyle","children","onclick","onClick","multiLine"],p=["checked"],h=["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"],f=["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","disabled","placeholder","maxLength","multiLine"];function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var V=(0,l.createLogger)("Button"),g=function(e){var t=e.className,n=e.fluid,l=e.icon,p=e.color,h=e.textColor,f=e.disabled,C=e.selected,N=e.tooltip,g=e.tooltipPosition,v=e.ellipsis,y=e.content,_=e.iconRotation,x=e.iconColor,k=e.iconSpin,L=e.iconRight,w=e.iconStyle,B=e.children,S=e.onclick,I=e.onClick,T=e.multiLine,A=b(e,m),E=!(!y&&!B);return S&&V.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",f&&"Button--disabled",C&&"Button--selected",E&&"Button--hasContent",v&&"Button--ellipsis",L&&"Button--iconRight",T&&"Button--multiLine",p&&"string"==typeof p?"Button--color--"+p:"Button--color--default",t]),tabIndex:!f&&"0",unselectable:a.IS_IE8,color:h,onclick:function(e){(0,i.refocusLayout)(),!f&&I&&I(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===c.KEY_SPACE||t===c.KEY_ENTER?(e.preventDefault(),void(!f&&I&&I(e))):t===c.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},A,{children:[l&&!L&&(0,o.createComponentVNode)(2,u.Icon,{name:l,color:x,rotation:_,spin:k,style:w}),y,B,l&&L&&(0,o.createComponentVNode)(2,u.Icon,{name:l,color:x,rotation:_,spin:k,style:w}),N&&(0,o.createComponentVNode)(2,s.Tooltip,{content:N,position:g})]})))};t.Button=g,g.defaultHooks=r.pureComponentHooks;var v=function(e){var t=e.checked,n=b(e,p);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,g,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=v,g.Checkbox=v;var y=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}C(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,r=void 0===n?"Confirm?":n,a=t.confirmColor,c=void 0===a?"bad":a,i=t.confirmIcon,l=t.icon,d=t.color,u=t.content,s=t.onClick,m=b(t,h);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,g,Object.assign({content:this.state.clickedOnce?r:u,icon:this.state.clickedOnce?i:l,color:this.state.clickedOnce?c:d,onClick:function(){return e.state.clickedOnce?s():e.setClickedOnce(!0)}},m)))},t}(o.Component);t.ButtonConfirm=y,g.Confirm=y;var _=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={inInput:!1},t}C(t,e);var n=t.prototype;return n.setInInput=function(e){if(!this.props.disabled&&(this.setState({inInput:e}),this.inputRef)){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,a=t.content,i=t.icon,l=t.iconRotation,m=t.iconSpin,p=t.tooltip,h=t.tooltipPosition,C=t.color,N=void 0===C?"default":C,V=t.disabled,g=(t.placeholder,t.maxLength,t.multiLine),v=b(t,f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",V&&"Button--disabled","Button--color--"+N,g+"Button--multiLine"])},v,{onClick:function(){return e.setInInput(!0)},children:[i&&(0,o.createComponentVNode)(2,u.Icon,{name:i,rotation:l,spin:m}),(0,o.createVNode)(1,"div",null,a,0),(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===c.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===c.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),p&&(0,o.createComponentVNode)(2,s.Tooltip,{content:p,position:h})]})))},t}(o.Component);t.ButtonInput=_,g.Input=_},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var o=n(0),r=n(10),a=n(22),c=["name","size","spin","className","style","rotation"];var i=/-o$/,l=function(e){var t=e.name,n=e.size,l=e.spin,d=e.className,u=e.style,s=void 0===u?{}:u,m=e.rotation,p=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);n&&(s["font-size"]=100*n+"%"),"number"==typeof m&&(s.transform="rotate("+m+"deg)");var h=i.test(t),f=t.replace(i,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"i",className:(0,r.classes)([d,h?"far":"fas","fa-"+f,l&&"fa-spin"]),style:s},p)))};t.Icon=l,l.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(163),l=n(22);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,n;function u(t){var n;n=e.call(this,t)||this;var a=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:a,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,c=t.step,i=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var d=Number.isFinite(o)?o%c:0;n.internalValue=(0,r.clamp)(n.internalValue+l*c/i,o-c,a+c),n.value=(0,r.clamp)(n.internalValue-n.internalValue%c+d,o,a),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,c=a.dragging,i=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!c,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),c)n.suppressFlicker(),o&&o(e,i),r&&r(e,i);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),u.prototype.render=function(){var e=this,t=this.state,n=t.dragging,d=t.editing,u=t.value,s=t.suppressingFlicker,m=this.props,p=m.className,h=m.fluid,f=m.animated,C=m.value,N=m.unit,b=m.minValue,V=m.maxValue,g=m.height,v=m.width,y=m.lineHeight,_=m.fontSize,x=m.format,k=m.onChange,L=m.onDrag,w=C;(n||s)&&(w=u);var B=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(N?" "+N:""),0,{unselectable:c.IS_IE8})},S=f&&!n&&!s&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:w,format:x,children:B})||B(x?x(w):w);return(0,o.createComponentVNode)(2,l.Box,{className:(0,a.classes)(["NumberInput",h&&"NumberInput--fluid",p]),minWidth:v,minHeight:g,lineHeight:y,fontSize:_,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((w-b)/(V-b)*100,0,100)+"%"}}),2),S,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:d?undefined:"none",height:g,"line-height":y,"font-size":_},onBlur:function(t){if(d){var n=(0,r.clamp)(t.target.value,b,V);e.setState({editing:!1,value:n}),e.suppressFlicker(),k&&k(t,n),L&&L(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,b,V);return e.setState({editing:!1,value:n}),e.suppressFlicker(),k&&k(t,n),void(L&&L(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},u}(o.Component);t.NumberInput=u,u.defaultHooks=a.pureComponentHooks,u.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";t.__esModule=!0,t.Operating=void 0;var o=n(0),r=n(2),a=n(227),c=function(e){var t=e.operating,n=e.name;if(t)return(0,o.createComponentVNode)(2,r.Dimmer,{children:(0,o.createComponentVNode)(2,r.Flex,{mb:"30px",children:(0,o.createComponentVNode)(2,r.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,o.createComponentVNode)(2,r.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,o.createVNode)(1,"br"),"The ",n," is processing..."]})})})};t.Operating=c,c.propTypes={operating:a.bool,name:a.string}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewManifest=void 0;var o=n(0),r=n(1),a=n(2),c=n(21),i=n(43).COLORS.department,l=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],d=function(e){if(-1!==l.indexOf(e))return!0},u=function(e){return e.length>0&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"50%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"15%",children:"Active"})]}),e.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{color:(t=e.rank,-1!==l.indexOf(t)?"green":"orange"),bold:d(e.rank),children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,c.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,c.decodeHtmlEntities)(e.rank)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.active})]},e.name+e.rank);var t}))]})};t.CrewManifest=function(e,t){var n;(0,r.useBackend)(t).act;e.data?n=e.data:n=(0,r.useBackend)(t).data;var c=n.manifest,l=c.heads,d=c.sec,s=c.eng,m=c.med,p=c.sci,h=c.ser,f=c.sup,C=c.misc;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.command,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(l)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.security,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(d)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.engineering,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.medical,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(m)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.science,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(p)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.service,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.supply,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(f)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(C)})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(1),a=n(2);t.TemporaryNotice=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.temp;if(l){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(12),a=n(1),c=n(2);t.Signaler=function(e,t){var n=(0,a.useBackend)(t).act,i=e.data,l=i.code,d=i.frequency,u=i.minFrequency,s=i.maxFrequency;return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:u/10,maxValue:s/10,value:d/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return n("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onDrag:function(e,t){return n("code",{code:t})}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},function(e,t,n){"use strict";var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(r){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,n){"use strict";var o=n(70);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(5),r=n(15),a=n(13),c=n(11),i=o.TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!c(o=r(n,e)))return o;if(a(n=e.valueOf)&&!c(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!c(o=r(n,e)))return o;throw i("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o=n(8),r=n(6),a=n(131);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(8),r=n(6);e.exports=o&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(103),c=o.WeakMap;e.exports=r(c)&&/native code/.test(a(c))},function(e,t,n){"use strict";var o=n(18),r=n(133),a=n(26),c=n(17);e.exports=function(e,t,n){for(var i=r(t),l=c.f,d=a.f,u=0;ud;)r(o,n=t[d++])&&(~c(u,n)||l(u,n));return u}},function(e,t,n){"use strict";var o=n(29);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(16);t.f=o},function(e,t,n){"use strict";var o=n(15),r=n(29),a=n(16),c=n(24);e.exports=function(){var e=r("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=a("toPrimitive");t&&!t[i]&&c(t,i,(function(e){return o(n,this)}),{arity:1})}},function(e,t,n){"use strict";var o=n(70);e.exports=o&&!!Symbol["for"]&&!!Symbol.keyFor},function(e,t,n){"use strict";var o=n(19),r=n(51),a=n(23),c=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),i=a(n),l=r(e,i),d=r(t,i),u=arguments.length>2?arguments[2]:undefined,s=c((u===undefined?i:r(u,i))-d,i-l),m=1;for(d0;)d in n?n[l]=n[d]:delete n[l],l+=m,d+=m;return n}},function(e,t,n){"use strict";var o=n(5),r=n(75),a=n(23),c=n(60),i=o.TypeError;e.exports=function l(e,t,n,o,d,u,s,m){for(var p,h=d,f=0,C=!!s&&c(s,m);f0&&r(p))h=l(e,t,p,a(p),h,u-1)-1;else{if(h>=9007199254740991)throw i("Exceed the acceptable array length");e[h]=p}h++}f++}return h}},function(e,t,n){"use strict";var o=n(15),r=n(9),a=n(65);e.exports=function(e,t,n){var c,i;r(e);try{if(!(c=a(e,"return"))){if("throw"===t)throw n;return n}c=o(c,e)}catch(l){i=!0,c=l}if("throw"===t)throw n;if(i)throw c;return r(c),n}},function(e,t,n){"use strict";var o=n(31),r=n(61),a=n(94),c=n(39),i=n(17).f,l=n(141),d=n(34),u=n(8),s=c.set,m=c.getterFor("Array Iterator");e.exports=l(Array,"Array",(function(e,t){s(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=m(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values");var p=a.Arguments=a.Array;if(r("keys"),r("values"),r("entries"),!d&&u&&"values"!==p.name)try{i(p,"name",{value:"values"})}catch(h){}},function(e,t,n){"use strict";var o,r,a,c=n(6),i=n(13),l=n(52),d=n(42),u=n(24),s=n(16),m=n(34),p=s("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(r=d(d(a)))!==Object.prototype&&(o=r):h=!0),o==undefined||c((function(){var e={};return o[p].call(e)!==e}))?o={}:m&&(o=l(o)),i(o[p])||u(o,p,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=o.String,c=o.TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw c("Can't set "+a(e)+" as a prototype")}},function(e,t,n){"use strict";var o=n(47),r=n(31),a=n(40),c=n(23),i=n(54),l=Math.min,d=[].lastIndexOf,u=!!d&&1/[1].lastIndexOf(1,-0)<0,s=i("lastIndexOf"),m=u||!s;e.exports=m?function(e){if(u)return o(d,this,arguments)||0;var t=r(this),n=c(t),i=n-1;for(arguments.length>1&&(i=l(i,a(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:d},function(e,t,n){"use strict";var o=n(106),r=Math.floor,a=function(e,t){for(var n,o,r=e.length,a=1;a0;)e[o]=e[--o];o!==a++&&(e[o]=n)}return e},c=function(e,t,n,o){for(var r=t.length,a=n.length,c=0,i=0;c1?arguments[1]:undefined);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),a(p,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return N(this,0===e?0:e,t)}}:{add:function(e){return N(this,e=0===e?0:e,e)}}),s&&o(p,"size",{get:function(){return C(this).size}}),u},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),a=f(o);d(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(7);e.exports=o(1..valueOf)},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(20),i=n(80).trim,l=n(116),d=o.parseInt,u=o.Symbol,s=u&&u.iterator,m=/^[+-]?0x/i,p=a(m.exec),h=8!==d(l+"08")||22!==d(l+"0x16")||s&&!r((function(){d(Object(s))}));e.exports=h?function(e,t){var n=i(c(e));return d(n,t>>>0||(p(m,n)?16:10))}:d},function(e,t,n){"use strict";var o=n(8),r=n(7),a=n(90),c=n(31),i=r(n(102).f),l=r([].push),d=function(e){return function(t){for(var n,r=c(t),d=a(r),u=d.length,s=0,m=[];u>s;)n=d[s++],o&&!i(r,n)||l(m,e?[n,r[n]]:r[n]);return m}};e.exports={entries:d(!0),values:d(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(49);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,a,c,i,l,d,u,s=n(5),m=n(60),p=n(26).f,h=n(118).set,f=n(201),C=n(370),N=n(371),b=n(76),V=s.MutationObserver||s.WebKitMutationObserver,g=s.document,v=s.process,y=s.Promise,_=p(s,"queueMicrotask"),x=_&&_.value;x||(o=function(){var e,t;for(b&&(e=v.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?c():a=undefined,n}}a=undefined,e&&e.enter()},f||b||N||!V||!g?!C&&y&&y.resolve?((d=y.resolve(undefined)).constructor=y,u=m(d.then,d),c=function(){u(o)}):b?c=function(){v.nextTick(o)}:(h=m(h,s),c=function(){h(o)}):(i=!0,l=g.createTextNode(""),new V(o).observe(l,{characterData:!0}),c=function(){l.data=i=!i})),e.exports=x||function(e){var t={fn:e,next:undefined};a&&(a.next=t),r||(r=t,c()),a=t}},function(e,t,n){"use strict";var o=n(81),r=n(108),a=n(97).CONSTRUCTOR;e.exports=a||!r((function(e){o.all(e).then(undefined,(function(){}))}))},function(e,t,n){"use strict";var o=n(9),r=n(11),a=n(98);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(18);e.exports=function(e){return e!==undefined&&(o(e,"value")||o(e,"writable"))}},function(e,t,n){"use strict";var o=n(15),r=n(18),a=n(46),c=n(154),i=RegExp.prototype;e.exports=function(e){var t=e.flags;return t!==undefined||"flags"in i||r(e,"flags")||!a(i,e)?t:o(c,e)}},function(e,t,n){"use strict";var o=n(6),r=n(5).RegExp;e.exports=o((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){"use strict";var o=n(6),r=n(5).RegExp;e.exports=o((function(){var e=r("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},function(e,t,n){"use strict";var o=n(4),r=n(119);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(49);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(80).end,r=n(160);e.exports=r("trimEnd")?function(){return o(this)}:"".trimEnd},function(e,t,n){"use strict";var o=n(80).start,r=n(160);e.exports=r("trimStart")?function(){return o(this)}:"".trimStart},function(e,t,n){"use strict";var o=n(5),r=n(435),a=o.RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw a("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(60),r=n(15),a=n(145),c=n(19),i=n(23),l=n(140),d=n(107),u=n(139),s=n(14).aTypedArrayConstructor;e.exports=function(e){var t,n,m,p,h,f,C=a(this),N=c(e),b=arguments.length,V=b>1?arguments[1]:undefined,g=V!==undefined,v=d(N);if(v&&!u(v))for(f=(h=l(N,v)).next,N=[];!(p=r(f,h)).done;)N.push(p.value);for(g&&b>2&&(V=o(V,arguments[2])),n=i(N),m=new(s(C))(n),t=0;n>t;t++)m[t]=g?V(N[t],t):N[t];return m}},function(e,t,n){"use strict";var o=n(7),r=n(111),a=n(67).getWeakData,c=n(9),i=n(11),l=n(78),d=n(79),u=n(25),s=n(18),m=n(39),p=m.set,h=m.getterFor,f=u.find,C=u.findIndex,N=o([].splice),b=0,V=function(e){return e.frozen||(e.frozen=new g)},g=function(){this.entries=[]},v=function(e,t){return f(e.entries,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=C(this.entries,(function(t){return t[0]===e}));return~t&&N(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e((function(e,r){l(e,m),p(e,{type:t,id:b++,frozen:undefined}),r!=undefined&&d(r,e[o],{that:e,AS_ENTRIES:n})})),m=u.prototype,f=h(t),C=function(e,t,n){var o=f(e),r=a(c(t),!0);return!0===r?V(o).set(t,n):r[o.id]=n,e};return r(m,{"delete":function(e){var t=f(this);if(!i(e))return!1;var n=a(e);return!0===n?V(t)["delete"](e):n&&s(n,t.id)&&delete n[t.id]},has:function(e){var t=f(this);if(!i(e))return!1;var n=a(e);return!0===n?V(t).has(e):n&&s(n,t.id)}}),r(m,n?{get:function(e){var t=f(this);if(i(e)){var n=a(e);return!0===n?V(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return C(this,e,t)}}:{add:function(e){return C(this,e,!0)}}),u}}},function(e,t,n){"use strict";var o=n(5),r=n(47),a=n(13),c=n(49),i=n(66),l=n(151),d=/MSIE .\./.test(c),u=o.Function,s=function(e){return d?function(t,n){var o=l(arguments.length,1)>2,c=a(t)?t:u(t),d=o?i(arguments,2):undefined;return e(o?function(){r(c,this,d)}:c,n)}:e};e.exports={setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.setupDrag=t.resizeStartHandler=t.dragStartHandler=void 0;var o=n(484),r=n(33);function a(e,t,n,o,r,a,c){try{var i=e[a](c),l=i.value}catch(d){return void n(d)}i.done?t(l):Promise.resolve(l).then(o,r)}var c,i,l,d,u,s=(0,n(82).createLogger)("drag"),m=!1,p=!1,h=[0,0],f=function(e){return(0,r.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},C=function(e,t){return(0,r.winset)(e,"pos",t[0]+","+t[1])},N=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,o,r,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.log("setting up"),c=e.config.window,n.next=4,f(c);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],o=b(t),r=o[0],a=o[1],r&&C(c,a),s.debug("current state",{ref:c,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var c=e.apply(t,n);function i(e){a(c,o,r,i,l,"next",e)}function l(e){a(c,o,r,i,l,"throw",e)}i(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=N;var b=function(e){var t=e[0],n=e[1],o=!1;return t<0?(t=0,o=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,o=!0),n<0?(n=0,o=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,o=!0),[o,[t,n]]};t.dragStartHandler=function(e){s.log("drag start"),m=!0,i=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",g),document.addEventListener("mouseup",V),g(e)};var V=function _(e){s.log("drag end"),g(e),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",_),m=!1},g=function(e){m&&(e.preventDefault(),C(c,(0,o.vecAdd)([e.screenX,e.screenY],h,i)))};t.resizeStartHandler=function(e,t){return function(n){l=[e,t],s.log("resize start",l),p=!0,i=[window.screenLeft-n.screenX,window.screenTop-n.screenY],d=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",y),document.addEventListener("mouseup",v),y(n)}};var v=function x(e){s.log("resize end",u),y(e),document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x),p=!1},y=function(e){p&&(e.preventDefault(),(u=(0,o.vecAdd)(d,(0,o.vecMultiply)(l,(0,o.vecAdd)([e.screenX,e.screenY],(0,o.vecInverse)([window.screenLeft,window.screenTop]),i,[1,1]))))[0]=Math.max(u[0],250),u[1]=Math.max(u[1],120),function(e,t){(0,r.winset)(e,"size",t[0]+","+t[1])}(c,u))}},function(e,t,n){"use strict";t.__esModule=!0,t.refocusLayout=t.Layout=void 0;var o=n(0),r=n(10),a=n(33);t.refocusLayout=function(){if(!a.IS_IE8){var e=document.getElementById("Layout__content");e&&e.focus()}};var c=function(e){var t=e.className,n=e.theme,a=void 0===n?"nanotrasen":n,c=e.children;return(0,o.createVNode)(1,"div","theme-"+a,(0,o.createVNode)(1,"div",(0,r.classes)(["Layout",t]),c,0),2)};t.Layout=c;c.Content=function(e){var t=e.className,n=e.scrollable,a=e.children;return(0,o.createVNode)(1,"div",(0,r.classes)(["Layout__content",n&&"Layout__content--scrollable",t]),a,0,{id:"Layout__content"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=void 0;var o=n(0),r=n(10);t.Tooltip=function(e){var t=e.content,n=e.position,a=void 0===n?"bottom":n,c="string"==typeof t&&t.length>35;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var o=n(0),r=n(10),a=n(22),c=["className","children"];t.Dimmer=function(e){var t=e.className,n=e.children,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Dimmer"].concat(t))},i,{children:(0,o.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var o=n(0),r=n(10);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,o.createVNode)(1,"div",(0,r.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(0),r=n(68),a=n(10),c=["children"],i=["size","style"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var d=function(e){var t=e.children,n=l(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=d,d.defaultHooks=a.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,a=e.style,c=l(e,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},a)},c)))};t.GridColumn=u,d.defaultHooks=a.pureComponentHooks,d.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(12),a=n(10),c=n(163);function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},d=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={originalValue:t.value,value:t.value,dragging:!1,editing:!1,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix,a=t.disabled;n.state.editing||a||(document.body.style["pointer-events"]="none",n.ref=e.currentTarget,n.setState({originalValue:o,dragging:!1,value:o,origin:l(e,r)}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t,o=n.props,a=o.minValue,c=o.maxValue,i=o.step,d=o.dragMatrix;if(!o.disabled){var u=n.ref.offsetWidth/((c-a)/i),s=null!=(t=n.props.stepPixelSize)?t:u;"function"==typeof s&&(s=s(u)),n.setState((function(t){var n=Object.assign({},t),o=t.origin,u=l(e,d)-o;if(t.dragging){var m=Math.trunc(u/s);n.value=(0,r.clamp)(Math.floor(n.originalValue/i)*i+m*i,a,c)}else Math.abs(u)>4&&(n.dragging=!0);return n}))}},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,c=a.dragging,i=a.value;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({originalValue:null,dragging:!1,editing:!c,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),c)n.suppressFlicker(),o&&o(e,i),r&&r(e,i);else if(n.inputRef){var l=n.inputRef.current;l.value=i;try{l.focus(),l.select()}catch(d){}}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),a.prototype.render=function(){var e=this,t=this.state,n=t.dragging,a=t.editing,i=t.value,l=t.suppressingFlicker,d=this.props,u=d.animated,s=d.value,m=d.unit,p=d.minValue,h=d.maxValue,f=d.format,C=d.onChange,N=d.onDrag,b=d.children,V=d.height,g=d.lineHeight,v=d.fontSize,y=d.disabled,_=s;(n||l)&&(_=i);var x=function(e){return e+(m?" "+m:"")},k=u&&!n&&!l&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:_,format:f,children:x})||x(f?f(_):_),L=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:!a||y?"none":undefined,height:V,"line-height":g,"font-size":v},onBlur:function(t){if(a){var n=parseInt(t.target.value,10);if(isNaN(n)||t.target.value.match(/[^0-9]/g))e.setState({editing:!1});else{var o=(0,r.clamp)(n,p,h);e.setState({editing:!1,value:o}),e.suppressFlicker(),C&&C(t,o),N&&N(t,o)}}},onKeyDown:function(t){if(13===t.keyCode){var n=parseInt(t.target.value,10);if(isNaN(n)||t.target.value.match(/[^0-9]/g))return void e.setState({editing:!1});var o=(0,r.clamp)(n,p,h);return e.setState({editing:!1,value:o}),e.suppressFlicker(),C&&C(t,o),void(N&&N(t,o))}27!==t.keyCode||e.setState({editing:!1})},disabled:y},null,this.inputRef);return b({dragging:n,editing:a,value:s,displayValue:_,displayElement:k,inputElement:L,handleDragStart:this.handleDragStart})},a}(o.Component);t.DraggableControl=d,d.defaultHooks=a.pureComponentHooks,d.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children","disabled"];t.Slider=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.fillValue,y=e.color,_=e.ranges,x=void 0===_?{}:_,k=e.children,L=e.disabled,w=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),B=k!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V,disabled:L},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=v!==undefined&&null!==v,h=((0,r.scale)(n,m,s),(0,r.scale)(null!=v?v:c,m,s)),f=(0,r.scale)(c,m,s),C=y||(0,r.keyOfMatchingRange)(null!=v?v:n,x)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Slider",L&&"Slider__disabled","ProgressBar",L?"ProgressBar--color--disabled":"ProgressBar--color--"+C,g,(0,i.computeBoxClassName)(w)]),[(0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(h)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(h,f))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(f)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",B?k:l,0),d],0,Object.assign({disabled:L},(0,i.computeBoxProps)(w),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(0),r=n(1),a=n(2);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.siliconUser,d=void 0===l?i.siliconUser:l,u=e.locked,s=void 0===u?i.locked:u,m=e.normallyLocked,p=void 0===m?i.normallyLocked:m,h=e.onLockStatusChange,f=void 0===h?function(){return c("lock")}:h,C=e.accessText,N=void 0===C?"an ID card":C;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{color:d&&"grey",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{m:"0",color:p?"red":"green",icon:p?"lock":"unlock",content:p?"Locked":"Unlocked",onClick:function(){f&&f(!s)}})})]})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe ",N," to ",s?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";e.exports=n(544)()},function(e,t,n){"use strict";t.__esModule=!0,t.Countdown=void 0;var o=n(0),r=n(22),a=["format"];function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.timeLeft,0)},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var l=i.prototype;return l.tick=function(){var e=Math.max(this.state.value-this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},l.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},l.componentWillUnmount=function(){clearInterval(this.timer)},l.componentDidUpdate=function(e){var t=this;this.props.current!==e.current&&this.setState((function(e){return{value:Math.max(100*t.props.timeLeft,0)}})),this.timer||this.componentDidMount()},l.render=function(){var e=this.props,t=e.format,n=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,a),c=new Date(this.state.value).toISOString().slice(11,19);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Box,Object.assign({as:"span"},n,{children:t?t(this.state.value,c):c})))},i}(o.Component);t.Countdown=i,i.defaultProps={rate:1e3}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosScan=void 0;var o=n(0),r=n(30),a=(n(1),n(2));t.AtmosScan=function(e,t){var n=e.data.aircontents;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,r.filter)((function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}))(n).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.entry,color:(t=e.val,n=e.bad_low,r=e.poor_low,c=e.poor_high,i=e.bad_high,tc?"average":t>i?"bad":"good"),children:[e.val,e.units]},e.entry);var t,n,r,c,i}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_messenger=t.MessengerList=t.ActiveConversation=void 0;var o=n(0),r=n(30),a=n(1),c=n(2);t.pda_messenger=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);return r.active_convo?(0,o.createComponentVNode)(2,i,{data:r}):(0,o.createComponentVNode)(2,l,{data:r})};var i=function(e,t){var n=(0,a.useBackend)(t).act,i=e.data,l=i.convo_name,d=i.convo_job,u=i.messages,s=i.active_convo,m=(0,a.useLocalState)(t,"clipboardMode",!1),p=m[0],h=m[1],f=(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Conversation with "+l+" ("+d+")",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{height:"97%",overflowY:"auto",children:(0,r.filter)((function(e){return e.target===s}))(u).map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{textAlign:e.sent?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,c.Icon,{fontSize:2.5,color:e.sent?"#4d9121":"#cd7a0d",position:"absolute",left:e.sent?null:"0px",right:e.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:e.sent?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,c.Box,{inline:!0,backgroundColor:e.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:e.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[e.sent?"You:":"Them:"," ",e.message]})]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:s})},content:"Reply"})]})]});return p&&(f=(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Conversation with "+l+" ("+d+")",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===s}))(u).map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{color:e.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[e.sent?"You:":"Them:"," ",(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:e.message})]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:s})},content:"Reply"})]})),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Messenger Functions",children:(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"Convo"})},children:"Delete Conversations"})})}),f]})};t.ActiveConversation=i;var l=function(e,t){var n=(0,a.useBackend)(t).act,r=e.data,i=r.convopdas,l=r.pdas,u=r.charges,s=r.silent,m=r.toff,p=r.ringtone_list,h=r.ringtone,f=(0,a.useLocalState)(t,"searchTerm",""),C=f[0],N=f[1];return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Messenger Functions",children:[(0,o.createComponentVNode)(2,c.Button,{selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return n("Toggle Ringer")},children:["Ringer: ",s?"Off":"On"]}),(0,o.createComponentVNode)(2,c.Button,{color:m?"bad":"green",icon:"power-off",onClick:function(){return n("Toggle Messenger")},children:["Messenger: ",m?"Off":"On"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"All"})},children:"Delete All Conversations"}),(0,o.createComponentVNode)(2,c.Button,{icon:"bell",onClick:function(){return n("Ringtone")},children:"Set Custom Ringtone"}),(0,o.createComponentVNode)(2,c.Button,{children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:h,width:"110px",options:Object.keys(p),onSelected:function(e){return n("Available_Ringtones",{selected_ringtone:e})}})})]})}),!m&&(0,o.createComponentVNode)(2,c.Box,{mt:2,children:[!!u&&(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Cartridge Special Function",children:[u," charges left."]})}),!i.length&&!l.length&&(0,o.createComponentVNode)(2,c.Box,{children:"No current conversations"})||(0,o.createComponentVNode)(2,c.Box,{children:["Search:"," ",(0,o.createComponentVNode)(2,c.Input,{value:C,onInput:function(e,t){N(t)}}),(0,o.createComponentVNode)(2,d,{title:"Current Conversations",data:r,pdas:i,msgAct:"Select Conversation",searchTerm:C}),(0,o.createComponentVNode)(2,d,{title:"Other PDAs",pdas:l,msgAct:"Message",data:r,searchTerm:C})]})]})||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Messenger Offline."})]})};t.MessengerList=l;var d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.data,i=e.pdas,l=e.title,d=e.msgAct,u=e.searchTerm,s=r.charges,m=r.plugins;return i&&i.length?(0,o.createComponentVNode)(2,c.Section,{level:2,title:l,children:i.filter((function(e){return e.Name.toLowerCase().includes(u.toLowerCase())})).map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-circle-down",content:e.Name,onClick:function(){return n(d,{target:e.uid})}}),!!s&&m.map((function(t){return(0,o.createComponentVNode)(2,c.Button,{icon:t.icon,content:t.name,onClick:function(){return n("Messenger Plugin",{plugin:t.uid,target:e.uid})}},t.uid)}))]},e.uid)}))}):(0,o.createComponentVNode)(2,c.Section,{level:2,title:l,children:"No PDAs found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.PowerMonitorMainContent=t.PowerMonitor=void 0;var o=n(0),r=n(30),a=n(48),c=n(12),i=n(10),l=n(21),d=n(1),u=n(2),s=n(3),m=6e5;t.PowerMonitor=function(e,t){return(0,o.createComponentVNode)(2,s.Window,{resizeable:!0,children:(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)})})};var p=function(e,t){var n=(0,d.useBackend)(t),r=(n.act,n.data),a=r.powermonitor,c=r.select_monitor;return(0,o.createComponentVNode)(2,u.Box,{m:0,children:[!a&&c&&(0,o.createComponentVNode)(2,h),a&&(0,o.createComponentVNode)(2,f)]})};t.PowerMonitorMainContent=p;var h=function(e,t){var n=(0,d.useBackend)(t),r=n.act,a=n.data.powermonitors;return(0,o.createComponentVNode)(2,u.Section,{title:"Select Power Monitor",children:a.map((function(e){return(0,o.createComponentVNode)(2,u.Box,{children:(0,o.createComponentVNode)(2,u.Button,{content:e.Area,icon:"arrow-right",onClick:function(){return r("selectmonitor",{selectmonitor:e.uid})}})},e)}))})},f=function(e,t){var n,i=(0,d.useBackend)(t),s=i.act,p=i.data,h=p.powermonitor,f=p.history,b=p.apcs,V=p.select_monitor;if(p.no_powernet)n=(0,o.createComponentVNode)(2,u.Box,{color:"bad",textAlign:"center",children:[(0,o.createComponentVNode)(2,u.Icon,{name:"exclamation-triangle",size:"2",my:"0.5rem"}),(0,o.createVNode)(1,"br"),"Warning: The monitor is not connected to power grid via cable!"]});else{var g=(0,d.useLocalState)(t,"sortByField",null),v=g[0],y=g[1],_=f.supply[f.supply.length-1]||0,x=f.demand[f.demand.length-1]||0,k=f.supply.map((function(e,t){return[t,e]})),L=f.demand.map((function(e,t){return[t,e]})),w=Math.max.apply(Math,[m].concat(f.supply,f.demand)),B=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===v&&(0,r.sortBy)((function(e){return e.Name})),"charge"===v&&(0,r.sortBy)((function(e){return-e.CellPct})),"draw"===v&&(0,r.sortBy)((function(e){return-e.Load}))])(b);n=(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"200px",children:(0,o.createComponentVNode)(2,u.Section,{children:(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Supply",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:_,minValue:0,maxValue:w,color:"green",children:(0,c.toFixed)(_/1e3)+" kW"})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:x,minValue:0,maxValue:w,color:"red",children:(0,c.toFixed)(x/1e3)+" kW"})})]})})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,u.Section,{position:"relative",height:"100%",children:[(0,o.createComponentVNode)(2,u.Chart.Line,{fillPositionedParent:!0,data:k,rangeX:[0,k.length-1],rangeY:[0,w],strokeColor:"rgba(32, 177, 66, 1)",fillColor:"rgba(32, 177, 66, 0.25)"}),(0,o.createComponentVNode)(2,u.Chart.Line,{fillPositionedParent:!0,data:L,rangeX:[0,L.length-1],rangeY:[0,w],strokeColor:"rgba(219, 40, 40, 1)",fillColor:"rgba(219, 40, 40, 0.25)"})]})})]}),(0,o.createComponentVNode)(2,u.Box,{mb:1,children:[(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"name"===v,content:"Name",onClick:function(){return y("name"!==v&&"name")}}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"charge"===v,content:"Charge",onClick:function(){return y("charge"!==v&&"charge")}}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"draw"===v,content:"Draw",onClick:function(){return y("draw"!==v&&"draw")}})]}),(0,o.createComponentVNode)(2,u.Table,{children:[(0,o.createComponentVNode)(2,u.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,u.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,u.Table.Cell,{textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),B.map((function(e,t){return(0,o.createComponentVNode)(2,u.Table.Row,{className:"Table__row candystripe",children:[(0,o.createComponentVNode)(2,u.Table.Cell,{children:(0,l.decodeHtmlEntities)(e.Name)}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-right text-nowrap",children:(0,o.createComponentVNode)(2,C,{charging:e.CellStatus,charge:e.CellPct})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-right text-nowrap",children:e.Load}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Equipment})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Lights})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Environment})})]},e.id)}))]})],4)}return(0,o.createComponentVNode)(2,u.Section,{title:h,buttons:(0,o.createComponentVNode)(2,u.Box,{m:0,children:V&&(0,o.createComponentVNode)(2,u.Button,{content:"Back",icon:"arrow-up",onClick:function(){return s("return")}})}),children:n})},C=function(e){var t=e.charging,n=e.charge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Icon,{width:"18px",textAlign:"center",name:"N"===t&&(n>50?"battery-half":"battery-quarter")||"C"===t&&"bolt"||"F"===t&&"battery-full"||"M"===t&&"slash",color:"N"===t&&(n>50?"yellow":"red")||"C"===t&&"yellow"||"F"===t&&"green"||"M"===t&&"orange"}),(0,o.createComponentVNode)(2,u.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,c.toFixed)(n)+"%"})],4)};C.defaultHooks=i.pureComponentHooks;var N=function(e){var t,n;switch(e.status){case"AOn":t=!0,n=!0;break;case"AOff":t=!0,n=!1;break;case"On":t=!1,n=!0;break;case"Off":t=!1,n=!1}var r=(n?"On":"Off")+" ["+(t?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,u.ColorBox,{color:n?"good":"bad",content:t?undefined:"M",title:r})};N.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RndRoute=void 0;var o=n(1);t.RndRoute=function(e,t){var n=e.render,r=(0,o.useBackend)(t).data,a=r.menu,c=r.submenu,i=function(e,t){return null===e||e===undefined||("function"==typeof e?e(t):e===t)};return i(e.menu,a)&&i(e.submenu,c)?n():null}},function(e,t,n){e.exports=n(234)},function(e,t,n){"use strict";var o=n(0);n(236),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(268),n(271),n(272),n(273),n(186),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(290),n(291),n(292),n(294),n(295),n(297),n(298),n(300),n(301),n(302),n(303),n(304),n(305),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(316),n(317),n(318),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(331),n(332),n(333),n(334),n(335),n(336),n(338),n(339),n(340),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(366),n(367),n(368),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(209),n(396),n(398),n(399),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(413),n(414),n(415),n(416),n(417),n(419),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(473),n(475),n(478),n(479);var r=n(482);n(483);n(217);var a=n(1),c=n(33),i=n(218),l=n(82);n(485),n(486),n(487),n(488),n(489);var d=n(490);n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504);Date.now();var u,s=(0,d.createStore)(),m=!0,p=function(){for(s.subscribe((function(){!function(){try{var e=s.getState();m&&(l.logger.log("initial render",e),(0,i.setupDrag)(e));var t=(0,n(162).getRoutedComponent)(e),r=(0,o.createComponentVNode)(2,d.StoreProvider,{store:s,children:(0,o.createComponentVNode)(2,t)});u||(u=document.getElementById("react-root")),(0,o.render)(r,u)}catch(a){throw l.logger.error("rendering error",a),a}m&&(m=!1)}()})),window.update=function(e){var t="string"==typeof e?function(e){var t=function(e,t){return"object"==typeof t&&null!==t&&t.__number__?parseFloat(t.__number__):t};c.IS_IE8&&(t=undefined);try{return JSON.parse(e,t)}catch(o){l.logger.log(o),l.logger.log("What we got:",e);var n=o&&o.message;throw new Error("JSON parsing error: "+n)}}(e):e;s.dispatch((0,a.backendUpdate)(t))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}(0,r.loadCSS)("font-awesome.css")};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()},function(e,t,n){"use strict";t.__esModule=!0,t.Fragment=t.EMPTY_OBJ=t.Component=void 0,t._CI=Be,t._HI=R,t._M=Ie,t._MCCC=Me,t._ME=Ae,t._MFCC=Oe,t._MP=Le,t._MR=be,t._RFC=Se,t.__render=je,t.createComponentVNode=function(e,t,n,o,r){var c=new S(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(a(o))return n;if(a(n))return u(o,null);return w(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(a(o))return n;if(a(n))return o;return w(n,o)}(e,t,r),t);x.createVNode&&x.createVNode(c);return c},t.createFragment=A,t.createPortal=function(e,t){var n=R(e);return I(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),We(n,e,o,r)}},t.createTextVNode=T,t.createVNode=I,t.directClone=E,t.findDOMfromVNode=V,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(i(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&a(e.children)&&P(e,t.children),void 0!==t.className&&(a(e.className)&&(e.className=t.className||null),t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?u(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.options=void 0,t.render=We,t.rerender=Ye,t.version=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function a(e){return null==e}function c(e){return null===e||!1===e||!0===e||void 0===e}function i(e){return"function"==typeof e}function l(e){return"string"==typeof e}function d(e){return null===e}function u(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function s(e){return!d(e)&&"object"==typeof e}var m={};t.EMPTY_OBJ=m;function p(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function f(e,t,n){d(n)?h(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function N(e){for(var t=0;t0,h=d(m),f=l(m)&&"$"===m[0];p||h||f?(n=n||t.slice(0,u),(p||f)&&(s=E(s)),(h||f)&&(s.key="$"+u),n.push(s)):n&&n.push(s),s.flags|=65536}}a=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=E(t)),a=2;return e.children=n,e.childFlags=a,e}function R(e){return c(e)||r(e)?T(e,null):o(e)?A(e,0,null):16384&e.flags?E(e):e}var F="http://www.w3.org/1999/xlink",D="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":F,"xlink:arcrole":F,"xlink:href":F,"xlink:role":F,"xlink:show":F,"xlink:title":F,"xlink:type":F,"xml:base":D,"xml:lang":D,"xml:space":D};function W(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=W(0),U=W(null),H=W(!0);function G(e,t){var n=t.$EV;return n||(n=t.$EV=W(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?Y(t,!0,e,J(t)):t.stopPropagation()}}(e):function(e){return function(t){Y(t,!1,e,J(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function K(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function Y(e,t,n,o){var r=function(e){return i(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var c=a[n];if(c&&(o.dom=r,c.event?c.event(c.data,e):c(e),e.cancelBubble))return}r=r.parentNode}while(!d(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function $(){return this.defaultPrevented}function X(){return this.cancelBubble}function J(e){var t={dom:document};return e.isDefaultPrevented=$,e.isPropagationStopped=X,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function Q(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Z(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||m,a=o.dom;if(l(e))Q(r,e,n);else for(var c=0;c-1&&t.options[c]&&(i=t.options[c].value),n&&a(i)&&(i=e.defaultValue),ce(o,i)}}var de,ue,se=Z("onInput",pe),me=Z("onChange");function pe(e,t,n){var o=e.value,r=t.value;if(a(o)){if(n){var c=e.defaultValue;a(c)||c===r||(t.defaultValue=c,t.value=c)}}else r!==o&&(t.defaultValue=o,t.value=o)}function he(e,t,n,o,r,a){64&e?ae(o,n):256&e?le(o,n,r,t):128&e&&pe(o,n,r),a&&(n.$V=t)}function fe(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ie)}(t):128&e&&function(e,t){ee(e,"input",se),t.onChange&&ee(e,"change",me)}(t,n)}function Ce(e){return e.type&&te(e.type)?!a(e.checked):!a(e.value)}function Ne(e){e&&!B(e,null)&&e.current&&(e.current=null)}function be(e,t,n){e&&(i(e)||void 0!==e.current)&&n.push((function(){B(e,t)||void 0===e.current||(e.current=t)}))}function Ve(e,t){ge(e),g(e,t)}function ge(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;Ne(t);var c=e.childFlags;if(!d(r))for(var l=Object.keys(r),u=0,s=l.length;u0;for(var i in c&&(a=Ce(n))&&fe(t,o,n),n)ke(i,null,n[i],o,r,a,null);c&&he(t,e,o,n,!0,a)}function we(e,t,n){var o=R(e.render(t,e.state,n)),r=n;return i(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function Be(e,t,n,o,r,a){var c=new t(n,o),l=c.$N=Boolean(t.getDerivedStateFromProps||c.getSnapshotBeforeUpdate);if(c.$SVG=r,c.$L=a,e.children=c,c.$BS=!1,c.context=o,c.props===m&&(c.props=n),l)c.state=y(c,n,c.state);else if(i(c.componentWillMount)){c.$BR=!0,c.componentWillMount();var u=c.$PS;if(!d(u)){var s=c.state;if(d(s))c.state=u;else for(var p in u)s[p]=u[p];c.$PS=null}c.$BR=!1}return c.$LI=we(c,n,o),c}function Se(e,t){var n=e.props||m;return 32768&e.flags?e.type.render(n,e.ref,t):e.type(n,t)}function Ie(e,t,n,o,r,a){var c=e.flags|=16384;481&c?Ae(e,t,n,o,r,a):4&c?function(e,t,n,o,r,a){var c=Be(e,e.type,e.props||m,n,o,a);Ie(c.$LI,t,c.$CX,o,r,a),Me(e.ref,c,a)}(e,t,n,o,r,a):8&c?(!function(e,t,n,o,r,a){Ie(e.children=R(Se(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Oe(e,a)):512&c||16&c?Te(e,t,r):8192&c?function(e,t,n,o,r,a){var c=e.children,i=e.childFlags;12&i&&0===c.length&&(i=e.childFlags=2,c=e.children=M());2===i?Ie(c,n,t,o,r,a):Ee(c,n,t,o,r,a)}(e,n,t,o,r,a):1024&c&&function(e,t,n,o,r){Ie(e.children,e.ref,t,!1,null,r);var a=M();Te(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Te(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||f(t,o,n)}function Ae(e,t,n,o,r,c){var i=e.flags,l=e.props,u=e.className,s=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&i)>0),p=e.children;if(a(u)||""===u||(o?m.setAttribute("class",u):m.className=u),16===s)k(m,p);else if(1!==s){var h=o&&"foreignObject"!==e.type;2===s?(16384&p.flags&&(e.children=p=E(p)),Ie(p,m,n,h,null,c)):8!==s&&4!==s||Ee(p,m,n,h,null,c)}d(t)||f(t,m,r),d(l)||Le(e,i,l,m,o),be(e.ref,m,c)}function Ee(e,t,n,o,r,a){for(var c=0;c0,d!==u){var h=d||m;if((i=u||m)!==m)for(var f in(s=(448&r)>0)&&(p=Ce(i)),i){var C=h[f],N=i[f];C!==N&&ke(f,C,N,l,o,p,e)}if(h!==m)for(var b in h)a(i[b])&&!a(h[b])&&ke(b,h[b],null,l,o,p,e)}var V=t.children,g=t.className;e.className!==g&&(a(g)?l.removeAttribute("class"):o?l.setAttribute("class",g):l.className=g);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,V):Re(e.childFlags,t.childFlags,e.children,V,l,n,o&&"foreignObject"!==t.type,null,e,c);s&&he(r,t,l,i,!1,p);var v=t.ref,y=e.ref;y!==v&&(Ne(y),be(v,l,c))}(e,t,o,r,p,s):4&p?function(e,t,n,o,r,a,c){var l=t.children=e.children;if(d(l))return;l.$L=c;var s=t.props||m,p=t.ref,h=e.ref,f=l.state;if(!l.$N){if(i(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(s,o),l.$UN)return;l.$BR=!1}d(l.$PS)||(f=u(f,l.$PS),l.$PS=null)}Fe(l,f,s,n,o,r,!1,a,c),h!==p&&(Ne(h),be(p,l,c))}(e,t,n,o,r,l,s):8&p?function(e,t,n,o,r,c,l){var d=!0,u=t.props||m,s=t.ref,p=e.props,h=!a(s),f=e.children;h&&i(s.onComponentShouldUpdate)&&(d=s.onComponentShouldUpdate(p,u));if(!1!==d){h&&i(s.onComponentWillUpdate)&&s.onComponentWillUpdate(p,u);var C=R(Se(t,o));Pe(f,C,n,o,r,c,l),t.children=C,h&&i(s.onComponentDidUpdate)&&s.onComponentDidUpdate(p,u)}else t.children=f}(e,t,n,o,r,l,s):16&p?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,o,r,a){var c=e.children,i=t.children,l=e.childFlags,d=t.childFlags,u=null;12&d&&0===i.length&&(d=t.childFlags=2,i=t.children=M());var s=0!=(2&d);if(12&l){var m=c.length;(8&l&&8&d||s||!s&&i.length>m)&&(u=V(c[m-1],!1).nextSibling)}Re(l,d,c,i,n,o,r,u,e,a)}(e,t,n,o,r,s):function(e,t,n,o){var r=e.ref,a=t.ref,i=t.children;if(Re(e.childFlags,t.childFlags,e.children,i,r,n,!1,null,e,o),t.dom=e.dom,r!==a&&!c(i)){var l=i.dom;C(r,l),h(a,l)}}(e,t,o,s)}function Re(e,t,n,o,r,a,c,i,l,d){switch(e){case 2:switch(t){case 2:Pe(n,o,r,a,c,i,d);break;case 1:Ve(n,r);break;case 16:ge(n),k(r,o);break;default:!function(e,t,n,o,r,a){ge(e),Ee(t,n,o,r,V(e,!0),a),g(e,n)}(n,o,r,a,c,d)}break;case 1:switch(t){case 2:Ie(o,r,a,c,i,d);break;case 1:break;case 16:k(r,o);break;default:Ee(o,r,a,c,i,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:k(n,t))}(n,o,r);break;case 2:ye(r),Ie(o,r,a,c,i,d);break;case 1:ye(r);break;default:ye(r),Ee(o,r,a,c,i,d)}break;default:switch(t){case 16:ve(n),k(r,o);break;case 2:_e(r,l,n),Ie(o,r,a,c,i,d);break;case 1:_e(r,l,n);break;default:var u=0|n.length,s=0|o.length;0===u?s>0&&Ee(o,r,a,c,i,d):0===s?_e(r,l,n):8===t&&8===e?function(e,t,n,o,r,a,c,i,l,d){var u,s,m=a-1,p=c-1,h=0,f=e[h],C=t[h];e:{for(;f.key===C.key;){if(16384&C.flags&&(t[h]=C=E(C)),Pe(f,C,n,o,r,i,d),e[h]=C,++h>m||h>p)break e;f=e[h],C=t[h]}for(f=e[m],C=t[p];f.key===C.key;){if(16384&C.flags&&(t[p]=C=E(C)),Pe(f,C,n,o,r,i,d),e[m]=C,m--,p--,h>m||h>p)break e;f=e[m],C=t[p]}}if(h>m){if(h<=p)for(s=(u=p+1)p)for(;h<=m;)Ve(e[h++],n);else!function(e,t,n,o,r,a,c,i,l,d,u,s,m){var p,h,f,C=0,N=i,b=i,g=a-i+1,y=c-i+1,_=new Int32Array(y+1),x=g===o,k=!1,L=0,w=0;if(r<4||(g|y)<32)for(C=N;C<=a;++C)if(p=e[C],wi?k=!0:L=i,16384&h.flags&&(t[i]=h=E(h)),Pe(p,h,l,n,d,u,m),++w;break}!x&&i>c&&Ve(p,l)}else x||Ve(p,l);else{var B={};for(C=b;C<=c;++C)B[t[C].key]=C;for(C=N;C<=a;++C)if(p=e[C],wN;)Ve(e[N++],l);_[i-b]=C+1,L>i?k=!0:L=i,16384&(h=t[i]).flags&&(t[i]=h=E(h)),Pe(p,h,l,n,d,u,m),++w}else x||Ve(p,l);else x||Ve(p,l)}if(x)_e(l,s,e),Ee(t,l,n,d,u,m);else if(k){var S=function(e){var t=0,n=0,o=0,r=0,a=0,c=0,i=0,l=e.length;l>De&&(De=l,de=new Int32Array(l),ue=new Int32Array(l));for(;n>1]]0&&(ue[n]=de[a-1]),de[a]=n)}a=r+1;var d=new Int32Array(a);c=de[a-1];for(;a-- >0;)d[a]=c,c=ue[c],de[a]=0;return d}(_);for(i=S.length-1,C=y-1;C>=0;C--)0===_[C]?(16384&(h=t[L=C+b]).flags&&(t[L]=h=E(h)),Ie(h,l,n,d,(f=L+1)=0;C--)0===_[C]&&(16384&(h=t[L=C+b]).flags&&(t[L]=h=E(h)),Ie(h,l,n,d,(f=L+1)c?c:a,m=0;mc)for(m=s;m=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),b=m("concat"),V=function(e){if(!i(e))return!1;var t=e[f];return t!==undefined?!!t:c(e)};o({target:"Array",proto:!0,arity:1,forced:!N||!b},{concat:function(e){var t,n,o,r,a,c=l(this),i=s(c,0),m=0;for(t=-1,o=arguments.length;t9007199254740991)throw C("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw C("Maximum allowed index exceeded");u(i,m++,a)}return i.length=m,i}})},function(e,t,n){"use strict";var o=n(4),r=n(183),a=n(61);o({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(25).every;o({target:"Array",proto:!0,forced:!n(54)("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(138),a=n(61);o({target:"Array",proto:!0},{fill:r}),a("fill")},function(e,t,n){"use strict";var o=n(4),r=n(25).filter;o({target:"Array",proto:!0,forced:!n(93)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(25).find,a=n(61),c=!0;"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("find")},function(e,t,n){"use strict";var o=n(4),r=n(25).findIndex,a=n(61),c=!0;"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(184),a=n(19),c=n(23),i=n(40),l=n(91);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=a(this),n=c(t),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:i(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(184),a=n(27),c=n(19),i=n(23),l=n(91);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=c(this),o=i(n);return a(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(267);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(25).forEach,r=n(54)("forEach");e.exports=r?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(269);o({target:"Array",stat:!0,forced:!n(108)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(5),r=n(60),a=n(15),c=n(19),i=n(270),l=n(139),d=n(92),u=n(23),s=n(59),m=n(140),p=n(107),h=o.Array;e.exports=function(e){var t=c(e),n=d(this),o=arguments.length,f=o>1?arguments[1]:undefined,C=f!==undefined;C&&(f=r(f,o>2?arguments[2]:undefined));var N,b,V,g,v,y,_=p(t),x=0;if(!_||this==h&&l(_))for(N=u(t),b=n?new this(N):h(N);N>x;x++)y=C?f(t[x],x):t[x],s(b,x,y);else for(v=(g=m(t,_)).next,b=n?new this:[];!(V=a(v,g)).done;x++)y=C?i(g,f,[V.value,x],!0):V.value,s(b,x,y);return b.length=x,b}},function(e,t,n){"use strict";var o=n(9),r=n(185);e.exports=function(e,t,n,a){try{return a?t(o(n)[0],n[1]):t(n)}catch(c){r(e,"throw",c)}}},function(e,t,n){"use strict";var o=n(4),r=n(88).includes,a=n(6),c=n(61);o({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),c("includes")},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(88).indexOf,c=n(54),i=r([].indexOf),l=!!i&&1/i([1],1,-0)<0,d=c("indexOf");o({target:"Array",proto:!0,forced:l||!d},{indexOf:function(e){var t=arguments.length>1?arguments[1]:undefined;return l?i(this,e,t)||0:a(this,e,t)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(75)})},function(e,t,n){"use strict";var o=n(187).IteratorPrototype,r=n(52),a=n(64),c=n(53),i=n(94),l=function(){return this};e.exports=function(e,t,n,d){var u=t+" Iterator";return e.prototype=r(o,{next:a(+!d,n)}),c(e,u,!1,!0),i[u]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(85),c=n(31),i=n(54),l=r([].join),d=a!=Object,u=i("join",",");o({target:"Array",proto:!0,forced:d||!u},{join:function(e){return l(c(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(189);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(25).map;o({target:"Array",proto:!0,forced:!n(93)("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(6),c=n(92),i=n(59),l=r.Array;o({target:"Array",stat:!0,forced:a((function(){function e(){}return!(l.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new(c(this)?this:l)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(109).left,a=n(54),c=n(57),i=n(76);o({target:"Array",proto:!0,forced:!a("reduce")||!i&&c>79&&c<83},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(109).right,a=n(54),c=n(57),i=n(76);o({target:"Array",proto:!0,forced:!a("reduceRight")||!i&&c>79&&c<83},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(75),c=n(92),i=n(11),l=n(51),d=n(23),u=n(31),s=n(59),m=n(16),p=n(93),h=n(66),f=p("slice"),C=m("species"),N=r.Array,b=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,o,r,m=u(this),p=d(m),f=l(e,p),V=l(t===undefined?p:t,p);if(a(m)&&(n=m.constructor,(c(n)&&(n===N||a(n.prototype))||i(n)&&null===(n=n[C]))&&(n=undefined),n===N||n===undefined))return h(m,f,V);for(o=new(n===undefined?N:n)(b(V-f,0)),r=0;f1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(27),c=n(19),i=n(23),l=n(20),d=n(6),u=n(190),s=n(54),m=n(191),p=n(192),h=n(57),f=n(143),C=[],N=r(C.sort),b=r(C.push),V=d((function(){C.sort(undefined)})),g=d((function(){C.sort(null)})),v=s("sort"),y=!d((function(){if(h)return h<70;if(!(m&&m>3)){if(p)return!0;if(f)return f<603;var e,t,n,o,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)C.push({k:t+o,v:n})}for(C.sort((function(e,t){return t.v-e.v})),o=0;ol(n)?1:-1}}(e)),n=r.length,o=0;o9007199254740991)throw m("Maximum allowed length exceeded");for(r=d(N,o),s=0;sb-o+n;s--)delete N[s-1]}else if(n>o)for(s=b-o;s>V;s--)C=s+n-1,(f=s+o-1)in N?N[C]=N[f]:delete N[C];for(s=0;s>1,C=23===t?a(2,-24)-a(2,-77):0,N=e<0||0===e&&1/e<0?1:0,b=0;for((e=r(e))!=e||e===Infinity?(u=e!=e?1:0,d=h):(d=c(i(e)/l),e*(s=a(2,-d))<1&&(d--,s*=2),(e+=d+f>=1?C/s:C*a(2,1-f))*s>=2&&(d++,s/=2),d+f>=h?(u=0,d=h):d+f>=1?(u=(e*s-1)*a(2,t),d+=f):(u=e*a(2,f-1)*a(2,t),d=0));t>=8;)m[b++]=255&u,u/=256,t-=8;for(d=d<0;)m[b++]=255&d,d/=256,p-=8;return m[--b]|=128*N,m},unpack:function(e,t){var n,o=e.length,r=8*o-t-1,c=(1<>1,l=r-7,d=o-1,u=e[d--],s=127&u;for(u>>=7;l>0;)s=256*s+e[d--],l-=8;for(n=s&(1<<-l)-1,s>>=-l,l+=t;l>0;)n=256*n+e[d--],l-=8;if(0===s)s=1-i;else{if(s===c)return n?NaN:u?-Infinity:Infinity;n+=a(2,t),s-=i}return(u?-1:1)*n*a(2,s-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(14);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(6),c=n(110),i=n(9),l=n(51),d=n(41),u=n(95),s=c.ArrayBuffer,m=c.DataView,p=m.prototype,h=r(s.prototype.slice),f=r(p.getUint8),C=r(p.setUint8);o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new s(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(h&&t===undefined)return h(i(this),e);for(var n=i(this).byteLength,o=l(e,n),r=l(t===undefined?n:t,n),a=new(u(this,s))(d(r-o)),c=new m(this),p=new m(a),N=0;o9999?"+":"";return n+c(l(e),n?6:4,0)+"-"+c(N(this)+1,2,0)+"-"+c(m(this),2,0)+"T"+c(h(this),2,0)+":"+c(C(this),2,0)+":"+c(b(this),2,0)+"."+c(t,3,0)+"Z"}:u},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(19),c=n(128);o({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=a(this),n=c(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(18),r=n(24),a=n(299),c=n(16)("toPrimitive"),i=Date.prototype;o(i,c)||r(i,c,a)},function(e,t,n){"use strict";var o=n(5),r=n(9),a=n(173),c=o.TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw c("Incorrect hint");return a(this,e)}},function(e,t,n){"use strict";var o=n(7),r=n(24),a=Date.prototype,c=o(a.toString),i=o(a.getTime);"Invalid Date"!=String(new Date(NaN))&&r(a,"toString",(function(){var e=i(this);return e==e?c(this):"Invalid Date"}))},function(e,t,n){"use strict";var o=n(4),r=n(194);o({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r})},function(e,t,n){"use strict";var o=n(13),r=n(11),a=n(17),c=n(42),i=n(16),l=n(132),d=i("hasInstance"),u=Function.prototype;d in u||a.f(u,d,{value:l((function(e){if(!o(this)||!r(e))return!1;var t=this.prototype;if(!r(t))return e instanceof this;for(;e=c(e);)if(t===e)return!0;return!1}),d)})},function(e,t,n){"use strict";var o=n(8),r=n(73).EXISTS,a=n(7),c=n(17).f,i=Function.prototype,l=a(i.toString),d=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=a(d.exec);o&&!r&&c(i,"name",{configurable:!0,get:function(){try{return u(d,l(this))[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(5);n(53)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";n(306)},function(e,t,n){"use strict";n(112)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(195))},function(e,t,n){"use strict";var o=n(4),r=n(196),a=Math.acosh,c=Math.log,i=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?c(e)+l:r(e-1+i(e-1)*i(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,a=Math.log,c=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function i(e){return isFinite(e=+e)&&0!=e?e<0?-i(-e):a(e+c(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,a=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:a((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(149),a=Math.abs,c=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*c(a(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,a=Math.log,c=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(a(e+.5)*c):32}})},function(e,t,n){"use strict";var o=n(4),r=n(115),a=Math.cosh,c=Math.abs,i=Math.E;o({target:"Math",stat:!0,forced:!a||a(710)===Infinity},{cosh:function(e){var t=r(c(e)-1)+1;return(t+1/(t*i*i))*(i/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(115);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(315)})},function(e,t,n){"use strict";var o=n(149),r=Math.abs,a=Math.pow,c=a(2,-52),i=a(2,-23),l=a(2,127)*(2-i),d=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=r(e),u=o(e);return al||n!=n?u*Infinity:u*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,a=Math.abs,c=Math.sqrt;o({target:"Math",stat:!0,arity:2,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,i=0,l=arguments.length,d=0;i0?(o=n/d)*o:n;return d===Infinity?Infinity:d*c(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o;return 0|r*a+((65535&n>>>16)*a+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log10:n(319)})},function(e,t,n){"use strict";var o=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return o(e)*r}},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(196)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(149)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(115),c=Math.abs,i=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return c(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(115),a=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){"use strict";n(53)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,a=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?a:r)(e)}})},function(e,t,n){"use strict";var o=n(8),r=n(5),a=n(7),c=n(89),i=n(24),l=n(18),d=n(114),u=n(46),s=n(69),m=n(128),p=n(6),h=n(58).f,f=n(26).f,C=n(17).f,N=n(197),b=n(80).trim,V=r.Number,g=V.prototype,v=r.TypeError,y=a("".slice),_=a("".charCodeAt),x=function(e){var t=m(e,"number");return"bigint"==typeof t?t:k(t)},k=function(e){var t,n,o,r,a,c,i,l,d=m(e,"number");if(s(d))throw v("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2)if(d=b(d),43===(t=_(d,0))||45===t){if(88===(n=_(d,2))||120===n)return NaN}else if(48===t){switch(_(d,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+d}for(c=(a=y(d,2)).length,i=0;ir)return NaN;return parseInt(a,o)}return+d};if(c("Number",!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var L,w=function(e){var t=arguments.length<1?0:V(x(e)),n=this;return u(g,n)&&p((function(){N(n)}))?d(Object(t),n,w):t},B=o?h(V):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),S=0;B.length>S;S++)l(V,L=B[S])&&!l(w,L)&&C(w,L,f(V,L));w.prototype=g,g.constructor=w,i(r,"Number",w,{constructor:!0})}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(330)})},function(e,t,n){"use strict";var o=n(5).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(150)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(150),a=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&a(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(337);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(20),i=n(80).trim,l=n(116),d=a("".charAt),u=o.parseFloat,s=o.Symbol,m=s&&s.iterator,p=1/u(l+"-0")!=-Infinity||m&&!r((function(){u(Object(m))}));e.exports=p?function(e){var t=i(c(e)),n=u(t);return 0===n&&"-"==d(t,0)?-0:n}:u},function(e,t,n){"use strict";var o=n(4),r=n(198);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(40),i=n(197),l=n(147),d=n(6),u=r.RangeError,s=r.String,m=Math.floor,p=a(l),h=a("".slice),f=a(1..toFixed),C=function g(e,t,n){return 0===t?n:t%2==1?g(e,t-1,n*e):g(e*e,t/2,n)},N=function(e,t,n){for(var o=-1,r=n;++o<6;)r+=t*e[o],e[o]=r%1e7,r=m(r/1e7)},b=function(e,t){for(var n=6,o=0;--n>=0;)o+=e[n],e[n]=m(o/t),o=o%t*1e7},V=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var o=s(e[t]);n=""===n?o:n+p("0",7-o.length)+o}return n};o({target:"Number",proto:!0,forced:d((function(){return"0.000"!==f(8e-5,3)||"1"!==f(.9,0)||"1.25"!==f(1.255,2)||"1000000000000000128"!==f(0xde0b6b3a7640080,0)}))||!d((function(){f({})}))},{toFixed:function(e){var t,n,o,r,a=i(this),l=c(e),d=[0,0,0,0,0,0],m="",f="0";if(l<0||l>20)throw u("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return s(a);if(a<0&&(m="-",a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*C(2,69,1))-69)<0?a*C(2,-t,1):a/C(2,t,1),n*=4503599627370496,(t=52-t)>0){for(N(d,0,n),o=l;o>=7;)N(d,1e7,0),o-=7;for(N(d,C(10,o,1),0),o=t-1;o>=23;)b(d,1<<23),o-=23;b(d,1<0?m+((r=f.length)<=l?"0."+p("0",l-r)+f:h(f,0,r-l)+"."+h(f,r-l)):m+f}})},function(e,t,n){"use strict";var o=n(4),r=n(341);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(8),r=n(7),a=n(15),c=n(6),i=n(90),l=n(105),d=n(102),u=n(19),s=n(85),m=Object.assign,p=Object.defineProperty,h=r([].concat);e.exports=!m||c((function(){if(o&&1!==m({b:1},m(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=m({},e)[n]||"abcdefghijklmnopqrst"!=i(m({},t)).join("")}))?function(e,t){for(var n=u(e),r=arguments.length,c=1,m=l.f,p=d.f;r>c;)for(var f,C=s(arguments[c++]),N=m?h(i(C),m(C)):i(C),b=N.length,V=0;b>V;)f=N[V++],o&&!a(p,C,f)||(n[f]=C[f]);return n}:m},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(8)},{create:n(52)})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(27),i=n(19),l=n(17);r&&o({target:"Object",proto:!0,forced:a},{__defineGetter__:function(e,t){l.f(i(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(136).f;o({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!r},{defineProperties:a})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(17).f;o({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!r},{defineProperty:a})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(27),i=n(19),l=n(17);r&&o({target:"Object",proto:!0,forced:a},{__defineSetter__:function(e,t){l.f(i(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(199).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(96),a=n(6),c=n(11),i=n(67).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!r},{freeze:function(e){return l&&c(e)?l(i(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(79),a=n(59);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){a(t,e,n)}),{AS_ENTRIES:!0}),t}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(31),c=n(26).f,i=n(8),l=r((function(){c(1)}));o({target:"Object",stat:!0,forced:!i||l,sham:!i},{getOwnPropertyDescriptor:function(e,t){return c(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(133),c=n(31),i=n(26),l=n(59);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=c(e),r=i.f,d=a(o),u={},s=0;d.length>s;)(n=r(o,t=d[s++]))!==undefined&&l(u,t,n);return u}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(137).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(19),c=n(42),i=n(142);o({target:"Object",stat:!0,forced:r((function(){c(1)})),sham:!i},{getPrototypeOf:function(e){return c(a(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(200)})},function(e,t,n){"use strict";var o=n(4),r=n(113);o({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),c=n(45),i=n(148),l=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){l(1)}))||i},{isFrozen:function(e){return!a(e)||!(!i||"ArrayBuffer"!=c(e))||!!l&&l(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),c=n(45),i=n(148),l=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){l(1)}))||i},{isSealed:function(e){return!a(e)||!(!i||"ArrayBuffer"!=c(e))||!!l&&l(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(19),a=n(90);o({target:"Object",stat:!0,forced:n(6)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(19),i=n(56),l=n(42),d=n(26).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(e){var t,n=c(this),o=i(e);do{if(t=d(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(19),i=n(56),l=n(42),d=n(26).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(e){var t,n=c(this),o=i(e);do{if(t=d(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(67).onFreeze,c=n(96),i=n(6),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!c},{preventExtensions:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(67).onFreeze,c=n(96),i=n(6),l=Object.seal;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!c},{seal:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(62)})},function(e,t,n){"use strict";var o=n(135),r=n(24),a=n(365);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(135),r=n(74);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(199).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(198);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";n(369),n(375),n(376),n(377),n(378),n(379)},function(e,t,n){"use strict";var o,r,a,c=n(4),i=n(34),l=n(76),d=n(5),u=n(15),s=n(24),m=n(62),p=n(53),h=n(77),f=n(27),C=n(13),N=n(11),b=n(78),V=n(95),g=n(118).set,v=n(202),y=n(372),_=n(152),x=n(373),k=n(39),L=n(81),w=n(97),B=n(98),S=w.CONSTRUCTOR,I=w.REJECTION_EVENT,T=w.SUBCLASSING,A=k.getterFor("Promise"),E=k.set,M=L&&L.prototype,O=L,P=M,R=d.TypeError,F=d.document,D=d.process,j=B.f,W=j,z=!!(F&&F.createEvent&&d.dispatchEvent),U=function(e){var t;return!(!N(e)||!C(t=e.then))&&t},H=function(e,t){var n,o,r,a=t.value,c=1==t.state,i=c?e.ok:e.fail,l=e.resolve,d=e.reject,s=e.domain;try{i?(c||(2===t.rejection&&$(t),t.rejection=1),!0===i?n=a:(s&&s.enter(),n=i(a),s&&(s.exit(),r=!0)),n===e.promise?d(R("Promise-chain cycle")):(o=U(n))?u(o,n,l,d):l(n)):d(a)}catch(m){s&&!r&&s.exit(),d(m)}},G=function(e,t){e.notified||(e.notified=!0,v((function(){for(var n,o=e.reactions;n=o.get();)H(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},K=function(e,t,n){var o,r;z?((o=F.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),d.dispatchEvent(o)):o={promise:t,reason:n},!I&&(r=d["on"+e])?r(o):"unhandledrejection"===e&&y("Unhandled promise rejection",n)},Y=function(e){u(g,d,(function(){var t,n=e.facade,o=e.value;if(q(e)&&(t=_((function(){l?D.emit("unhandledRejection",o,n):K("unhandledrejection",n,o)})),e.rejection=l||q(e)?2:1,t.error))throw t.value}))},q=function(e){return 1!==e.rejection&&!e.parent},$=function(e){u(g,d,(function(){var t=e.facade;l?D.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},X=function(e,t,n){return function(o){e(t,o,n)}},J=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,G(e,!0))},Q=function ee(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw R("Promise can't be resolved itself");var o=U(t);o?v((function(){var n={done:!1};try{u(o,t,X(ee,n,e),X(J,n,e))}catch(r){J(n,r,e)}})):(e.value=t,e.state=1,G(e,!1))}catch(r){J({done:!1},r,e)}}};if(S&&(P=(O=function(e){b(this,P),f(e),u(o,this);var t=A(this);try{e(X(Q,t),X(J,t))}catch(n){J(t,n)}}).prototype,(o=function(e){E(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:undefined})}).prototype=s(P,"then",(function(e,t){var n=A(this),o=j(V(this,O));return n.parent=!0,o.ok=!C(e)||e,o.fail=C(t)&&t,o.domain=l?D.domain:undefined,0==n.state?n.reactions.add(o):v((function(){H(o,n)})),o.promise})),r=function(){var e=new o,t=A(e);this.promise=e,this.resolve=X(Q,t),this.reject=X(J,t)},B.f=j=function(e){return e===O||void 0===e?new r(e):W(e)},!i&&C(L)&&M!==Object.prototype)){a=M.then,T||s(M,"then",(function(e,t){var n=this;return new O((function(e,t){u(a,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete M.constructor}catch(Z){}m&&m(M,P)}c({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:O}),p(O,"Promise",!1,!0),h("Promise")},function(e,t,n){"use strict";var o=n(49),r=n(5);e.exports=/ipad|iphone|ipod/i.test(o)&&r.Pebble!==undefined},function(e,t,n){"use strict";var o=n(49);e.exports=/web0s(?!.*chrome)/i.test(o)},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var o=function(){this.head=null,this.tail=null};o.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=o},function(e,t,n){"use strict";e.exports="object"==typeof window&&"object"!=typeof Deno},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(27),c=n(98),i=n(152),l=n(79);o({target:"Promise",stat:!0,forced:n(203)},{all:function(e){var t=this,n=c.f(t),o=n.resolve,d=n.reject,u=i((function(){var n=a(t.resolve),c=[],i=0,u=1;l(e,(function(e){var a=i++,l=!1;u++,r(n,t,e).then((function(e){l||(l=!0,c[a]=e,--u||o(c))}),d)})),--u||o(c)}));return u.error&&d(u.value),n.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(97).CONSTRUCTOR,c=n(81),i=n(29),l=n(13),d=n(24),u=c&&c.prototype;if(o({target:"Promise",proto:!0,forced:a,real:!0},{"catch":function(e){return this.then(undefined,e)}}),!r&&l(c)){var s=i("Promise").prototype["catch"];u["catch"]!==s&&d(u,"catch",s,{unsafe:!0})}},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(27),c=n(98),i=n(152),l=n(79);o({target:"Promise",stat:!0,forced:n(203)},{race:function(e){var t=this,n=c.f(t),o=n.reject,d=i((function(){var c=a(t.resolve);l(e,(function(e){r(c,t,e).then(n.resolve,o)}))}));return d.error&&o(d.value),n.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(98);o({target:"Promise",stat:!0,forced:n(97).CONSTRUCTOR},{reject:function(e){var t=a.f(this);return r(t.reject,undefined,e),t.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(34),c=n(81),i=n(97).CONSTRUCTOR,l=n(204),d=r("Promise"),u=a&&!i;o({target:"Promise",stat:!0,forced:a||i},{resolve:function(e){return l(u&&this===d?c:this,e)}})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(81),c=n(6),i=n(29),l=n(13),d=n(95),u=n(204),s=n(24),m=a&&a.prototype;if(o({target:"Promise",proto:!0,real:!0,forced:!!a&&c((function(){m["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=d(this,i("Promise")),n=l(e);return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),!r&&l(a)){var p=i("Promise").prototype["finally"];m["finally"]!==p&&s(m,"finally",p,{unsafe:!0})}},function(e,t,n){"use strict";var o=n(4),r=n(47),a=n(27),c=n(9);o({target:"Reflect",stat:!0,forced:!n(6)((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return r(a(e),t,c(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(47),c=n(194),i=n(145),l=n(9),d=n(11),u=n(52),s=n(6),m=r("Reflect","construct"),p=Object.prototype,h=[].push,f=s((function(){function e(){}return!(m((function(){}),[],e)instanceof e)})),C=!s((function(){m((function(){}))})),N=f||C;o({target:"Reflect",stat:!0,forced:N,sham:N},{construct:function(e,t){i(e),l(t);var n=arguments.length<3?e:i(arguments[2]);if(C&&!f)return m(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return a(h,o,t),new(a(c,e,o))}var r=n.prototype,s=u(d(r)?r:p),N=a(e,s,t);return d(N)?N:s}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(9),c=n(56),i=n(17);o({target:"Reflect",stat:!0,forced:n(6)((function(){Reflect.defineProperty(i.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){a(e);var o=c(t);a(n);try{return i.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(26).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=a(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(11),c=n(9),i=n(205),l=n(26),d=n(42);o({target:"Reflect",stat:!0},{get:function u(e,t){var n,o,s=arguments.length<3?e:arguments[2];return c(e)===s?e[t]:(n=l.f(e,t))?i(n)?n.value:n.get===undefined?undefined:r(n.get,s):a(o=d(e))?u(o,t,s):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(9),c=n(26);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return c.f(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(42);o({target:"Reflect",stat:!0,sham:!n(142)},{getPrototypeOf:function(e){return a(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(113);o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),a(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(133)})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(9);o({target:"Reflect",stat:!0,sham:!n(96)},{preventExtensions:function(e){a(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(9),c=n(11),i=n(205),l=n(6),d=n(17),u=n(26),s=n(42),m=n(64);o({target:"Reflect",stat:!0,forced:l((function(){var e=function(){},t=d.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function p(e,t,n){var o,l,h,f=arguments.length<4?e:arguments[3],C=u.f(a(e),t);if(!C){if(c(l=s(e)))return p(l,t,n,f);C=m(0)}if(i(C)){if(!1===C.writable||!c(f))return!1;if(o=u.f(f,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,d.f(f,t,o)}else d.f(f,t,m(0,n))}else{if((h=C.set)===undefined)return!1;r(h,f,n)}return!0}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(188),c=n(62);c&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),a(t);try{return c(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(8),r=n(5),a=n(7),c=n(89),i=n(114),l=n(50),d=n(58).f,u=n(46),s=n(153),m=n(20),p=n(206),h=n(155),f=n(395),C=n(24),N=n(6),b=n(18),V=n(39).enforce,g=n(77),v=n(16),y=n(207),_=n(208),x=v("match"),k=r.RegExp,L=k.prototype,w=r.SyntaxError,B=a(L.exec),S=a("".charAt),I=a("".replace),T=a("".indexOf),A=a("".slice),E=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,O=/a/g,P=new k(M)!==M,R=h.MISSED_STICKY,F=h.UNSUPPORTED_Y,D=o&&(!P||R||y||_||N((function(){return O[x]=!1,k(M)!=M||k(O)==O||"/a/i"!=k(M,"i")})));if(c("RegExp",D)){for(var j=function(e,t){var n,o,r,a,c,d,h=u(L,this),f=s(e),C=t===undefined,N=[],g=e;if(!h&&f&&C&&e.constructor===j)return e;if((f||u(L,e))&&(e=e.source,C&&(t=p(g))),e=e===undefined?"":m(e),t=t===undefined?"":m(t),g=e,y&&"dotAll"in M&&(o=!!t&&T(t,"s")>-1)&&(t=I(t,/s/g,"")),n=t,R&&"sticky"in M&&(r=!!t&&T(t,"y")>-1)&&F&&(t=I(t,/y/g,"")),_&&(e=(a=function(e){for(var t,n=e.length,o=0,r="",a=[],c={},i=!1,l=!1,d=0,u="";o<=n;o++){if("\\"===(t=S(e,o)))t+=S(e,++o);else if("]"===t)i=!1;else if(!i)switch(!0){case"["===t:i=!0;break;case"("===t:B(E,A(e,o+1))&&(o+=2,l=!0),r+=t,d++;continue;case">"===t&&l:if(""===u||b(c,u))throw new w("Invalid capture group name");c[u]=!0,a[a.length]=[u,d],l=!1,u="";continue}l?u+=t:r+=t}return[r,a]}(e))[0],N=a[1]),c=i(k(e,t),h?this:L,j),(o||r||N.length)&&(d=V(c),o&&(d.dotAll=!0,d.raw=j(function(e){for(var t,n=e.length,o=0,r="",a=!1;o<=n;o++)"\\"!==(t=S(e,o))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),r+=t):r+="[\\s\\S]":r+=t+S(e,++o);return r}(e),n)),r&&(d.sticky=!0),N.length&&(d.groups=N)),e!==g)try{l(c,"source",""===g?"(?:)":g)}catch(v){}return c},W=d(k),z=0;W.length>z;)f(j,k,W[z++]);L.constructor=j,j.prototype=L,C(r,"RegExp",j,{constructor:!0})}g("RegExp")},function(e,t,n){"use strict";var o=n(17).f;e.exports=function(e,t,n){n in e||o(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},function(e,t,n){"use strict";var o=n(8),r=n(397),a=n(154),c=n(6),i=RegExp.prototype;o&&c((function(){return"sy"!==Object.getOwnPropertyDescriptor(i,"flags").get.call({dotAll:!0,sticky:!0})}))&&r(i,"flags",{configurable:!0,get:a})},function(e,t,n){"use strict";var o=n(132),r=n(17);e.exports=function(e,t,n){return n.get&&o(n.get,t,{getter:!0}),n.set&&o(n.set,t,{setter:!0}),r.f(e,t,n)}},function(e,t,n){"use strict";var o=n(73).PROPER,r=n(24),a=n(9),c=n(20),i=n(6),l=n(206),d=RegExp.prototype.toString,u=i((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),s=o&&"toString"!=d.name;(u||s)&&r(RegExp.prototype,"toString",(function(){var e=a(this);return"/"+c(e.source)+"/"+c(l(e))}),{unsafe:!0})},function(e,t,n){"use strict";n(400)},function(e,t,n){"use strict";n(112)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(195))},function(e,t,n){"use strict";var o=n(4),r=n(156).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),a=n(7),c=n(26).f,i=n(41),l=n(20),d=n(157),u=n(32),s=n(158),m=n(34),p=a("".endsWith),h=a("".slice),f=Math.min,C=s("endsWith");r({target:"String",proto:!0,forced:!!(m||C||(o=c(String.prototype,"endsWith"),!o||o.writable))&&!C},{endsWith:function(e){var t=l(u(this));d(e);var n=arguments.length>1?arguments[1]:undefined,o=t.length,r=n===undefined?o:f(i(n),o),a=l(e);return p?p(t,a,r):h(t,r-a.length,r)===a}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(51),i=r.RangeError,l=String.fromCharCode,d=String.fromCodePoint,u=a([].join);o({target:"String",stat:!0,arity:1,forced:!!d&&1!=d.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,r=0;o>r;){if(t=+arguments[r++],c(t,1114111)!==t)throw i(t+" is not a valid code point");n[r]=t<65536?l(t):l(55296+((t-=65536)>>10),t%1024+56320)}return u(n,"")}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(157),c=n(32),i=n(20),l=n(158),d=r("".indexOf);o({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~d(i(c(this)),i(a(e)),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(156).charAt,r=n(20),a=n(39),c=n(141),i=a.set,l=a.getterFor("String Iterator");c(String,"String",(function(e){i(this,{type:"String Iterator",string:r(e),index:0})}),(function(){var e,t=l(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(15),r=n(120),a=n(9),c=n(41),i=n(20),l=n(32),d=n(65),u=n(159),s=n(121);r("match",(function(e,t,n){return[function(t){var n=l(this),r=t==undefined?undefined:d(t,e);return r?o(r,t,n):new RegExp(t)[e](i(n))},function(e){var o=a(this),r=i(e),l=n(t,o,r);if(l.done)return l.value;if(!o.global)return s(o,r);var d=o.unicode;o.lastIndex=0;for(var m,p=[],h=0;null!==(m=s(o,r));){var f=i(m[0]);p[h]=f,""===f&&(o.lastIndex=u(r,c(o.lastIndex),d)),h++}return 0===h?null:p}]}))},function(e,t,n){"use strict";var o=n(4),r=n(146).end;o({target:"String",proto:!0,forced:n(210)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(146).start;o({target:"String",proto:!0,forced:n(210)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(31),c=n(19),i=n(20),l=n(23),d=r([].push),u=r([].join);o({target:"String",stat:!0},{raw:function(e){for(var t=a(c(e).raw),n=l(t),o=arguments.length,r=[],s=0;n>s;){if(d(r,i(t[s++])),s===n)return u(r,"");s=I&&(S+=x(i,I,E)+F,I=E+A.length)}return S+x(i,I)}]}),!!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!k||L)},function(e,t,n){"use strict";var o=n(7),r=n(19),a=Math.floor,c=o("".charAt),i=o("".replace),l=o("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,o,s,m){var p=n+e.length,h=o.length,f=u;return s!==undefined&&(s=r(s),f=d),i(m,f,(function(r,i){var d;switch(c(i,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":d=s[l(i,1,-1)];break;default:var u=+i;if(0===u)return r;if(u>h){var m=a(u/10);return 0===m?r:m<=h?o[m-1]===undefined?c(i,1):o[m-1]+c(i,1):r}d=o[u-1]}return d===undefined?"":d}))}},function(e,t,n){"use strict";var o=n(15),r=n(120),a=n(9),c=n(32),i=n(200),l=n(20),d=n(65),u=n(121);r("search",(function(e,t,n){return[function(t){var n=c(this),r=t==undefined?undefined:d(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(e){var o=a(this),r=l(e),c=n(t,o,r);if(c.done)return c.value;var d=o.lastIndex;i(d,0)||(o.lastIndex=0);var s=u(o,r);return i(o.lastIndex,d)||(o.lastIndex=d),null===s?-1:s.index}]}))},function(e,t,n){"use strict";var o=n(47),r=n(15),a=n(7),c=n(120),i=n(153),l=n(9),d=n(32),u=n(95),s=n(159),m=n(41),p=n(20),h=n(65),f=n(106),C=n(121),N=n(119),b=n(155),V=n(6),g=b.UNSUPPORTED_Y,v=Math.min,y=[].push,_=a(/./.exec),x=a(y),k=a("".slice);c("split",(function(e,t,n){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var a=p(d(this)),c=n===undefined?4294967295:n>>>0;if(0===c)return[];if(e===undefined)return[a];if(!i(e))return r(t,a,e,c);for(var l,u,s,m=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),C=0,b=new RegExp(e.source,h+"g");(l=r(N,b,a))&&!((u=b.lastIndex)>C&&(x(m,k(a,C,l.index)),l.length>1&&l.index=c));)b.lastIndex===l.index&&b.lastIndex++;return C===a.length?!s&&_(b,"")||x(m,""):x(m,k(a,C)),m.length>c?f(m,0,c):m}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:r(t,this,e,n)}:t,[function(t,n){var o=d(this),c=t==undefined?undefined:h(t,e);return c?r(c,t,o,n):r(a,p(o),t,n)},function(e,o){var r=l(this),c=p(e),i=n(a,r,c,o,a!==t);if(i.done)return i.value;var d=u(r,RegExp),h=r.unicode,f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(g?"g":"y"),N=new d(g?"^(?:"+r.source+")":r,f),b=o===undefined?4294967295:o>>>0;if(0===b)return[];if(0===c.length)return null===C(N,c)?[c]:[];for(var V=0,y=0,_=[];y1?arguments[1]:undefined,t.length)),o=l(e);return p?p(t,o,n):h(t,n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(80).trim;o({target:"String",proto:!0,forced:n(160)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";n(418);var o=n(4),r=n(211);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(e,t,n){"use strict";var o=n(4),r=n(211);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(e,t,n){"use strict";n(420);var o=n(4),r=n(212);o({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(e,t,n){"use strict";var o=n(4),r=n(212);o({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(55)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(5),r=n(40),a=o.RangeError;e.exports=function(e){var t=r(e);if(t<0)throw a("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(55)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(55)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(7),r=n(14),a=o(n(183)),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return a(c(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).every,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(15),a=n(138),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return r(a,c(this),e,t>1?arguments[1]:undefined,t>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).filter,a=n(448),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("filter",(function(e){var t=r(c(this),e,arguments.length>1?arguments[1]:undefined);return a(this,t)}))},function(e,t,n){"use strict";var o=n(449),r=n(122);e.exports=function(e,t){return o(r(e),t)}},function(e,t,n){"use strict";var o=n(23);e.exports=function(e,t){for(var n=0,r=o(t),a=new e(r);r>n;)a[n]=t[n++];return a}},function(e,t,n){"use strict";var o=n(14),r=n(25).find,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).findIndex,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).forEach,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(161);(0,n(14).exportTypedArrayStaticMethod)("from",n(214),o)},function(e,t,n){"use strict";var o=n(14),r=n(88).includes,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(88).indexOf,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(14),i=n(186),l=n(16)("iterator"),d=o.Uint8Array,u=a(i.values),s=a(i.keys),m=a(i.entries),p=c.aTypedArray,h=c.exportTypedArrayMethod,f=d&&d.prototype,C=!r((function(){f[l].call([1])})),N=!!f&&f.values&&f[l]===f.values&&"values"===f.values.name,b=function(){return u(p(this))};h("entries",(function(){return m(p(this))}),C),h("keys",(function(){return s(p(this))}),C),h("values",b,C||!N,{name:"values"}),h(l,b,C||!N,{name:"values"})},function(e,t,n){"use strict";var o=n(14),r=n(7),a=o.aTypedArray,c=o.exportTypedArrayMethod,i=r([].join);c("join",(function(e){return i(a(this),e)}))},function(e,t,n){"use strict";var o=n(14),r=n(47),a=n(189),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return r(a,c(this),t>1?[e,arguments[1]]:[e])}))},function(e,t,n){"use strict";var o=n(14),r=n(25).map,a=n(122),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("map",(function(e){return r(c(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(a(e))(t)}))}))},function(e,t,n){"use strict";var o=n(14),r=n(161),a=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(a(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(14),r=n(109).left,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return r(a(this),e,t,t>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(109).right,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return r(a(this),e,t,t>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=o.aTypedArray,a=o.exportTypedArrayMethod,c=Math.floor;a("reverse",(function(){for(var e,t=r(this).length,n=c(t/2),o=0;o1?arguments[1]:undefined,1),n=l(e);if(C)return r(p,this,n,t);var o=this.length,a=c(n),d=0;if(a+t>o)throw u("Wrong length");for(;da;)d[a]=n[a++];return d}),a((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(14),r=n(25).some,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(5),r=n(7),a=n(6),c=n(27),i=n(190),l=n(14),d=n(191),u=n(192),s=n(57),m=n(143),p=l.aTypedArray,h=l.exportTypedArrayMethod,f=o.Uint16Array,C=f&&r(f.prototype.sort),N=!(!C||a((function(){C(new f(2),null)}))&&a((function(){C(new f(2),{})}))),b=!!C&&!a((function(){if(s)return s<74;if(d)return d<67;if(u)return!0;if(m)return m<602;var e,t,n=new f(516),o=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,o[e]=e-2*t+3;for(C(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==o[e])return!0}));h("sort",(function(e){return e!==undefined&&c(e),b?C(this,e):i(p(this),function(e){return function(t,n){return e!==undefined?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!b||N)},function(e,t,n){"use strict";var o=n(14),r=n(41),a=n(51),c=n(122),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=i(this),o=n.length,l=a(e,o);return new(c(n))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:a(t,o))-l))}))},function(e,t,n){"use strict";var o=n(5),r=n(47),a=n(14),c=n(6),i=n(66),l=o.Int8Array,d=a.aTypedArray,u=a.exportTypedArrayMethod,s=[].toLocaleString,m=!!l&&c((function(){s.call(new l(1))}));u("toLocaleString",(function(){return r(s,m?i(d(this)):d(this),i(arguments))}),c((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!c((function(){l.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(14).exportTypedArrayMethod,r=n(6),a=n(5),c=n(7),i=a.Uint8Array,l=i&&i.prototype||{},d=[].toString,u=c([].join);r((function(){d.call({})}))&&(d=function(){return u(this)});var s=l.toString!=d;o("toString",d,s)},function(e,t,n){"use strict";n(472)},function(e,t,n){"use strict";var o,r=n(5),a=n(7),c=n(111),i=n(67),l=n(112),d=n(215),u=n(11),s=n(113),m=n(39).enforce,p=n(176),h=!r.ActiveXObject&&"ActiveXObject"in r,f=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},C=l("WeakMap",f,d);if(p&&h){o=d.getConstructor(f,"WeakMap",!0),i.enable();var N=C.prototype,b=a(N["delete"]),V=a(N.has),g=a(N.get),v=a(N.set);c(N,{"delete":function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),b(this,e)||t.frozen["delete"](e)}return b(this,e)},has:function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),V(this,e)||t.frozen.has(e)}return V(this,e)},get:function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),V(this,e)?g(this,e):t.frozen.get(e)}return g(this,e)},set:function(e,t){if(u(e)&&!s(e)){var n=m(this);n.frozen||(n.frozen=new o),V(this,e)?v(this,e,t):n.frozen.set(e,t)}else v(this,e,t);return this}})}},function(e,t,n){"use strict";n(474)},function(e,t,n){"use strict";n(112)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(215))},function(e,t,n){"use strict";n(476),n(477)},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(118).clear;o({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==a},{clearImmediate:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(118).set;o({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==a},{setImmediate:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(202),c=n(27),i=n(151),l=n(76),d=r.process;o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){i(arguments.length,1),c(e);var t=l&&d.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";n(480),n(481)},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(216).setInterval;o({global:!0,bind:!0,forced:r.setInterval!==a},{setInterval:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(216).setTimeout;o({global:!0,bind:!0,forced:r.setTimeout!==a},{setTimeout:a})},function(e,t,n){"use strict";(function(e){ +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=233)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(235);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}))},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.useLocalState=t.useBackend=t.deleteLocalState=t.backendUpdate=t.backendSetSharedState=t.backendReducer=t.backendDeleteSharedState=void 0;var o=n(33),r=n(43);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var a=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=a;var c=function(e){return{type:"backend/deleteSharedState",payload:e}};t.backendDeleteSharedState=c;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var a=Object.assign({},e.config,o.config),c=Object.assign({},e.data,o.static_data,o.data),i=Object.assign({},e.shared);if(o.shared)for(var l=0,d=Object.keys(o.shared);l1?n-1:0),r=1;rn?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,a=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(a>0)),(r?e:Math.round(e))/n);var n,o,r,a};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";t.__esModule=!0,t.unit=t.halfUnit=t.computeBoxProps=t.computeBoxClassName=t.Box=void 0;var o=n(10),r=n(0),a=n(508),c=n(43),i=["as","className","children"];var l=function(e){return"string"==typeof e?e:"number"==typeof e?12*e+"px":void 0};t.unit=l;var d=function(e){return"string"==typeof e?e:"number"==typeof e?12*e*.5+"px":void 0};t.halfUnit=d;var u=function(e){return"string"==typeof e&&c.CSS_COLORS.includes(e)},s=function(e){return function(t,n){(0,o.isFalsy)(n)||(t[e]=n)}},m=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t(r))}},p=function(e,t){return function(n,r){(0,o.isFalsy)(r)||(n[e]=t)}},h=function(e,t,n){return function(r,a){if(!(0,o.isFalsy)(a))for(var c=0;c0&&(t.style=l),t};t.computeBoxProps=N;var b=function(e){var t=e.textColor||e.color,n=e.backgroundColor;return(0,o.classes)([u(t)&&"color-"+t,u(n)&&"color-bg-"+n])};t.computeBoxClassName=b;var V=function(e){var t=e.as,n=void 0===t?"div":t,o=e.className,c=e.children,l=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);if("function"==typeof c)return c(N(e));var d="string"==typeof o?o+" "+b(l):b(l),u=N(l);return(0,r.createVNode)(a.VNodeFlags.HtmlElement,n,d,c,a.ChildFlags.UnknownChildren,u)};t.Box=V,V.defaultHooks=o.pureComponentHooks},function(e,t,n){"use strict";var o=n(41);e.exports=function(e){return o(e.length)}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(50),c=n(132),i=n(130);e.exports=function(e,t,n,l){var d=!!l&&!!l.unsafe,u=!!l&&!!l.enumerable,s=!!l&&!!l.noTargetGet,m=l&&l.name!==undefined?l.name:t;return r(n)&&c(n,m,l),e===o?(u?e[t]=n:i(t,n),e):(d?!s&&e[t]&&(u=!0):delete e[t],u?e[t]=n:a(e,t,n),e)}},function(e,t,n){"use strict";var o=n(60),r=n(7),a=n(85),c=n(19),i=n(23),l=n(91),d=r([].push),u=function(e){var t=1==e,n=2==e,r=3==e,u=4==e,s=6==e,m=7==e,p=5==e||s;return function(h,f,C,N){for(var b,V,g=c(h),v=a(g),y=o(f,C),_=i(v),x=0,k=N||l,L=t?k(h,_):n||m?k(h,0):undefined;_>x;x++)if((p||x in v)&&(V=y(b=v[x],x,g),e))if(t)L[x]=V;else if(V)switch(e){case 3:return!0;case 5:return b;case 6:return x;case 2:d(L,b)}else switch(e){case 4:return!1;case 7:d(L,b)}return s?-1:r||u?u:L}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},function(e,t,n){"use strict";var o=n(8),r=n(15),a=n(102),c=n(64),i=n(31),l=n(56),d=n(18),u=n(174),s=Object.getOwnPropertyDescriptor;t.f=o?s:function(e,t){if(e=i(e),t=l(t),u)try{return s(e,t)}catch(n){}if(d(e,t))return c(!r(a.f,e,t),e[t])}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(71),c=o.TypeError;e.exports=function(e){if(r(e))return e;throw c(a(e)+" is not a function")}},function(e,t,n){"use strict";t.__esModule=!0,t.modalRegisterBodyOverride=t.modalOpen=t.modalClose=t.modalAnswer=t.ComplexModal=void 0;var o=n(0),r=n(1),a=n(2),c={};t.modalOpen=function(e,t,n){var o=(0,r.useBackend)(e),a=o.act,c=o.data,i=Object.assign(c.modal?c.modal.args:{},n||{});a("modal_open",{id:t,arguments:JSON.stringify(i)})};t.modalRegisterBodyOverride=function(e,t){c[e]=t};var i=function(e,t,n,o){var a=(0,r.useBackend)(e),c=a.act,i=a.data;if(i.modal){var l=Object.assign(i.modal.args||{},o||{});c("modal_answer",{id:t,answer:n,arguments:JSON.stringify(l)})}};t.modalAnswer=i;var l=function(e,t){(0,(0,r.useBackend)(e).act)("modal_close",{id:t})};t.modalClose=l;t.ComplexModal=function(e,t){var n=(0,r.useBackend)(t).data;if(n.modal){var d,u,s=n.modal,m=s.id,p=s.text,h=s.type,f=(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),C="auto";if(c[m])u=c[m](n.modal,t);else if("input"===h){var N=n.modal.value;d=function(e){return i(t,m,N)},u=(0,o.createComponentVNode)(2,a.Input,{value:n.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(e,t){N=t}}),f=(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){return i(t,m,N)}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})}else if("choice"===h){var b="object"==typeof n.modal.choices?Object.values(n.modal.choices):n.modal.choices;u=(0,o.createComponentVNode)(2,a.Dropdown,{options:b,selected:n.modal.value,width:"100%",my:"0.5rem",onSelected:function(e){return i(t,m,e)}}),C="initial"}else"bento"===h?u=(0,o.createComponentVNode)(2,a.Flex,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:n.modal.choices.map((function(e,r){return(0,o.createComponentVNode)(2,a.Flex.Item,{flex:"1 1 auto",children:(0,o.createComponentVNode)(2,a.Button,{selected:r+1===parseInt(n.modal.value,10),onClick:function(){return i(t,m,r+1)},children:(0,o.createVNode)(1,"img",null,null,1,{src:e})})},r)}))}):"boolean"===h&&(f=(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:n.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){return i(t,m,0)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"check",content:n.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){return i(t,m,1)}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]}));return(0,o.createComponentVNode)(2,a.Modal,{maxWidth:e.maxWidth||window.innerWidth/2+"px",maxHeight:e.maxHeight||window.innerHeight/2+"px",onEnter:d,mx:"auto",overflowY:C,children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:p}),u,f]})}}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=function(e){return r(e)?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e]):o[e]&&o[e][t]}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.toKeyedArray=t.toArray=t.sortBy=t.reduce=t.map=t.filter=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oi)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n"+l+""}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";t.__esModule=!0,t.computeFlexProps=t.computeFlexItemProps=t.FlexItem=t.Flex=void 0;var o=n(0),r=n(10),a=n(33),c=n(22),i=["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"],l=["className","grow","order","shrink","basis","align"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.direction,o=e.wrap,c=e.align,l=e.alignContent,u=e.justify,s=e.inline,m=e.spacing,p=void 0===m?0:m,h=e.spacingPrecise,f=void 0===h?0:h,C=d(e,i);return Object.assign({className:(0,r.classes)(["Flex",a.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),s&&"Flex--inline",p>0&&"Flex--spacing--"+p,f>0&&"Flex--spacingPrecise--"+f,t]),style:Object.assign({},C.style,{"flex-direction":n,"flex-wrap":o,"align-items":c,"align-content":l,"justify-content":u})},C)};t.computeFlexProps=u;var s=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},u(e))))};t.Flex=s,s.defaultHooks=r.pureComponentHooks;var m=function(e){var t=e.className,n=e.grow,o=e.order,i=e.shrink,u=e.basis,s=void 0===u?e.width:u,m=e.align,p=d(e,l);return Object.assign({className:(0,r.classes)(["Flex__item",a.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},p.style,{"flex-grow":n,"flex-shrink":i,"flex-basis":(0,c.unit)(s),order:o,"align-self":m})},p)};t.computeFlexItemProps=m;var p=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({},m(e))))};t.FlexItem=p,p.defaultHooks=r.pureComponentHooks,s.Item=p},function(e,t,n){"use strict";var o,r,a,c=n(176),i=n(5),l=n(7),d=n(11),u=n(50),s=n(18),m=n(129),p=n(104),h=n(87),f=i.TypeError,C=i.WeakMap;if(c||m.state){var N=m.state||(m.state=new C),b=l(N.get),V=l(N.has),g=l(N.set);o=function(e,t){if(V(N,e))throw new f("Object already initialized");return t.facade=e,g(N,e,t),t},r=function(e){return b(N,e)||{}},a=function(e){return V(N,e)}}else{var v=p("state");h[v]=!0,o=function(e,t){if(s(e,v))throw new f("Object already initialized");return t.facade=e,u(e,v,t),t},r=function(e){return s(e,v)?e[v]:{}},a=function(e){return s(e,v)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!d(t)||(n=r(t)).type!==e)throw f("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){var t=+e;return t!=t||0===t?0:(t>0?r:o)(t)}},function(e,t,n){"use strict";var o=n(40),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(5),r=n(18),a=n(13),c=n(19),i=n(104),l=n(142),d=i("IE_PROTO"),u=o.Object,s=u.prototype;e.exports=l?u.getPrototypeOf:function(e){var t=c(e);if(r(t,d))return t[d];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?s:null}},function(e,t,n){"use strict";t.__esModule=!0,t.timeAgo=t.getGasLabel=t.getGasColor=t.UI_UPDATE=t.UI_INTERACTIVE=t.UI_DISABLED=t.UI_CLOSE=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{command:"#526aff",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color};t.timeAgo=function(e,t){if(e>t)return"in the future";var n=(t/=10)-(e/=10);if(n>3600){var o=Math.round(n/3600);return o+" hour"+(1===o?"":"s")+" ago"}if(n>60){var r=Math.round(n/60);return r+" minute"+(1===r?"":"s")+" ago"}var a=Math.round(n);return a+" second"+(1===a?"":"s")+" ago"}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListItem=t.LabeledListDivider=t.LabeledList=void 0;var o=n(0),r=n(10),a=n(22),c=n(222),i=["className","label","labelColor","color","textAlign","verticalAlign","buttons","content","children","noColon"];var l=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=l,l.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.label,c=e.labelColor,l=void 0===c?"label":c,d=e.color,u=e.textAlign,s=e.verticalAlign,m=e.buttons,p=e.content,h=e.children,f=e.noColon,C=void 0!==f&&f,N=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),b=C?"":":";return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,a.Box,{as:"td",color:l,verticalAlign:s,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+b:null}),(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"td",color:d,textAlign:u,verticalAlign:s,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:m?undefined:2},N,{children:[p,h]}))),m&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",m,0)],0)};t.LabeledListItem=d,d.defaultHooks=r.pureComponentHooks;var u=function(e){var t=e.size?(0,a.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,c.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=u,u.defaultHooks=r.pureComponentHooks,l.Item=d,l.Divider=u},function(e,t,n){"use strict";var o=n(7),r=o({}.toString),a=o("".slice);e.exports=function(e){return a(r(e),8,-1)}},function(e,t,n){"use strict";var o=n(7);e.exports=o({}.isPrototypeOf)},function(e,t,n){"use strict";var o=n(84),r=Function.prototype,a=r.apply,c=r.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?c.bind(a):function(){return c.apply(a,arguments)})},function(e,t,n){"use strict";t.__esModule=!0,t.flow=t.compose=void 0;t.flow=function o(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),c=1;c1?o-1:0),a=1;a"+e+"<\/script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},f=function(){try{o=new ActiveXObject("htmlfile")}catch(r){}var e,t;f="undefined"!=typeof document?document.domain&&o?h(o):((t=d("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(o);for(var n=c.length;n--;)delete f.prototype[c[n]];return f()};i[s]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m.prototype=r(e),n=new m,m.prototype=null,n[s]=e):n=f(),t===undefined?n:a.f(n,t)}},function(e,t,n){"use strict";var o=n(17).f,r=n(18),a=n(16)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!r(e,a)&&o(e,a,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(15),c=n(8),i=n(161),l=n(14),d=n(110),u=n(78),s=n(64),m=n(50),p=n(150),h=n(41),f=n(193),C=n(213),N=n(56),b=n(18),V=n(74),g=n(11),v=n(69),y=n(52),_=n(46),x=n(62),k=n(58).f,L=n(214),w=n(25).forEach,B=n(77),S=n(17),I=n(26),T=n(39),A=n(114),E=T.get,M=T.set,O=S.f,P=I.f,F=Math.round,R=r.RangeError,D=d.ArrayBuffer,j=D.prototype,W=d.DataView,z=l.NATIVE_ARRAY_BUFFER_VIEWS,U=l.TYPED_ARRAY_CONSTRUCTOR,H=l.TYPED_ARRAY_TAG,G=l.TypedArray,K=l.TypedArrayPrototype,Y=l.aTypedArrayConstructor,q=l.isTypedArray,$=function(e,t){Y(e);for(var n=0,o=t.length,r=new e(o);o>n;)r[n]=t[n++];return r},X=function(e,t){O(e,t,{get:function(){return E(this)[t]}})},J=function(e){var t;return _(j,e)||"ArrayBuffer"==(t=V(e))||"SharedArrayBuffer"==t},Q=function(e,t){return q(e)&&!v(t)&&t in e&&p(+t)&&t>=0},Z=function(e,t){return t=N(t),Q(e,t)?s(2,e[t]):P(e,t)},ee=function(e,t,n){return t=N(t),!(Q(e,t)&&g(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?O(e,t,n):(e[t]=n.value,e)};c?(z||(I.f=Z,S.f=ee,X(K,"buffer"),X(K,"byteOffset"),X(K,"byteLength"),X(K,"length")),o({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:Z,defineProperty:ee}),e.exports=function(e,t,n){var c=e.match(/\d+$/)[0]/8,l=e+(n?"Clamped":"")+"Array",d="get"+e,s="set"+e,p=r[l],N=p,b=N&&N.prototype,V={},v=function(e,t){O(e,t,{get:function(){return function(e,t){var n=E(e);return n.view[d](t*c+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=E(e);n&&(o=(o=F(o))<0?0:o>255?255:255&o),r.view[s](t*c+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};z?i&&(N=t((function(e,t,n,o){return u(e,b),A(g(t)?J(t)?o!==undefined?new p(t,C(n,c),o):n!==undefined?new p(t,C(n,c)):new p(t):q(t)?$(N,t):a(L,N,t):new p(f(t)),e,N)})),x&&x(N,G),w(k(p),(function(e){e in N||m(N,e,p[e])})),N.prototype=b):(N=t((function(e,t,n,o){u(e,b);var r,i,l,d=0,s=0;if(g(t)){if(!J(t))return q(t)?$(N,t):a(L,N,t);r=t,s=C(n,c);var m=t.byteLength;if(o===undefined){if(m%c)throw R("Wrong length");if((i=m-s)<0)throw R("Wrong length")}else if((i=h(o)*c)+s>m)throw R("Wrong length");l=i/c}else l=f(t),r=new D(i=l*c);for(M(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new W(r)});d0&&o[0]<4?1:+(o[0]+o[1])),!r&&c&&(!(o=c.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=c.match(/Chrome\/(\d+)/))&&(r=+o[1]),e.exports=r},function(e,t,n){"use strict";var o=n(178),r=n(134).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(56),r=n(17),a=n(64);e.exports=function(e,t,n){var c=o(t);c in e?r.f(e,c,a(0,n)):e[c]=n}},function(e,t,n){"use strict";var o=n(7),r=n(27),a=n(84),c=o(o.bind);e.exports=function(e,t){return r(e),t===undefined?e:a?c(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(16),r=n(52),a=n(17),c=o("unscopables"),i=Array.prototype;i[c]==undefined&&a.f(i,c,{configurable:!0,value:r(null)}),e.exports=function(e){i[c][e]=!0}},function(e,t,n){"use strict";var o=n(7),r=n(9),a=n(188);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(c){}return function(n,o){return r(n),a(o),t?e(n,o):n.__proto__=o,n}}():undefined)},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=t.RndRoute=t.RndNavbar=t.RndNavButton=t.MainMenu=t.LatheSearch=t.LatheMenu=t.LatheMaterials=t.LatheMaterialStorage=t.LatheMainMenu=t.LatheChemicalStorage=t.LatheCategory=t.DeconstructionMenu=t.DataDiskMenu=t.CurrentLevels=void 0;var o=n(667);t.CurrentLevels=o.CurrentLevels;var r=n(668);t.DataDiskMenu=r.DataDiskMenu;var a=n(669);t.DeconstructionMenu=a.DeconstructionMenu;var c=n(670);t.LatheCategory=c.LatheCategory;var i=n(671);t.LatheChemicalStorage=i.LatheChemicalStorage;var l=n(672);t.LatheMainMenu=l.LatheMainMenu;var d=n(673);t.LatheMaterials=d.LatheMaterials;var u=n(674);t.LatheMaterialStorage=u.LatheMaterialStorage;var s=n(675);t.LatheMenu=s.LatheMenu;var m=n(676);t.LatheSearch=m.LatheSearch;var p=n(677);t.MainMenu=p.MainMenu;var h=n(678);t.RndNavbar=h.RndNavbar;var f=n(679);t.RndNavButton=f.RndNavButton;var C=n(232);t.RndRoute=C.RndRoute;var N=n(680);t.SettingsMenu=N.SettingsMenu},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(27);e.exports=function(e,t){var n=e[t];return null==n?undefined:o(n)}},function(e,t,n){"use strict";var o=n(7);e.exports=o([].slice)},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(87),c=n(11),i=n(18),l=n(17).f,d=n(58),u=n(137),s=n(113),m=n(86),p=n(96),h=!1,f=m("meta"),C=0,N=function(e){l(e,f,{value:{objectID:"O"+C++,weakData:{}}})},b=e.exports={enable:function(){b.enable=function(){},h=!0;var e=d.f,t=r([].splice),n={};n[f]=1,e(n).length&&(d.f=function(n){for(var o=e(n),r=0,a=o.length;r=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.collapsing,i=e.children,l=d(e,c);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,i,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Table=u,u.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.className,n=e.header,c=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(c))))};t.TableRow=s,s.defaultHooks=r.pureComponentHooks;var m=function(e){var t=e.className,n=e.collapsing,c=e.header,i=d(e,l);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,a.computeBoxClassName)(e)]),null,1,Object.assign({},(0,a.computeBoxProps)(i))))};t.TableCell=m,m.defaultHooks=r.pureComponentHooks,u.Row=s,u.Cell=m},function(e,t,n){"use strict";var o=n(5),r=n(29),a=n(13),c=n(46),i=n(172),l=o.Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&c(t.prototype,l(e))}},function(e,t,n){"use strict";var o=n(57),r=n(6);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},function(e,t,n){"use strict";var o=n(5).String;e.exports=function(e){try{return o(e)}catch(t){return"Object"}}},function(e,t,n){"use strict";var o=n(34),r=n(129);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.22.5",mode:o?"pure":"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE",source:"https://github.com/zloirock/core-js"})},function(e,t,n){"use strict";var o=n(8),r=n(18),a=Function.prototype,c=o&&Object.getOwnPropertyDescriptor,i=r(a,"name"),l=i&&"something"===function(){}.name,d=i&&(!o||o&&c(a,"name").configurable);e.exports={EXISTS:i,PROPER:l,CONFIGURABLE:d}},function(e,t,n){"use strict";var o=n(5),r=n(135),a=n(13),c=n(45),i=n(16)("toStringTag"),l=o.Object,d="Arguments"==c(function(){return arguments}());e.exports=r?c:function(e){var t,n,o;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=l(e),i))?n:d?c(t):"Object"==(o=c(t))&&a(t.callee)?"Arguments":o}},function(e,t,n){"use strict";var o=n(45);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(45),r=n(5);e.exports="process"==o(r.process)},function(e,t,n){"use strict";var o=n(29),r=n(17),a=n(16),c=n(8),i=a("species");e.exports=function(e){var t=o(e),n=r.f;c&&t&&!t[i]&&n(t,i,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var o=n(5),r=n(46),a=o.TypeError;e.exports=function(e,t){if(r(t,e))return e;throw a("Incorrect invocation")}},function(e,t,n){"use strict";var o=n(5),r=n(60),a=n(15),c=n(9),i=n(71),l=n(139),d=n(23),u=n(46),s=n(140),m=n(107),p=n(185),h=o.TypeError,f=function(e,t){this.stopped=e,this.result=t},C=f.prototype;e.exports=function(e,t,n){var o,N,b,V,g,v,y,_=n&&n.that,x=!(!n||!n.AS_ENTRIES),k=!(!n||!n.IS_ITERATOR),L=!(!n||!n.INTERRUPTED),w=r(t,_),B=function(e){return o&&p(o,"normal",e),new f(!0,e)},S=function(e){return x?(c(e),L?w(e[0],e[1],B):w(e[0],e[1])):L?w(e,B):w(e)};if(k)o=e;else{if(!(N=m(e)))throw h(i(e)+" is not iterable");if(l(N)){for(b=0,V=d(e);V>b;b++)if((g=S(e[b]))&&u(C,g))return g;return new f(!1)}o=s(e,N)}for(v=o.next;!(y=a(v,o)).done;){try{g=S(y.value)}catch(I){p(o,"throw",I)}if("object"==typeof g&&g&&u(C,g))return g}return new f(!1)}},function(e,t,n){"use strict";var o=n(7),r=n(32),a=n(20),c=n(116),i=o("".replace),l="["+c+"]",d=RegExp("^"+l+l+"*"),u=RegExp(l+l+"*$"),s=function(e){return function(t){var n=a(r(t));return 1&e&&(n=i(n,d,"")),2&e&&(n=i(n,u,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t,n){"use strict";var o=n(5);e.exports=o.Promise},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(217);var o=n(33),r=0,a=1,c=2,i=3,l=4,d=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a=c){var i=[t].concat(r).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,o.callByond)("",{src:window.__ref__,action:"tgui:log",log:i})}},u=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),o=0;ou;)if((i=l[u++])!=i)return!0}else for(;d>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:c(!0),indexOf:c(!1)}},function(e,t,n){"use strict";var o=n(6),r=n(13),a=/#|\.prototype\./,c=function(e,t){var n=l[i(e)];return n==u||n!=d&&(r(t)?o(t):!!t)},i=c.normalize=function(e){return String(e).replace(a,".").toLowerCase()},l=c.data={},d=c.NATIVE="N",u=c.POLYFILL="P";e.exports=c},function(e,t,n){"use strict";var o=n(178),r=n(134);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(239);e.exports=function(e,t){return new(o(e))(0===t?0:t)}},function(e,t,n){"use strict";var o=n(7),r=n(6),a=n(13),c=n(74),i=n(29),l=n(103),d=function(){},u=[],s=i("Reflect","construct"),m=/^\s*(?:class|function)\b/,p=o(m.exec),h=!m.exec(d),f=function(e){if(!a(e))return!1;try{return s(d,u,e),!0}catch(t){return!1}},C=function(e){if(!a(e))return!1;switch(c(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(m,l(e))}catch(t){return!0}};C.sham=!0,e.exports=!s||r((function(){var e;return f(f.call)||!f(Object)||!f((function(){e=!0}))||e}))?C:f},function(e,t,n){"use strict";var o=n(6),r=n(16),a=n(57),c=r("species");e.exports=function(e){return a>=51||!o((function(){var t=[];return(t.constructor={})[c]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(9),r=n(145),a=n(16)("species");e.exports=function(e,t){var n,c=o(e).constructor;return c===undefined||(n=o(c)[a])==undefined?t:r(n)}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(5),r=n(81),a=n(13),c=n(89),i=n(103),l=n(16),d=n(374),u=n(34),s=n(57),m=r&&r.prototype,p=l("species"),h=!1,f=a(o.PromiseRejectionEvent),C=c("Promise",(function(){var e=i(r),t=e!==String(r);if(!t&&66===s)return!0;if(u&&(!m["catch"]||!m["finally"]))return!0;if(s>=51&&/native code/.test(e))return!1;var n=new r((function(e){e(1)})),o=function(e){e((function(){}),(function(){}))};return(n.constructor={})[p]=o,!(h=n.then((function(){}))instanceof o)||!t&&d&&!f}));e.exports={CONSTRUCTOR:C,REJECTION_EVENT:f,SUBCLASSING:h}},function(e,t,n){"use strict";var o=n(27),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.releaseHeldKeys=t.hotKeyReducer=t.hotKeyMiddleware=t.KEY_Z=t.KEY_Y=t.KEY_X=t.KEY_W=t.KEY_V=t.KEY_U=t.KEY_TAB=t.KEY_T=t.KEY_SPACE=t.KEY_SHIFT=t.KEY_S=t.KEY_R=t.KEY_Q=t.KEY_P=t.KEY_O=t.KEY_NUMPAD_9=t.KEY_NUMPAD_8=t.KEY_NUMPAD_7=t.KEY_NUMPAD_6=t.KEY_NUMPAD_5=t.KEY_NUMPAD_4=t.KEY_NUMPAD_3=t.KEY_NUMPAD_2=t.KEY_NUMPAD_1=t.KEY_NUMPAD_0=t.KEY_N=t.KEY_MINUS=t.KEY_M=t.KEY_L=t.KEY_K=t.KEY_J=t.KEY_I=t.KEY_H=t.KEY_G=t.KEY_F=t.KEY_ESCAPE=t.KEY_EQUAL=t.KEY_ENTER=t.KEY_E=t.KEY_D=t.KEY_CTRL=t.KEY_C=t.KEY_BACKSPACE=t.KEY_B=t.KEY_ALT=t.KEY_A=t.KEY_9=t.KEY_8=t.KEY_7=t.KEY_6=t.KEY_5=t.KEY_4=t.KEY_3=t.KEY_2=t.KEY_1=t.KEY_0=t.ARROW_KEY_UP=t.ARROW_KEY_DOWN=void 0;var o=n(33),r=(0,n(82).createLogger)("hotkeys");t.KEY_BACKSPACE=8;t.KEY_TAB=9;t.KEY_ENTER=13;t.KEY_SHIFT=16;t.KEY_CTRL=17;t.KEY_ALT=18;t.KEY_ESCAPE=27;t.KEY_SPACE=32;t.ARROW_KEY_UP=38;t.ARROW_KEY_DOWN=40;t.KEY_0=48;t.KEY_1=49;t.KEY_2=50;t.KEY_3=51;t.KEY_4=52;t.KEY_5=53;t.KEY_6=54;t.KEY_7=55;t.KEY_8=56;t.KEY_9=57;t.KEY_A=65;t.KEY_B=66;t.KEY_C=67;t.KEY_D=68;t.KEY_E=69;t.KEY_F=70;t.KEY_G=71;t.KEY_H=72;t.KEY_I=73;t.KEY_J=74;t.KEY_K=75;t.KEY_L=76;t.KEY_M=77;t.KEY_N=78;t.KEY_O=79;t.KEY_P=80;t.KEY_Q=81;t.KEY_R=82;t.KEY_S=83;t.KEY_T=84;t.KEY_U=85;t.KEY_V=86;t.KEY_W=87;t.KEY_X=88;t.KEY_Y=89;t.KEY_Z=90;t.KEY_NUMPAD_0=96;t.KEY_NUMPAD_1=97;t.KEY_NUMPAD_2=98;t.KEY_NUMPAD_3=99;t.KEY_NUMPAD_4=100;t.KEY_NUMPAD_5=101;t.KEY_NUMPAD_6=102;t.KEY_NUMPAD_7=103;t.KEY_NUMPAD_8=104;t.KEY_NUMPAD_9=105;t.KEY_EQUAL=187;t.KEY_MINUS=189;var a=[17,18,16],c=[27,13,32,9,17,16,18],i={},l=function(e,t,n,o){var r="";return e&&(r+="Ctrl+"),t&&(r+="Alt+"),n&&(r+="Shift+"),r+=o>=48&&o<=90?String.fromCharCode(o):"["+o+"]"},d=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:l(n,o,r,t)}},u=function(e){var t={16:"Shift",17:"Ctrl",18:"Alt",33:"Northeast",34:"Southeast",35:"Southwest",36:"Northwest",37:"West",38:"North",39:"East",40:"South",45:"Insert",46:"Delete"};return t[e]?t[e]:e>=48&&e<=57||e>=65&&e<=90?String.fromCharCode(e):e>=96&&e<=105?"Numpad"+(e-96):e>=112&&e<=123?"F"+(e-111):188===e?",":189===e?"-":190===e?".":void 0},s=function(){for(var e=0,t=Object.keys(i);e=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&!g.includes(e.ref)&&!b.includes(e.ref),checked:b.includes(e.ref),onClick:function(){return v(e.ref)}},e.desc)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotStatus=void 0;var o=n(0),r=n(1),a=n(2);t.BotStatus=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.locked,d=i.noaccess,u=i.maintpanel,s=i.on,m=i.autopatrol,p=i.canhack,h=i.emagged,f=i.remote_disabled;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe an ID card to ",l?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,a.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,disabled:d,onClick:function(){return c("power")}})}),null!==m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,a.Box,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:!f,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})})],4)}},function(e,t,n){"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!o.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},function(e,t,n){"use strict";var o=n(7),r=n(13),a=n(129),c=o(Function.toString);r(a.inspectSource)||(a.inspectSource=function(e){return c(e)}),e.exports=a.inspectSource},function(e,t,n){"use strict";var o=n(72),r=n(86),a=o("keys");e.exports=function(e){return a[e]||(a[e]=r(e))}},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(5),r=n(51),a=n(23),c=n(59),i=o.Array,l=Math.max;e.exports=function(e,t,n){for(var o=a(e),d=r(t,o),u=r(n===undefined?o:n,o),s=i(l(u-d,0)),m=0;d=0:m>p;p+=h)p in s&&(d=n(d,s[p],p,u));return d}};e.exports={left:d(!1),right:d(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(7),a=n(8),c=n(144),i=n(73),l=n(50),d=n(111),u=n(6),s=n(78),m=n(40),p=n(41),h=n(193),f=n(289),C=n(42),N=n(62),b=n(58).f,V=n(17).f,g=n(138),v=n(106),y=n(53),_=n(39),x=i.PROPER,k=i.CONFIGURABLE,L=_.get,w=_.set,B=o.ArrayBuffer,S=B,I=S&&S.prototype,T=o.DataView,A=T&&T.prototype,E=Object.prototype,M=o.Array,O=o.RangeError,P=r(g),F=r([].reverse),R=f.pack,D=f.unpack,j=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},z=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},U=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},H=function(e){return R(e,23,4)},G=function(e){return R(e,52,8)},K=function(e,t){V(e.prototype,t,{get:function(){return L(this)[t]}})},Y=function(e,t,n,o){var r=h(n),a=L(e);if(r+t>a.byteLength)throw O("Wrong index");var c=L(a.buffer).bytes,i=r+a.byteOffset,l=v(c,i,i+t);return o?l:F(l)},q=function(e,t,n,o,r,a){var c=h(n),i=L(e);if(c+t>i.byteLength)throw O("Wrong index");for(var l=L(i.buffer).bytes,d=c+i.byteOffset,u=o(+r),s=0;sQ;)(X=J[Q++])in S||l(S,X,B[X]);I.constructor=S}N&&C(A)!==E&&N(A,E);var Z=new T(new S(2)),ee=r(A.setInt8);Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||d(A,{setInt8:function(e,t){ee(this,e,t<<24>>24)},setUint8:function(e,t){ee(this,e,t<<24>>24)}},{unsafe:!0})}else I=(S=function(e){s(this,I);var t=h(e);w(this,{bytes:P(M(t),0),byteLength:t}),a||(this.byteLength=t)}).prototype,A=(T=function(e,t,n){s(this,A),s(e,I);var o=L(e).byteLength,r=m(t);if(r<0||r>o)throw O("Wrong offset");if(r+(n=n===undefined?o-r:p(n))>o)throw O("Wrong length");w(this,{buffer:e,byteLength:n,byteOffset:r}),a||(this.buffer=e,this.byteLength=n,this.byteOffset=r)}).prototype,a&&(K(S,"byteLength"),K(T,"buffer"),K(T,"byteLength"),K(T,"byteOffset")),d(A,{getInt8:function(e){return Y(this,1,e)[0]<<24>>24},getUint8:function(e){return Y(this,1,e)[0]},getInt16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Y(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return U(Y(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return U(Y(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return D(Y(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return D(Y(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){q(this,1,e,j,t)},setUint8:function(e,t){q(this,1,e,j,t)},setInt16:function(e,t){q(this,2,e,W,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){q(this,2,e,W,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){q(this,4,e,z,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){q(this,4,e,H,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){q(this,8,e,G,t,arguments.length>2?arguments[2]:undefined)}});y(S,"ArrayBuffer"),y(T,"DataView"),e.exports={ArrayBuffer:S,DataView:T}},function(e,t,n){"use strict";var o=n(24);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(89),i=n(24),l=n(67),d=n(79),u=n(78),s=n(13),m=n(11),p=n(6),h=n(108),f=n(53),C=n(114);e.exports=function(e,t,n){var N=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),V=N?"set":"add",g=r[e],v=g&&g.prototype,y=g,_={},x=function(e){var t=a(v[e]);i(v,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!m(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return b&&!m(e)?undefined:t(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!m(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(c(e,!s(g)||!(b||v.forEach&&!p((function(){(new g).entries().next()})))))y=n.getConstructor(t,e,N,V),l.enable();else if(c(e,!0)){var k=new y,L=k[V](b?{}:-0,1)!=k,w=p((function(){k.has(1)})),B=h((function(e){new g(e)})),S=!b&&p((function(){for(var e=new g,t=5;t--;)e[V](t,t);return!e.has(-0)}));B||((y=t((function(e,t){u(e,v);var n=C(new g,e,y);return t!=undefined&&d(t,n[V],{that:n,AS_ENTRIES:N}),n}))).prototype=v,v.constructor=y),(w||S)&&(x("delete"),x("has"),N&&x("get")),(S||L)&&x(V),b&&v.clear&&delete v.clear}return _[e]=y,o({global:!0,constructor:!0,forced:y!=g},_),f(y,e),b||n.setStrong(y,e,N),y}},function(e,t,n){"use strict";var o=n(6),r=n(11),a=n(45),c=n(148),i=Object.isExtensible,l=o((function(){i(1)}));e.exports=l||c?function(e){return!!r(e)&&(!c||"ArrayBuffer"!=a(e))&&(!i||i(e))}:i},function(e,t,n){"use strict";var o=n(13),r=n(11),a=n(62);e.exports=function(e,t,n){var c,i;return a&&o(c=t.constructor)&&c!==n&&r(i=c.prototype)&&i!==n.prototype&&a(e,i),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(34),r=n(5),a=n(6),c=n(143);e.exports=o||!a((function(){if(!(c&&c<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}}))},function(e,t,n){"use strict";var o,r,a,c,i=n(5),l=n(47),d=n(60),u=n(13),s=n(18),m=n(6),p=n(179),h=n(66),f=n(131),C=n(151),N=n(201),b=n(76),V=i.setImmediate,g=i.clearImmediate,v=i.process,y=i.Dispatch,_=i.Function,x=i.MessageChannel,k=i.String,L=0,w={};try{o=i.location}catch(A){}var B=function(e){if(s(w,e)){var t=w[e];delete w[e],t()}},S=function(e){return function(){B(e)}},I=function(e){B(e.data)},T=function(e){i.postMessage(k(e),o.protocol+"//"+o.host)};V&&g||(V=function(e){C(arguments.length,1);var t=u(e)?e:_(e),n=h(arguments,1);return w[++L]=function(){l(t,undefined,n)},r(L),L},g=function(e){delete w[e]},b?r=function(e){v.nextTick(S(e))}:y&&y.now?r=function(e){y.now(S(e))}:x&&!N?(c=(a=new x).port2,a.port1.onmessage=I,r=d(c.postMessage,c)):i.addEventListener&&u(i.postMessage)&&!i.importScripts&&o&&"file:"!==o.protocol&&!m(T)?(r=T,i.addEventListener("message",I,!1)):r="onreadystatechange"in f("script")?function(e){p.appendChild(f("script")).onreadystatechange=function(){p.removeChild(this),B(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:V,clear:g}},function(e,t,n){"use strict";var o,r,a=n(15),c=n(7),i=n(20),l=n(154),d=n(155),u=n(72),s=n(52),m=n(39).get,p=n(207),h=n(208),f=u("native-string-replace",String.prototype.replace),C=RegExp.prototype.exec,N=C,b=c("".charAt),V=c("".indexOf),g=c("".replace),v=c("".slice),y=(r=/b*/g,a(C,o=/a/,"a"),a(C,r,"a"),0!==o.lastIndex||0!==r.lastIndex),_=d.BROKEN_CARET,x=/()??/.exec("")[1]!==undefined;(y||x||_||p||h)&&(N=function(e){var t,n,o,r,c,d,u,p=this,h=m(p),k=i(e),L=h.raw;if(L)return L.lastIndex=p.lastIndex,t=a(N,L,k),p.lastIndex=L.lastIndex,t;var w=h.groups,B=_&&p.sticky,S=a(l,p),I=p.source,T=0,A=k;if(B&&(S=g(S,"y",""),-1===V(S,"g")&&(S+="g"),A=v(k,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(k,p.lastIndex-1))&&(I="(?: "+I+")",A=" "+A,T++),n=new RegExp("^(?:"+I+")",S)),x&&(n=new RegExp("^"+I+"$(?!\\s)",S)),y&&(o=p.lastIndex),r=a(C,B?n:p,A),B?r?(r.input=v(r.input,T),r[0]=v(r[0],T),r.index=p.lastIndex,p.lastIndex+=r[0].length):p.lastIndex=0:y&&r&&(p.lastIndex=p.global?r.index+r[0].length:o),x&&r&&r.length>1&&a(f,r[0],n,(function(){for(c=1;ct?2+3*d-i:0;return((0,o.toFixed)(m,p)+" "+s+n).trim()};t.formatSiUnit=c;t.formatPower=function(e,t){return void 0===t&&(t=0),c(e,t,"W")};t.formatMoney=function(e,t){if(void 0===t&&(t=0),!Number.isFinite(e))return e;var n=(0,o.round)(e,t);t>0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,a=n.indexOf(".");-1===a&&(a=r);for(var c="",i=0;i0&&iu;)a.f(e,n=r[u++],o[n]);return e}},function(e,t,n){"use strict";var o=n(45),r=n(31),a=n(58).f,c=n(106),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"Window"==o(e)?function(e){try{return a(e)}catch(t){return c(i)}}(e):a(r(e))}},function(e,t,n){"use strict";var o=n(19),r=n(51),a=n(23);e.exports=function(e){for(var t=o(this),n=a(t),c=arguments.length,i=r(c>1?arguments[1]:undefined,n),l=c>2?arguments[2]:undefined,d=l===undefined?n:r(l,n);d>i;)t[i++]=e;return t}},function(e,t,n){"use strict";var o=n(16),r=n(94),a=o("iterator"),c=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||c[a]===e)}},function(e,t,n){"use strict";var o=n(5),r=n(15),a=n(27),c=n(9),i=n(71),l=n(107),d=o.TypeError;e.exports=function(e,t){var n=arguments.length<2?l(e):t;if(a(n))return c(r(n,e));throw d(i(e)+" is not iterable")}},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(34),c=n(73),i=n(13),l=n(274),d=n(42),u=n(62),s=n(53),m=n(50),p=n(24),h=n(16),f=n(94),C=n(187),N=c.PROPER,b=c.CONFIGURABLE,V=C.IteratorPrototype,g=C.BUGGY_SAFARI_ITERATORS,v=h("iterator"),y=function(){return this};e.exports=function(e,t,n,c,h,C,_){l(n,t,c);var x,k,L,w=function(e){if(e===h&&A)return A;if(!g&&e in I)return I[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},B=t+" Iterator",S=!1,I=e.prototype,T=I[v]||I["@@iterator"]||h&&I[h],A=!g&&T||w(h),E="Array"==t&&I.entries||T;if(E&&(x=d(E.call(new e)))!==Object.prototype&&x.next&&(a||d(x)===V||(u?u(x,V):i(x[v])||p(x,v,y)),s(x,B,!0,!0),a&&(f[B]=y)),N&&"values"==h&&T&&"values"!==T.name&&(!a&&b?m(I,"name","values"):(S=!0,A=function(){return r(T,this)})),h)if(k={values:w("values"),keys:C?A:w("keys"),entries:w("entries")},_)for(L in k)(g||S||!(L in I))&&p(I,L,k[L]);else o({target:t,proto:!0,forced:g||S},k);return a&&!_||I[v]===A||p(I,v,A,{name:h}),f[t]=A,k}},function(e,t,n){"use strict";var o=n(6);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var o=n(49).match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(5),r=n(92),a=n(71),c=o.TypeError;e.exports=function(e){if(r(e))return e;throw c(a(e)+" is not a constructor")}},function(e,t,n){"use strict";var o=n(7),r=n(41),a=n(20),c=n(147),i=n(32),l=o(c),d=o("".slice),u=Math.ceil,s=function(e){return function(t,n,o){var c,s,m=a(i(t)),p=r(n),h=m.length,f=o===undefined?" ":a(o);return p<=h||""==f?m:((s=l(f,u((c=p-h)/f.length))).length>c&&(s=d(s,0,c)),e?m+s:s+m)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(40),a=n(20),c=n(32),i=o.RangeError;e.exports=function(e){var t=a(c(this)),n="",o=r(e);if(o<0||o==Infinity)throw i("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var o=n(6);e.exports=o((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o=n(11),r=Math.floor;e.exports=Number.isInteger||function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(5).TypeError;e.exports=function(e,t){if(e=p?e?"":undefined:(o=l(s,m))<55296||o>56319||m+1===p||(u=l(s,m+1))<56320||u>57343?e?i(s,m):o:e?d(s,m,m+2):u-56320+(o-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},function(e,t,n){"use strict";var o=n(5),r=n(153),a=o.TypeError;e.exports=function(e){if(r(e))throw a("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(156).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(73).PROPER,r=n(6),a=n(116);e.exports=function(e){return r((function(){return!!a[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||o&&a[e].name!==e}))}},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(108),c=n(14).NATIVE_ARRAY_BUFFER_VIEWS,i=o.ArrayBuffer,l=o.Int8Array;e.exports=!c||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!a((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new i(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.getRoutedComponent=void 0;var o=n(0),r=n(3),a=n(525),c=function(e,t){return function(){return(0,o.createComponentVNode)(2,r.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,children:["notFound"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" was not found.")],4),"missingExport"===e&&(0,o.createVNode)(1,"div",null,[(0,o.createTextVNode)("Interface "),(0,o.createVNode)(1,"b",null,t,0),(0,o.createTextVNode)(" is missing an export.")],4)]})})}};t.getRoutedComponent=function(e){var t;var n,o=null==(t=e.config)?void 0:t["interface"];try{n=a("./"+o+".js")}catch(i){if("MODULE_NOT_FOUND"===i.code)return c("notFound",o);throw i}var r=n[o];return r||c("missingExport",o)}},function(e,t,n){"use strict";t.__esModule=!0,t.AnimatedNumber=void 0;var o=n(12),r=n(0);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)},i=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:0},c(t.initial)?n.state.value=t.initial:c(t.value)&&(n.state.value=Number(t.value)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state,n=Number(t.value),o=Number(e.value);if(c(o)){var r=.5*n+.5*o;this.setState({value:r})}},i.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),50)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){var e=this.props,t=this.state,n=e.format,r=e.children,a=t.value,i=e.value;if(!c(i))return i||null;var l=a;if(n)l=n(a);else{var d=String(i).split(".")[1],u=d?d.length:0;l=(0,o.toFixed)(a,(0,o.clamp)(u,0,8))}return"function"==typeof r?r(l,a):l},r}(r.Component);t.AnimatedNumber=i},function(e,t,n){"use strict";t.__esModule=!0,t.ButtonInput=t.ButtonConfirm=t.ButtonCheckbox=t.Button=void 0;var o=n(0),r=n(10),a=n(33),c=n(99),i=n(3),l=n(82),d=n(22),u=n(165),s=n(220),m=["className","fluid","icon","color","textColor","disabled","selected","tooltip","tooltipPosition","ellipsis","content","iconRotation","iconColor","iconSpin","iconRight","iconStyle","children","onclick","onClick","multiLine"],p=["checked"],h=["confirmContent","confirmColor","confirmIcon","icon","color","content","onClick"],f=["fluid","content","icon","iconRotation","iconSpin","tooltip","tooltipPosition","color","disabled","placeholder","maxLength","multiLine"];function C(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var V=(0,l.createLogger)("Button"),g=function(e){var t=e.className,n=e.fluid,l=e.icon,p=e.color,h=e.textColor,f=e.disabled,C=e.selected,N=e.tooltip,g=e.tooltipPosition,v=e.ellipsis,y=e.content,_=e.iconRotation,x=e.iconColor,k=e.iconSpin,L=e.iconRight,w=e.iconStyle,B=e.children,S=e.onclick,I=e.onClick,T=e.multiLine,A=b(e,m),E=!(!y&&!B);return S&&V.warn("Lowercase 'onclick' is not supported on Button and lowercase prop names are discouraged in general. Please use a camelCase'onClick' instead and read: https://infernojs.org/docs/guides/event-handling"),(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",f&&"Button--disabled",C&&"Button--selected",E&&"Button--hasContent",v&&"Button--ellipsis",L&&"Button--iconRight",T&&"Button--multiLine",p&&"string"==typeof p?"Button--color--"+p:"Button--color--default",t]),tabIndex:!f&&"0",unselectable:a.IS_IE8,color:h,onclick:function(e){(0,i.refocusLayout)(),!f&&I&&I(e)},onKeyDown:function(e){var t=window.event?e.which:e.keyCode;return t===c.KEY_SPACE||t===c.KEY_ENTER?(e.preventDefault(),void(!f&&I&&I(e))):t===c.KEY_ESCAPE?(e.preventDefault(),void(0,i.refocusLayout)()):void 0}},A,{children:[l&&!L&&(0,o.createComponentVNode)(2,u.Icon,{name:l,color:x,rotation:_,spin:k,style:w}),y,B,l&&L&&(0,o.createComponentVNode)(2,u.Icon,{name:l,color:x,rotation:_,spin:k,style:w}),N&&(0,o.createComponentVNode)(2,s.Tooltip,{content:N,position:g})]})))};t.Button=g,g.defaultHooks=r.pureComponentHooks;var v=function(e){var t=e.checked,n=b(e,p);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,g,Object.assign({color:"transparent",icon:t?"check-square-o":"square-o",selected:t},n)))};t.ButtonCheckbox=v,g.Checkbox=v;var y=function(e){function t(){var t;return(t=e.call(this)||this).state={clickedOnce:!1},t.handleClick=function(){t.state.clickedOnce&&t.setClickedOnce(!1)},t}C(t,e);var n=t.prototype;return n.setClickedOnce=function(e){var t=this;this.setState({clickedOnce:e}),e?setTimeout((function(){return window.addEventListener("click",t.handleClick)})):window.removeEventListener("click",this.handleClick)},n.render=function(){var e=this,t=this.props,n=t.confirmContent,r=void 0===n?"Confirm?":n,a=t.confirmColor,c=void 0===a?"bad":a,i=t.confirmIcon,l=t.icon,d=t.color,u=t.content,s=t.onClick,m=b(t,h);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,g,Object.assign({content:this.state.clickedOnce?r:u,icon:this.state.clickedOnce?i:l,color:this.state.clickedOnce?c:d,onClick:function(){return e.state.clickedOnce?s():e.setClickedOnce(!0)}},m)))},t}(o.Component);t.ButtonConfirm=y,g.Confirm=y;var _=function(e){function t(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={inInput:!1},t}C(t,e);var n=t.prototype;return n.setInInput=function(e){if(!this.props.disabled&&(this.setState({inInput:e}),this.inputRef)){var t=this.inputRef.current;if(e){t.value=this.props.currentValue||"";try{t.focus(),t.select()}catch(n){}}}},n.commitResult=function(e){if(this.inputRef){var t=this.inputRef.current;if(""!==t.value)return void this.props.onCommit(e,t.value);if(!this.props.defaultValue)return;this.props.onCommit(e,this.props.defaultValue)}},n.render=function(){var e=this,t=this.props,n=t.fluid,a=t.content,i=t.icon,l=t.iconRotation,m=t.iconSpin,p=t.tooltip,h=t.tooltipPosition,C=t.color,N=void 0===C?"default":C,V=t.disabled,g=(t.placeholder,t.maxLength,t.multiLine),v=b(t,f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.Box,Object.assign({className:(0,r.classes)(["Button",n&&"Button--fluid",V&&"Button--disabled","Button--color--"+N,g+"Button--multiLine"])},v,{onClick:function(){return e.setInInput(!0)},children:[i&&(0,o.createComponentVNode)(2,u.Icon,{name:i,rotation:l,spin:m}),(0,o.createVNode)(1,"div",null,a,0),(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:this.state.inInput?undefined:"none","text-align":"left"},onBlur:function(t){e.state.inInput&&(e.setInInput(!1),e.commitResult(t))},onKeyDown:function(t){if(t.keyCode===c.KEY_ENTER)return e.setInInput(!1),void e.commitResult(t);t.keyCode===c.KEY_ESCAPE&&e.setInInput(!1)}},null,this.inputRef),p&&(0,o.createComponentVNode)(2,s.Tooltip,{content:p,position:h})]})))},t}(o.Component);t.ButtonInput=_,g.Input=_},function(e,t,n){"use strict";t.__esModule=!0,t.Icon=void 0;var o=n(0),r=n(10),a=n(22),c=["name","size","spin","className","style","rotation"];var i=/-o$/,l=function(e){var t=e.name,n=e.size,l=e.spin,d=e.className,u=e.style,s=void 0===u?{}:u,m=e.rotation,p=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);n&&(s["font-size"]=100*n+"%"),"number"==typeof m&&(s.transform="rotate("+m+"deg)");var h=i.test(t),f=t.replace(i,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"i",className:(0,r.classes)([d,h?"far":"fas","fa-"+f,l&&"fa-spin"]),style:s},p)))};t.Icon=l,l.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(163),l=n(22);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){var t,n;function u(t){var n;n=e.call(this,t)||this;var a=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:a,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,a=t.maxValue,c=t.step,i=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var d=Number.isFinite(o)?o%c:0;n.internalValue=(0,r.clamp)(n.internalValue+l*c/i,o-c,a+c),n.value=(0,r.clamp)(n.internalValue-n.internalValue%c+d,o,a),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,c=a.dragging,i=a.value,l=a.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!c,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),c)n.suppressFlicker(),o&&o(e,i),r&&r(e,i);else if(n.inputRef){var d=n.inputRef.current;d.value=l;try{d.focus(),d.select()}catch(u){}}},n}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n),u.prototype.render=function(){var e=this,t=this.state,n=t.dragging,d=t.editing,u=t.value,s=t.suppressingFlicker,m=this.props,p=m.className,h=m.fluid,f=m.animated,C=m.value,N=m.unit,b=m.minValue,V=m.maxValue,g=m.height,v=m.width,y=m.lineHeight,_=m.fontSize,x=m.format,k=m.onChange,L=m.onDrag,w=C;(n||s)&&(w=u);var B=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(N?" "+N:""),0,{unselectable:c.IS_IE8})},S=f&&!n&&!s&&(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:w,format:x,children:B})||B(x?x(w):w);return(0,o.createComponentVNode)(2,l.Box,{className:(0,a.classes)(["NumberInput",h&&"NumberInput--fluid",p]),minWidth:v,minHeight:g,lineHeight:y,fontSize:_,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((w-b)/(V-b)*100,0,100)+"%"}}),2),S,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:d?undefined:"none",height:g,"line-height":y,"font-size":_},onBlur:function(t){if(d){var n=(0,r.clamp)(t.target.value,b,V);e.setState({editing:!1,value:n}),e.suppressFlicker(),k&&k(t,n),L&&L(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,b,V);return e.setState({editing:!1,value:n}),e.suppressFlicker(),k&&k(t,n),void(L&&L(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},u}(o.Component);t.NumberInput=u,u.defaultHooks=a.pureComponentHooks,u.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";t.__esModule=!0,t.Operating=void 0;var o=n(0),r=n(2),a=n(227),c=function(e){var t=e.operating,n=e.name;if(t)return(0,o.createComponentVNode)(2,r.Dimmer,{children:(0,o.createComponentVNode)(2,r.Flex,{mb:"30px",children:(0,o.createComponentVNode)(2,r.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,o.createComponentVNode)(2,r.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,o.createVNode)(1,"br"),"The ",n," is processing..."]})})})};t.Operating=c,c.propTypes={operating:a.bool,name:a.string}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewManifest=void 0;var o=n(0),r=n(1),a=n(2),c=n(21),i=n(43).COLORS.department,l=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],d=function(e){if(-1!==l.indexOf(e))return!0},u=function(e){return e.length>0&&(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"50%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"15%",children:"Active"})]}),e.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{color:(t=e.rank,-1!==l.indexOf(t)?"green":"orange"),bold:d(e.rank),children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,c.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,c.decodeHtmlEntities)(e.rank)}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.active})]},e.name+e.rank);var t}))]})};t.CrewManifest=function(e,t){var n;(0,r.useBackend)(t).act;e.data?n=e.data:n=(0,r.useBackend)(t).data;var c=n.manifest,l=c.heads,d=c.sec,s=c.eng,m=c.med,p=c.sci,h=c.ser,f=c.sup,C=c.misc;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.command,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(l)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.security,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(d)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.engineering,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.medical,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(m)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.science,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(p)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.service,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{backgroundColor:i.supply,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(f)}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,a.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(C)})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(1),a=n(2);t.TemporaryNotice=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.temp;if(l){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(12),a=n(1),c=n(2);t.Signaler=function(e,t){var n=(0,a.useBackend)(t).act,i=e.data,l=i.code,d=i.frequency,u=i.minFrequency,s=i.maxFrequency;return(0,o.createComponentVNode)(2,c.Section,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:u/10,maxValue:s/10,value:d/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return n("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onDrag:function(e,t){return n("code",{code:t})}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},function(e,t,n){"use strict";var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(r){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,n){"use strict";var o=n(70);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(5),r=n(15),a=n(13),c=n(11),i=o.TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!c(o=r(n,e)))return o;if(a(n=e.valueOf)&&!c(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!c(o=r(n,e)))return o;throw i("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o=n(8),r=n(6),a=n(131);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(8),r=n(6);e.exports=o&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(e,t,n){"use strict";var o=n(5),r=n(13),a=n(103),c=o.WeakMap;e.exports=r(c)&&/native code/.test(a(c))},function(e,t,n){"use strict";var o=n(18),r=n(133),a=n(26),c=n(17);e.exports=function(e,t,n){for(var i=r(t),l=c.f,d=a.f,u=0;ud;)r(o,n=t[d++])&&(~c(u,n)||l(u,n));return u}},function(e,t,n){"use strict";var o=n(29);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(16);t.f=o},function(e,t,n){"use strict";var o=n(15),r=n(29),a=n(16),c=n(24);e.exports=function(){var e=r("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,i=a("toPrimitive");t&&!t[i]&&c(t,i,(function(e){return o(n,this)}),{arity:1})}},function(e,t,n){"use strict";var o=n(70);e.exports=o&&!!Symbol["for"]&&!!Symbol.keyFor},function(e,t,n){"use strict";var o=n(19),r=n(51),a=n(23),c=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),i=a(n),l=r(e,i),d=r(t,i),u=arguments.length>2?arguments[2]:undefined,s=c((u===undefined?i:r(u,i))-d,i-l),m=1;for(d0;)d in n?n[l]=n[d]:delete n[l],l+=m,d+=m;return n}},function(e,t,n){"use strict";var o=n(5),r=n(75),a=n(23),c=n(60),i=o.TypeError;e.exports=function l(e,t,n,o,d,u,s,m){for(var p,h=d,f=0,C=!!s&&c(s,m);f0&&r(p))h=l(e,t,p,a(p),h,u-1)-1;else{if(h>=9007199254740991)throw i("Exceed the acceptable array length");e[h]=p}h++}f++}return h}},function(e,t,n){"use strict";var o=n(15),r=n(9),a=n(65);e.exports=function(e,t,n){var c,i;r(e);try{if(!(c=a(e,"return"))){if("throw"===t)throw n;return n}c=o(c,e)}catch(l){i=!0,c=l}if("throw"===t)throw n;if(i)throw c;return r(c),n}},function(e,t,n){"use strict";var o=n(31),r=n(61),a=n(94),c=n(39),i=n(17).f,l=n(141),d=n(34),u=n(8),s=c.set,m=c.getterFor("Array Iterator");e.exports=l(Array,"Array",(function(e,t){s(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=m(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values");var p=a.Arguments=a.Array;if(r("keys"),r("values"),r("entries"),!d&&u&&"values"!==p.name)try{i(p,"name",{value:"values"})}catch(h){}},function(e,t,n){"use strict";var o,r,a,c=n(6),i=n(13),l=n(52),d=n(42),u=n(24),s=n(16),m=n(34),p=s("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(r=d(d(a)))!==Object.prototype&&(o=r):h=!0),o==undefined||c((function(){var e={};return o[p].call(e)!==e}))?o={}:m&&(o=l(o)),i(o[p])||u(o,p,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){"use strict";var o=n(5),r=n(13),a=o.String,c=o.TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw c("Can't set "+a(e)+" as a prototype")}},function(e,t,n){"use strict";var o=n(47),r=n(31),a=n(40),c=n(23),i=n(54),l=Math.min,d=[].lastIndexOf,u=!!d&&1/[1].lastIndexOf(1,-0)<0,s=i("lastIndexOf"),m=u||!s;e.exports=m?function(e){if(u)return o(d,this,arguments)||0;var t=r(this),n=c(t),i=n-1;for(arguments.length>1&&(i=l(i,a(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:d},function(e,t,n){"use strict";var o=n(106),r=Math.floor,a=function(e,t){for(var n,o,r=e.length,a=1;a0;)e[o]=e[--o];o!==a++&&(e[o]=n)}return e},c=function(e,t,n,o){for(var r=t.length,a=n.length,c=0,i=0;c1?arguments[1]:undefined);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),a(p,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return N(this,0===e?0:e,t)}}:{add:function(e){return N(this,e=0===e?0:e,e)}}),s&&o(p,"size",{get:function(){return C(this).size}}),u},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),a=f(o);d(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(7);e.exports=o(1..valueOf)},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(20),i=n(80).trim,l=n(116),d=o.parseInt,u=o.Symbol,s=u&&u.iterator,m=/^[+-]?0x/i,p=a(m.exec),h=8!==d(l+"08")||22!==d(l+"0x16")||s&&!r((function(){d(Object(s))}));e.exports=h?function(e,t){var n=i(c(e));return d(n,t>>>0||(p(m,n)?16:10))}:d},function(e,t,n){"use strict";var o=n(8),r=n(7),a=n(90),c=n(31),i=r(n(102).f),l=r([].push),d=function(e){return function(t){for(var n,r=c(t),d=a(r),u=d.length,s=0,m=[];u>s;)n=d[s++],o&&!i(r,n)||l(m,e?[n,r[n]]:r[n]);return m}};e.exports={entries:d(!0),values:d(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(49);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,a,c,i,l,d,u,s=n(5),m=n(60),p=n(26).f,h=n(118).set,f=n(201),C=n(370),N=n(371),b=n(76),V=s.MutationObserver||s.WebKitMutationObserver,g=s.document,v=s.process,y=s.Promise,_=p(s,"queueMicrotask"),x=_&&_.value;x||(o=function(){var e,t;for(b&&(e=v.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?c():a=undefined,n}}a=undefined,e&&e.enter()},f||b||N||!V||!g?!C&&y&&y.resolve?((d=y.resolve(undefined)).constructor=y,u=m(d.then,d),c=function(){u(o)}):b?c=function(){v.nextTick(o)}:(h=m(h,s),c=function(){h(o)}):(i=!0,l=g.createTextNode(""),new V(o).observe(l,{characterData:!0}),c=function(){l.data=i=!i})),e.exports=x||function(e){var t={fn:e,next:undefined};a&&(a.next=t),r||(r=t,c()),a=t}},function(e,t,n){"use strict";var o=n(81),r=n(108),a=n(97).CONSTRUCTOR;e.exports=a||!r((function(e){o.all(e).then(undefined,(function(){}))}))},function(e,t,n){"use strict";var o=n(9),r=n(11),a=n(98);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(18);e.exports=function(e){return e!==undefined&&(o(e,"value")||o(e,"writable"))}},function(e,t,n){"use strict";var o=n(15),r=n(18),a=n(46),c=n(154),i=RegExp.prototype;e.exports=function(e){var t=e.flags;return t!==undefined||"flags"in i||r(e,"flags")||!a(i,e)?t:o(c,e)}},function(e,t,n){"use strict";var o=n(6),r=n(5).RegExp;e.exports=o((function(){var e=r(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},function(e,t,n){"use strict";var o=n(6),r=n(5).RegExp;e.exports=o((function(){var e=r("(?
b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}))},function(e,t,n){"use strict";var o=n(4),r=n(119);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(49);e.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(80).end,r=n(160);e.exports=r("trimEnd")?function(){return o(this)}:"".trimEnd},function(e,t,n){"use strict";var o=n(80).start,r=n(160);e.exports=r("trimStart")?function(){return o(this)}:"".trimStart},function(e,t,n){"use strict";var o=n(5),r=n(435),a=o.RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw a("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(60),r=n(15),a=n(145),c=n(19),i=n(23),l=n(140),d=n(107),u=n(139),s=n(14).aTypedArrayConstructor;e.exports=function(e){var t,n,m,p,h,f,C=a(this),N=c(e),b=arguments.length,V=b>1?arguments[1]:undefined,g=V!==undefined,v=d(N);if(v&&!u(v))for(f=(h=l(N,v)).next,N=[];!(p=r(f,h)).done;)N.push(p.value);for(g&&b>2&&(V=o(V,arguments[2])),n=i(N),m=new(s(C))(n),t=0;n>t;t++)m[t]=g?V(N[t],t):N[t];return m}},function(e,t,n){"use strict";var o=n(7),r=n(111),a=n(67).getWeakData,c=n(9),i=n(11),l=n(78),d=n(79),u=n(25),s=n(18),m=n(39),p=m.set,h=m.getterFor,f=u.find,C=u.findIndex,N=o([].splice),b=0,V=function(e){return e.frozen||(e.frozen=new g)},g=function(){this.entries=[]},v=function(e,t){return f(e.entries,(function(e){return e[0]===t}))};g.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=C(this.entries,(function(t){return t[0]===e}));return~t&&N(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var u=e((function(e,r){l(e,m),p(e,{type:t,id:b++,frozen:undefined}),r!=undefined&&d(r,e[o],{that:e,AS_ENTRIES:n})})),m=u.prototype,f=h(t),C=function(e,t,n){var o=f(e),r=a(c(t),!0);return!0===r?V(o).set(t,n):r[o.id]=n,e};return r(m,{"delete":function(e){var t=f(this);if(!i(e))return!1;var n=a(e);return!0===n?V(t)["delete"](e):n&&s(n,t.id)&&delete n[t.id]},has:function(e){var t=f(this);if(!i(e))return!1;var n=a(e);return!0===n?V(t).has(e):n&&s(n,t.id)}}),r(m,n?{get:function(e){var t=f(this);if(i(e)){var n=a(e);return!0===n?V(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return C(this,e,t)}}:{add:function(e){return C(this,e,!0)}}),u}}},function(e,t,n){"use strict";var o=n(5),r=n(47),a=n(13),c=n(49),i=n(66),l=n(151),d=/MSIE .\./.test(c),u=o.Function,s=function(e){return d?function(t,n){var o=l(arguments.length,1)>2,c=a(t)?t:u(t),d=o?i(arguments,2):undefined;return e(o?function(){r(c,this,d)}:c,n)}:e};e.exports={setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.setupDrag=t.resizeStartHandler=t.dragStartHandler=void 0;var o=n(484),r=n(33);function a(e,t,n,o,r,a,c){try{var i=e[a](c),l=i.value}catch(d){return void n(d)}i.done?t(l):Promise.resolve(l).then(o,r)}var c,i,l,d,u,s=(0,n(82).createLogger)("drag"),m=!1,p=!1,h=[0,0],f=function(e){return(0,r.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},C=function(e,t){return(0,r.winset)(e,"pos",t[0]+","+t[1])},N=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,o,r,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s.log("setting up"),c=e.config.window,n.next=4,f(c);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],o=b(t),r=o[0],a=o[1],r&&C(c,a),s.debug("current state",{ref:c,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var c=e.apply(t,n);function i(e){a(c,o,r,i,l,"next",e)}function l(e){a(c,o,r,i,l,"throw",e)}i(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=N;var b=function(e){var t=e[0],n=e[1],o=!1;return t<0?(t=0,o=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,o=!0),n<0?(n=0,o=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,o=!0),[o,[t,n]]};t.dragStartHandler=function(e){s.log("drag start"),m=!0,i=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",g),document.addEventListener("mouseup",V),g(e)};var V=function _(e){s.log("drag end"),g(e),document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",_),m=!1},g=function(e){m&&(e.preventDefault(),C(c,(0,o.vecAdd)([e.screenX,e.screenY],h,i)))};t.resizeStartHandler=function(e,t){return function(n){l=[e,t],s.log("resize start",l),p=!0,i=[window.screenLeft-n.screenX,window.screenTop-n.screenY],d=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",y),document.addEventListener("mouseup",v),y(n)}};var v=function x(e){s.log("resize end",u),y(e),document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x),p=!1},y=function(e){p&&(e.preventDefault(),(u=(0,o.vecAdd)(d,(0,o.vecMultiply)(l,(0,o.vecAdd)([e.screenX,e.screenY],(0,o.vecInverse)([window.screenLeft,window.screenTop]),i,[1,1]))))[0]=Math.max(u[0],250),u[1]=Math.max(u[1],120),function(e,t){(0,r.winset)(e,"size",t[0]+","+t[1])}(c,u))}},function(e,t,n){"use strict";t.__esModule=!0,t.refocusLayout=t.Layout=void 0;var o=n(0),r=n(10),a=n(33);t.refocusLayout=function(){if(!a.IS_IE8){var e=document.getElementById("Layout__content");e&&e.focus()}};var c=function(e){var t=e.className,n=e.theme,a=void 0===n?"nanotrasen":n,c=e.children;return(0,o.createVNode)(1,"div","theme-"+a,(0,o.createVNode)(1,"div",(0,r.classes)(["Layout",t]),c,0),2)};t.Layout=c;c.Content=function(e){var t=e.className,n=e.scrollable,a=e.children;return(0,o.createVNode)(1,"div",(0,r.classes)(["Layout__content",n&&"Layout__content--scrollable",t]),a,0,{id:"Layout__content"})}},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=void 0;var o=n(0),r=n(10);t.Tooltip=function(e){var t=e.content,n=e.position,a=void 0===n?"bottom":n,c="string"==typeof t&&t.length>35;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a]),null,1,{"data-tooltip":t})}},function(e,t,n){"use strict";t.__esModule=!0,t.Dimmer=void 0;var o=n(0),r=n(10),a=n(22),c=["className","children"];t.Dimmer=function(e){var t=e.className,n=e.children,i=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Dimmer"].concat(t))},i,{children:(0,o.createVNode)(1,"div","Dimmer__inner",n,0)})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Divider=void 0;var o=n(0),r=n(10);t.Divider=function(e){var t=e.vertical,n=e.hidden;return(0,o.createVNode)(1,"div",(0,r.classes)(["Divider",n&&"Divider--hidden",t?"Divider--vertical":"Divider--horizontal"]))}},function(e,t,n){"use strict";t.__esModule=!0,t.GridColumn=t.Grid=void 0;var o=n(0),r=n(68),a=n(10),c=["children"],i=["size","style"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var d=function(e){var t=e.children,n=l(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=d,d.defaultHooks=a.pureComponentHooks;var u=function(e){var t=e.size,n=void 0===t?1:t,a=e.style,c=l(e,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},a)},c)))};t.GridColumn=u,d.defaultHooks=a.pureComponentHooks,d.Column=u},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(12),a=n(10),c=n(163);function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},d=function(e){var t,n;function a(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={originalValue:t.value,value:t.value,dragging:!1,editing:!1,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix,a=t.disabled;n.state.editing||a||(document.body.style["pointer-events"]="none",n.ref=e.currentTarget,n.setState({originalValue:o,dragging:!1,value:o,origin:l(e,r)}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,a=n.props.onDrag;o&&a&&a(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t,o=n.props,a=o.minValue,c=o.maxValue,i=o.step,d=o.dragMatrix;if(!o.disabled){var u=n.ref.offsetWidth/((c-a)/i),s=null!=(t=n.props.stepPixelSize)?t:u;"function"==typeof s&&(s=s(u)),n.setState((function(t){var n=Object.assign({},t),o=t.origin,u=l(e,d)-o;if(t.dragging){var m=Math.trunc(u/s);n.value=(0,r.clamp)(Math.floor(n.originalValue/i)*i+m*i,a,c)}else Math.abs(u)>4&&(n.dragging=!0);return n}))}},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,a=n.state,c=a.dragging,i=a.value;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({originalValue:null,dragging:!1,editing:!c,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),c)n.suppressFlicker(),o&&o(e,i),r&&r(e,i);else if(n.inputRef){var l=n.inputRef.current;l.value=i;try{l.focus(),l.select()}catch(d){}}},n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),a.prototype.render=function(){var e=this,t=this.state,n=t.dragging,a=t.editing,i=t.value,l=t.suppressingFlicker,d=this.props,u=d.animated,s=d.value,m=d.unit,p=d.minValue,h=d.maxValue,f=d.format,C=d.onChange,N=d.onDrag,b=d.children,V=d.height,g=d.lineHeight,v=d.fontSize,y=d.disabled,_=s;(n||l)&&(_=i);var x=function(e){return e+(m?" "+m:"")},k=u&&!n&&!l&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:_,format:f,children:x})||x(f?f(_):_),L=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:!a||y?"none":undefined,height:V,"line-height":g,"font-size":v},onBlur:function(t){if(a){var n=parseInt(t.target.value,10);if(isNaN(n)||t.target.value.match(/[^0-9]/g))e.setState({editing:!1});else{var o=(0,r.clamp)(n,p,h);e.setState({editing:!1,value:o}),e.suppressFlicker(),C&&C(t,o),N&&N(t,o)}}},onKeyDown:function(t){if(13===t.keyCode){var n=parseInt(t.target.value,10);if(isNaN(n)||t.target.value.match(/[^0-9]/g))return void e.setState({editing:!1});var o=(0,r.clamp)(n,p,h);return e.setState({editing:!1,value:o}),e.suppressFlicker(),C&&C(t,o),void(N&&N(t,o))}27!==t.keyCode||e.setState({editing:!1})},disabled:y},null,this.inputRef);return b({dragging:n,editing:a,value:s,displayValue:_,displayElement:k,inputElement:L,handleDragStart:this.handleDragStart})},a}(o.Component);t.DraggableControl=d,d.defaultHooks=a.pureComponentHooks,d.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children","disabled"];t.Slider=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.fillValue,y=e.color,_=e.ranges,x=void 0===_?{}:_,k=e.children,L=e.disabled,w=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),B=k!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V,disabled:L},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=v!==undefined&&null!==v,h=((0,r.scale)(n,m,s),(0,r.scale)(null!=v?v:c,m,s)),f=(0,r.scale)(c,m,s),C=y||(0,r.keyOfMatchingRange)(null!=v?v:n,x)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Slider",L&&"Slider__disabled","ProgressBar",L?"ProgressBar--color--disabled":"ProgressBar--color--"+C,g,(0,i.computeBoxClassName)(w)]),[(0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar__fill",p&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(h)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(h,f))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(f)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",B?k:l,0),d],0,Object.assign({disabled:L},(0,i.computeBoxProps)(w),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.InterfaceLockNoticeBox=void 0;var o=n(0),r=n(1),a=n(2);t.InterfaceLockNoticeBox=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.siliconUser,d=void 0===l?i.siliconUser:l,u=e.locked,s=void 0===u?i.locked:u,m=e.normallyLocked,p=void 0===m?i.normallyLocked:m,h=e.onLockStatusChange,f=void 0===h?function(){return c("lock")}:h,C=e.accessText,N=void 0===C?"an ID card":C;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{color:d&&"grey",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:"Interface lock status:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1"}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{m:"0",color:p?"red":"green",icon:p?"lock":"unlock",content:p?"Locked":"Unlocked",onClick:function(){f&&f(!s)}})})]})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:["Swipe ",N," to ",s?"unlock":"lock"," this interface."]})}},function(e,t,n){"use strict";e.exports=n(544)()},function(e,t,n){"use strict";t.__esModule=!0,t.Countdown=void 0;var o=n(0),r=n(22),a=["format"];function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.timeLeft,0)},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var l=i.prototype;return l.tick=function(){var e=Math.max(this.state.value-this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},l.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},l.componentWillUnmount=function(){clearInterval(this.timer)},l.componentDidUpdate=function(e){var t=this;this.props.current!==e.current&&this.setState((function(e){return{value:Math.max(100*t.props.timeLeft,0)}})),this.timer||this.componentDidMount()},l.render=function(){var e=this.props,t=e.format,n=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,a),c=new Date(this.state.value).toISOString().slice(11,19);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Box,Object.assign({as:"span"},n,{children:t?t(this.state.value,c):c})))},i}(o.Component);t.Countdown=i,i.defaultProps={rate:1e3}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosScan=void 0;var o=n(0),r=n(30),a=(n(1),n(2));t.AtmosScan=function(e,t){var n=e.data.aircontents;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,r.filter)((function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}))(n).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.entry,color:(t=e.val,n=e.bad_low,r=e.poor_low,c=e.poor_high,i=e.bad_high,tc?"average":t>i?"bad":"good"),children:[e.val,e.units]},e.entry);var t,n,r,c,i}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_messenger=t.MessengerList=t.ActiveConversation=void 0;var o=n(0),r=n(30),a=n(1),c=n(2);t.pda_messenger=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data);return r.active_convo?(0,o.createComponentVNode)(2,i,{data:r}):(0,o.createComponentVNode)(2,l,{data:r})};var i=function(e,t){var n=(0,a.useBackend)(t).act,i=e.data,l=i.convo_name,d=i.convo_job,u=i.messages,s=i.active_convo,m=(0,a.useLocalState)(t,"clipboardMode",!1),p=m[0],h=m[1],f=(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Conversation with "+l+" ("+d+")",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{height:"97%",overflowY:"auto",children:(0,r.filter)((function(e){return e.target===s}))(u).map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{textAlign:e.sent?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,c.Icon,{fontSize:2.5,color:e.sent?"#4d9121":"#cd7a0d",position:"absolute",left:e.sent?null:"0px",right:e.sent?"0px":null,bottom:"-4px",style:{"z-index":"0",transform:e.sent?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,c.Box,{inline:!0,backgroundColor:e.sent?"#4d9121":"#cd7a0d",p:1,maxWidth:"100%",position:"relative",textAlign:e.sent?"left":"right",style:{"z-index":"1","border-radius":"10px","word-break":"normal"},children:[e.sent?"You:":"Them:"," ",e.message]})]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:s})},content:"Reply"})]})]});return p&&(f=(0,o.createComponentVNode)(2,c.Section,{level:2,title:"Conversation with "+l+" ("+d+")",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"eye",selected:p,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!p)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,c.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===s}))(u).map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{color:e.sent?"#4d9121":"#cd7a0d",style:{"word-break":"normal"},children:[e.sent?"You:":"Them:"," ",(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:e.message})]},t)}))}),(0,o.createComponentVNode)(2,c.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:s})},content:"Reply"})]})),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Messenger Functions",children:(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"Convo"})},children:"Delete Conversations"})})}),f]})};t.ActiveConversation=i;var l=function(e,t){var n=(0,a.useBackend)(t).act,r=e.data,i=r.convopdas,l=r.pdas,u=r.charges,s=r.silent,m=r.toff,p=r.ringtone_list,h=r.ringtone,f=(0,a.useLocalState)(t,"searchTerm",""),C=f[0],N=f[1];return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Messenger Functions",children:[(0,o.createComponentVNode)(2,c.Button,{selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return n("Toggle Ringer")},children:["Ringer: ",s?"Off":"On"]}),(0,o.createComponentVNode)(2,c.Button,{color:m?"bad":"green",icon:"power-off",onClick:function(){return n("Toggle Messenger")},children:["Messenger: ",m?"Off":"On"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"All"})},children:"Delete All Conversations"}),(0,o.createComponentVNode)(2,c.Button,{icon:"bell",onClick:function(){return n("Ringtone")},children:"Set Custom Ringtone"}),(0,o.createComponentVNode)(2,c.Button,{children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:h,width:"110px",options:Object.keys(p),onSelected:function(e){return n("Available_Ringtones",{selected_ringtone:e})}})})]})}),!m&&(0,o.createComponentVNode)(2,c.Box,{mt:2,children:[!!u&&(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Cartridge Special Function",children:[u," charges left."]})}),!i.length&&!l.length&&(0,o.createComponentVNode)(2,c.Box,{children:"No current conversations"})||(0,o.createComponentVNode)(2,c.Box,{children:["Search:"," ",(0,o.createComponentVNode)(2,c.Input,{value:C,onInput:function(e,t){N(t)}}),(0,o.createComponentVNode)(2,d,{title:"Current Conversations",data:r,pdas:i,msgAct:"Select Conversation",searchTerm:C}),(0,o.createComponentVNode)(2,d,{title:"Other PDAs",pdas:l,msgAct:"Message",data:r,searchTerm:C})]})]})||(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Messenger Offline."})]})};t.MessengerList=l;var d=function(e,t){var n=(0,a.useBackend)(t).act,r=e.data,i=e.pdas,l=e.title,d=e.msgAct,u=e.searchTerm,s=r.charges,m=r.plugins;return i&&i.length?(0,o.createComponentVNode)(2,c.Section,{level:2,title:l,children:i.filter((function(e){return e.Name.toLowerCase().includes(u.toLowerCase())})).map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-circle-down",content:e.Name,onClick:function(){return n(d,{target:e.uid})}}),!!s&&m.map((function(t){return(0,o.createComponentVNode)(2,c.Button,{icon:t.icon,content:t.name,onClick:function(){return n("Messenger Plugin",{plugin:t.uid,target:e.uid})}},t.uid)}))]},e.uid)}))}):(0,o.createComponentVNode)(2,c.Section,{level:2,title:l,children:"No PDAs found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.PowerMonitorMainContent=t.PowerMonitor=void 0;var o=n(0),r=n(30),a=n(48),c=n(12),i=n(10),l=n(21),d=n(1),u=n(2),s=n(3),m=6e5;t.PowerMonitor=function(e,t){return(0,o.createComponentVNode)(2,s.Window,{resizeable:!0,children:(0,o.createComponentVNode)(2,s.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,p)})})};var p=function(e,t){var n=(0,d.useBackend)(t),r=(n.act,n.data),a=r.powermonitor,c=r.select_monitor;return(0,o.createComponentVNode)(2,u.Box,{m:0,children:[!a&&c&&(0,o.createComponentVNode)(2,h),a&&(0,o.createComponentVNode)(2,f)]})};t.PowerMonitorMainContent=p;var h=function(e,t){var n=(0,d.useBackend)(t),r=n.act,a=n.data.powermonitors;return(0,o.createComponentVNode)(2,u.Section,{title:"Select Power Monitor",children:a.map((function(e){return(0,o.createComponentVNode)(2,u.Box,{children:(0,o.createComponentVNode)(2,u.Button,{content:e.Area,icon:"arrow-right",onClick:function(){return r("selectmonitor",{selectmonitor:e.uid})}})},e)}))})},f=function(e,t){var n,i=(0,d.useBackend)(t),s=i.act,p=i.data,h=p.powermonitor,f=p.history,b=p.apcs,V=p.select_monitor;if(p.no_powernet)n=(0,o.createComponentVNode)(2,u.Box,{color:"bad",textAlign:"center",children:[(0,o.createComponentVNode)(2,u.Icon,{name:"exclamation-triangle",size:"2",my:"0.5rem"}),(0,o.createVNode)(1,"br"),"Warning: The monitor is not connected to power grid via cable!"]});else{var g=(0,d.useLocalState)(t,"sortByField",null),v=g[0],y=g[1],_=f.supply[f.supply.length-1]||0,x=f.demand[f.demand.length-1]||0,k=f.supply.map((function(e,t){return[t,e]})),L=f.demand.map((function(e,t){return[t,e]})),w=Math.max.apply(Math,[m].concat(f.supply,f.demand)),B=(0,a.flow)([(0,r.map)((function(e,t){return Object.assign({},e,{id:e.name+t})})),"name"===v&&(0,r.sortBy)((function(e){return e.Name})),"charge"===v&&(0,r.sortBy)((function(e){return-e.CellPct})),"draw"===v&&(0,r.sortBy)((function(e){return-e.Load}))])(b);n=(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,u.Flex.Item,{width:"200px",children:(0,o.createComponentVNode)(2,u.Section,{children:(0,o.createComponentVNode)(2,u.LabeledList,{children:[(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Supply",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:_,minValue:0,maxValue:w,color:"green",children:(0,c.toFixed)(_/1e3)+" kW"})}),(0,o.createComponentVNode)(2,u.LabeledList.Item,{label:"Draw",children:(0,o.createComponentVNode)(2,u.ProgressBar,{value:x,minValue:0,maxValue:w,color:"red",children:(0,c.toFixed)(x/1e3)+" kW"})})]})})}),(0,o.createComponentVNode)(2,u.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,u.Section,{position:"relative",height:"100%",children:[(0,o.createComponentVNode)(2,u.Chart.Line,{fillPositionedParent:!0,data:k,rangeX:[0,k.length-1],rangeY:[0,w],strokeColor:"rgba(32, 177, 66, 1)",fillColor:"rgba(32, 177, 66, 0.25)"}),(0,o.createComponentVNode)(2,u.Chart.Line,{fillPositionedParent:!0,data:L,rangeX:[0,L.length-1],rangeY:[0,w],strokeColor:"rgba(219, 40, 40, 1)",fillColor:"rgba(219, 40, 40, 0.25)"})]})})]}),(0,o.createComponentVNode)(2,u.Box,{mb:1,children:[(0,o.createComponentVNode)(2,u.Box,{inline:!0,mr:2,color:"label",children:"Sort by:"}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"name"===v,content:"Name",onClick:function(){return y("name"!==v&&"name")}}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"charge"===v,content:"Charge",onClick:function(){return y("charge"!==v&&"charge")}}),(0,o.createComponentVNode)(2,u.Button.Checkbox,{checked:"draw"===v,content:"Draw",onClick:function(){return y("draw"!==v&&"draw")}})]}),(0,o.createComponentVNode)(2,u.Table,{children:[(0,o.createComponentVNode)(2,u.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,u.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,children:"Charge"}),(0,o.createComponentVNode)(2,u.Table.Cell,{textAlign:"right",children:"Draw"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Equipment",children:"Eqp"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Lighting",children:"Lgt"}),(0,o.createComponentVNode)(2,u.Table.Cell,{collapsing:!0,title:"Environment",children:"Env"})]}),B.map((function(e,t){return(0,o.createComponentVNode)(2,u.Table.Row,{className:"Table__row candystripe",children:[(0,o.createComponentVNode)(2,u.Table.Cell,{children:(0,l.decodeHtmlEntities)(e.Name)}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-right text-nowrap",children:(0,o.createComponentVNode)(2,C,{charging:e.CellStatus,charge:e.CellPct})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-right text-nowrap",children:e.Load}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Equipment})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Lights})}),(0,o.createComponentVNode)(2,u.Table.Cell,{className:"Table__cell text-center text-nowrap",children:(0,o.createComponentVNode)(2,N,{status:e.Environment})})]},e.id)}))]})],4)}return(0,o.createComponentVNode)(2,u.Section,{title:h,buttons:(0,o.createComponentVNode)(2,u.Box,{m:0,children:V&&(0,o.createComponentVNode)(2,u.Button,{content:"Back",icon:"arrow-up",onClick:function(){return s("return")}})}),children:n})},C=function(e){var t=e.charging,n=e.charge;return(0,o.createFragment)([(0,o.createComponentVNode)(2,u.Icon,{width:"18px",textAlign:"center",name:"N"===t&&(n>50?"battery-half":"battery-quarter")||"C"===t&&"bolt"||"F"===t&&"battery-full"||"M"===t&&"slash",color:"N"===t&&(n>50?"yellow":"red")||"C"===t&&"yellow"||"F"===t&&"green"||"M"===t&&"orange"}),(0,o.createComponentVNode)(2,u.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,c.toFixed)(n)+"%"})],4)};C.defaultHooks=i.pureComponentHooks;var N=function(e){var t,n;switch(e.status){case"AOn":t=!0,n=!0;break;case"AOff":t=!0,n=!1;break;case"On":t=!1,n=!0;break;case"Off":t=!1,n=!1}var r=(n?"On":"Off")+" ["+(t?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,u.ColorBox,{color:n?"good":"bad",content:t?undefined:"M",title:r})};N.defaultHooks=i.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RndRoute=void 0;var o=n(1);t.RndRoute=function(e,t){var n=e.render,r=(0,o.useBackend)(t).data,a=r.menu,c=r.submenu,i=function(e,t){return null===e||e===undefined||("function"==typeof e?e(t):e===t)};return i(e.menu,a)&&i(e.submenu,c)?n():null}},function(e,t,n){e.exports=n(234)},function(e,t,n){"use strict";var o=n(0);n(236),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(268),n(271),n(272),n(273),n(186),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(290),n(291),n(292),n(294),n(295),n(297),n(298),n(300),n(301),n(302),n(303),n(304),n(305),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(316),n(317),n(318),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(331),n(332),n(333),n(334),n(335),n(336),n(338),n(339),n(340),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(366),n(367),n(368),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(209),n(396),n(398),n(399),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(413),n(414),n(415),n(416),n(417),n(419),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(473),n(475),n(478),n(479);var r=n(482);n(483);n(217);var a=n(1),c=n(33),i=n(218),l=n(82);n(485),n(486),n(487),n(488),n(489);var d=n(490);n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504);Date.now();var u,s=(0,d.createStore)(),m=!0,p=function(){for(s.subscribe((function(){!function(){try{var e=s.getState();m&&(l.logger.log("initial render",e),(0,i.setupDrag)(e));var t=(0,n(162).getRoutedComponent)(e),r=(0,o.createComponentVNode)(2,d.StoreProvider,{store:s,children:(0,o.createComponentVNode)(2,t)});u||(u=document.getElementById("react-root")),(0,o.render)(r,u)}catch(a){throw l.logger.error("rendering error",a),a}m&&(m=!1)}()})),window.update=function(e){var t="string"==typeof e?function(e){var t=function(e,t){return"object"==typeof t&&null!==t&&t.__number__?parseFloat(t.__number__):t};c.IS_IE8&&(t=undefined);try{return JSON.parse(e,t)}catch(o){l.logger.log(o),l.logger.log("What we got:",e);var n=o&&o.message;throw new Error("JSON parsing error: "+n)}}(e):e;s.dispatch((0,a.backendUpdate)(t))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}(0,r.loadCSS)("font-awesome.css")};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()},function(e,t,n){"use strict";t.__esModule=!0,t.Fragment=t.EMPTY_OBJ=t.Component=void 0,t._CI=Be,t._HI=F,t._M=Ie,t._MCCC=Me,t._ME=Ae,t._MFCC=Oe,t._MP=Le,t._MR=be,t._RFC=Se,t.__render=je,t.createComponentVNode=function(e,t,n,o,r){var c=new S(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(a(o))return n;if(a(n))return u(o,null);return w(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(a(o))return n;if(a(n))return o;return w(n,o)}(e,t,r),t);x.createVNode&&x.createVNode(c);return c},t.createFragment=A,t.createPortal=function(e,t){var n=F(e);return I(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),We(n,e,o,r)}},t.createTextVNode=T,t.createVNode=I,t.directClone=E,t.findDOMfromVNode=V,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(i(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&a(e.children)&&P(e,t.children),void 0!==t.className&&(a(e.className)&&(e.className=t.className||null),t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?u(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.options=void 0,t.render=We,t.rerender=Ye,t.version=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function a(e){return null==e}function c(e){return null===e||!1===e||!0===e||void 0===e}function i(e){return"function"==typeof e}function l(e){return"string"==typeof e}function d(e){return null===e}function u(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function s(e){return!d(e)&&"object"==typeof e}var m={};t.EMPTY_OBJ=m;function p(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function f(e,t,n){d(n)?h(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function N(e){for(var t=0;t0,h=d(m),f=l(m)&&"$"===m[0];p||h||f?(n=n||t.slice(0,u),(p||f)&&(s=E(s)),(h||f)&&(s.key="$"+u),n.push(s)):n&&n.push(s),s.flags|=65536}}a=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=E(t)),a=2;return e.children=n,e.childFlags=a,e}function F(e){return c(e)||r(e)?T(e,null):o(e)?A(e,0,null):16384&e.flags?E(e):e}var R="http://www.w3.org/1999/xlink",D="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":R,"xlink:arcrole":R,"xlink:href":R,"xlink:role":R,"xlink:show":R,"xlink:title":R,"xlink:type":R,"xml:base":D,"xml:lang":D,"xml:space":D};function W(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=W(0),U=W(null),H=W(!0);function G(e,t){var n=t.$EV;return n||(n=t.$EV=W(null)),n[e]||1==++z[e]&&(U[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?Y(t,!0,e,J(t)):t.stopPropagation()}}(e):function(e){return function(t){Y(t,!1,e,J(t))}}(e);return document.addEventListener(p(e),t),t}(e)),n}function K(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(p(e),U[e]),U[e]=null),n[e]=null)}function Y(e,t,n,o){var r=function(e){return i(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var a=r.$EV;if(a){var c=a[n];if(c&&(o.dom=r,c.event?c.event(c.data,e):c(e),e.cancelBubble))return}r=r.parentNode}while(!d(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function $(){return this.defaultPrevented}function X(){return this.cancelBubble}function J(e){var t={dom:document};return e.isDefaultPrevented=$,e.isPropagationStopped=X,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function Q(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Z(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||m,a=o.dom;if(l(e))Q(r,e,n);else for(var c=0;c-1&&t.options[c]&&(i=t.options[c].value),n&&a(i)&&(i=e.defaultValue),ce(o,i)}}var de,ue,se=Z("onInput",pe),me=Z("onChange");function pe(e,t,n){var o=e.value,r=t.value;if(a(o)){if(n){var c=e.defaultValue;a(c)||c===r||(t.defaultValue=c,t.value=c)}}else r!==o&&(t.defaultValue=o,t.value=o)}function he(e,t,n,o,r,a){64&e?ae(o,n):256&e?le(o,n,r,t):128&e&&pe(o,n,r),a&&(n.$V=t)}function fe(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ie)}(t):128&e&&function(e,t){ee(e,"input",se),t.onChange&&ee(e,"change",me)}(t,n)}function Ce(e){return e.type&&te(e.type)?!a(e.checked):!a(e.value)}function Ne(e){e&&!B(e,null)&&e.current&&(e.current=null)}function be(e,t,n){e&&(i(e)||void 0!==e.current)&&n.push((function(){B(e,t)||void 0===e.current||(e.current=t)}))}function Ve(e,t){ge(e),g(e,t)}function ge(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;Ne(t);var c=e.childFlags;if(!d(r))for(var l=Object.keys(r),u=0,s=l.length;u0;for(var i in c&&(a=Ce(n))&&fe(t,o,n),n)ke(i,null,n[i],o,r,a,null);c&&he(t,e,o,n,!0,a)}function we(e,t,n){var o=F(e.render(t,e.state,n)),r=n;return i(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function Be(e,t,n,o,r,a){var c=new t(n,o),l=c.$N=Boolean(t.getDerivedStateFromProps||c.getSnapshotBeforeUpdate);if(c.$SVG=r,c.$L=a,e.children=c,c.$BS=!1,c.context=o,c.props===m&&(c.props=n),l)c.state=y(c,n,c.state);else if(i(c.componentWillMount)){c.$BR=!0,c.componentWillMount();var u=c.$PS;if(!d(u)){var s=c.state;if(d(s))c.state=u;else for(var p in u)s[p]=u[p];c.$PS=null}c.$BR=!1}return c.$LI=we(c,n,o),c}function Se(e,t){var n=e.props||m;return 32768&e.flags?e.type.render(n,e.ref,t):e.type(n,t)}function Ie(e,t,n,o,r,a){var c=e.flags|=16384;481&c?Ae(e,t,n,o,r,a):4&c?function(e,t,n,o,r,a){var c=Be(e,e.type,e.props||m,n,o,a);Ie(c.$LI,t,c.$CX,o,r,a),Me(e.ref,c,a)}(e,t,n,o,r,a):8&c?(!function(e,t,n,o,r,a){Ie(e.children=F(Se(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Oe(e,a)):512&c||16&c?Te(e,t,r):8192&c?function(e,t,n,o,r,a){var c=e.children,i=e.childFlags;12&i&&0===c.length&&(i=e.childFlags=2,c=e.children=M());2===i?Ie(c,n,t,o,r,a):Ee(c,n,t,o,r,a)}(e,n,t,o,r,a):1024&c&&function(e,t,n,o,r){Ie(e.children,e.ref,t,!1,null,r);var a=M();Te(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Te(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||f(t,o,n)}function Ae(e,t,n,o,r,c){var i=e.flags,l=e.props,u=e.className,s=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&i)>0),p=e.children;if(a(u)||""===u||(o?m.setAttribute("class",u):m.className=u),16===s)k(m,p);else if(1!==s){var h=o&&"foreignObject"!==e.type;2===s?(16384&p.flags&&(e.children=p=E(p)),Ie(p,m,n,h,null,c)):8!==s&&4!==s||Ee(p,m,n,h,null,c)}d(t)||f(t,m,r),d(l)||Le(e,i,l,m,o),be(e.ref,m,c)}function Ee(e,t,n,o,r,a){for(var c=0;c0,d!==u){var h=d||m;if((i=u||m)!==m)for(var f in(s=(448&r)>0)&&(p=Ce(i)),i){var C=h[f],N=i[f];C!==N&&ke(f,C,N,l,o,p,e)}if(h!==m)for(var b in h)a(i[b])&&!a(h[b])&&ke(b,h[b],null,l,o,p,e)}var V=t.children,g=t.className;e.className!==g&&(a(g)?l.removeAttribute("class"):o?l.setAttribute("class",g):l.className=g);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,V):Fe(e.childFlags,t.childFlags,e.children,V,l,n,o&&"foreignObject"!==t.type,null,e,c);s&&he(r,t,l,i,!1,p);var v=t.ref,y=e.ref;y!==v&&(Ne(y),be(v,l,c))}(e,t,o,r,p,s):4&p?function(e,t,n,o,r,a,c){var l=t.children=e.children;if(d(l))return;l.$L=c;var s=t.props||m,p=t.ref,h=e.ref,f=l.state;if(!l.$N){if(i(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(s,o),l.$UN)return;l.$BR=!1}d(l.$PS)||(f=u(f,l.$PS),l.$PS=null)}Re(l,f,s,n,o,r,!1,a,c),h!==p&&(Ne(h),be(p,l,c))}(e,t,n,o,r,l,s):8&p?function(e,t,n,o,r,c,l){var d=!0,u=t.props||m,s=t.ref,p=e.props,h=!a(s),f=e.children;h&&i(s.onComponentShouldUpdate)&&(d=s.onComponentShouldUpdate(p,u));if(!1!==d){h&&i(s.onComponentWillUpdate)&&s.onComponentWillUpdate(p,u);var C=F(Se(t,o));Pe(f,C,n,o,r,c,l),t.children=C,h&&i(s.onComponentDidUpdate)&&s.onComponentDidUpdate(p,u)}else t.children=f}(e,t,n,o,r,l,s):16&p?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&p?t.dom=e.dom:8192&p?function(e,t,n,o,r,a){var c=e.children,i=t.children,l=e.childFlags,d=t.childFlags,u=null;12&d&&0===i.length&&(d=t.childFlags=2,i=t.children=M());var s=0!=(2&d);if(12&l){var m=c.length;(8&l&&8&d||s||!s&&i.length>m)&&(u=V(c[m-1],!1).nextSibling)}Fe(l,d,c,i,n,o,r,u,e,a)}(e,t,n,o,r,s):function(e,t,n,o){var r=e.ref,a=t.ref,i=t.children;if(Fe(e.childFlags,t.childFlags,e.children,i,r,n,!1,null,e,o),t.dom=e.dom,r!==a&&!c(i)){var l=i.dom;C(r,l),h(a,l)}}(e,t,o,s)}function Fe(e,t,n,o,r,a,c,i,l,d){switch(e){case 2:switch(t){case 2:Pe(n,o,r,a,c,i,d);break;case 1:Ve(n,r);break;case 16:ge(n),k(r,o);break;default:!function(e,t,n,o,r,a){ge(e),Ee(t,n,o,r,V(e,!0),a),g(e,n)}(n,o,r,a,c,d)}break;case 1:switch(t){case 2:Ie(o,r,a,c,i,d);break;case 1:break;case 16:k(r,o);break;default:Ee(o,r,a,c,i,d)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:k(n,t))}(n,o,r);break;case 2:ye(r),Ie(o,r,a,c,i,d);break;case 1:ye(r);break;default:ye(r),Ee(o,r,a,c,i,d)}break;default:switch(t){case 16:ve(n),k(r,o);break;case 2:_e(r,l,n),Ie(o,r,a,c,i,d);break;case 1:_e(r,l,n);break;default:var u=0|n.length,s=0|o.length;0===u?s>0&&Ee(o,r,a,c,i,d):0===s?_e(r,l,n):8===t&&8===e?function(e,t,n,o,r,a,c,i,l,d){var u,s,m=a-1,p=c-1,h=0,f=e[h],C=t[h];e:{for(;f.key===C.key;){if(16384&C.flags&&(t[h]=C=E(C)),Pe(f,C,n,o,r,i,d),e[h]=C,++h>m||h>p)break e;f=e[h],C=t[h]}for(f=e[m],C=t[p];f.key===C.key;){if(16384&C.flags&&(t[p]=C=E(C)),Pe(f,C,n,o,r,i,d),e[m]=C,m--,p--,h>m||h>p)break e;f=e[m],C=t[p]}}if(h>m){if(h<=p)for(s=(u=p+1)p)for(;h<=m;)Ve(e[h++],n);else!function(e,t,n,o,r,a,c,i,l,d,u,s,m){var p,h,f,C=0,N=i,b=i,g=a-i+1,y=c-i+1,_=new Int32Array(y+1),x=g===o,k=!1,L=0,w=0;if(r<4||(g|y)<32)for(C=N;C<=a;++C)if(p=e[C],wi?k=!0:L=i,16384&h.flags&&(t[i]=h=E(h)),Pe(p,h,l,n,d,u,m),++w;break}!x&&i>c&&Ve(p,l)}else x||Ve(p,l);else{var B={};for(C=b;C<=c;++C)B[t[C].key]=C;for(C=N;C<=a;++C)if(p=e[C],wN;)Ve(e[N++],l);_[i-b]=C+1,L>i?k=!0:L=i,16384&(h=t[i]).flags&&(t[i]=h=E(h)),Pe(p,h,l,n,d,u,m),++w}else x||Ve(p,l);else x||Ve(p,l)}if(x)_e(l,s,e),Ee(t,l,n,d,u,m);else if(k){var S=function(e){var t=0,n=0,o=0,r=0,a=0,c=0,i=0,l=e.length;l>De&&(De=l,de=new Int32Array(l),ue=new Int32Array(l));for(;n>1]]0&&(ue[n]=de[a-1]),de[a]=n)}a=r+1;var d=new Int32Array(a);c=de[a-1];for(;a-- >0;)d[a]=c,c=ue[c],de[a]=0;return d}(_);for(i=S.length-1,C=y-1;C>=0;C--)0===_[C]?(16384&(h=t[L=C+b]).flags&&(t[L]=h=E(h)),Ie(h,l,n,d,(f=L+1)=0;C--)0===_[C]&&(16384&(h=t[L=C+b]).flags&&(t[L]=h=E(h)),Ie(h,l,n,d,(f=L+1)c?c:a,m=0;mc)for(m=s;m=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),b=m("concat"),V=function(e){if(!i(e))return!1;var t=e[f];return t!==undefined?!!t:c(e)};o({target:"Array",proto:!0,arity:1,forced:!N||!b},{concat:function(e){var t,n,o,r,a,c=l(this),i=s(c,0),m=0;for(t=-1,o=arguments.length;t9007199254740991)throw C("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw C("Maximum allowed index exceeded");u(i,m++,a)}return i.length=m,i}})},function(e,t,n){"use strict";var o=n(4),r=n(183),a=n(61);o({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(25).every;o({target:"Array",proto:!0,forced:!n(54)("every")},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(138),a=n(61);o({target:"Array",proto:!0},{fill:r}),a("fill")},function(e,t,n){"use strict";var o=n(4),r=n(25).filter;o({target:"Array",proto:!0,forced:!n(93)("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(25).find,a=n(61),c=!0;"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("find")},function(e,t,n){"use strict";var o=n(4),r=n(25).findIndex,a=n(61),c=!0;"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),a("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(184),a=n(19),c=n(23),i=n(40),l=n(91);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=a(this),n=c(t),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:i(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(184),a=n(27),c=n(19),i=n(23),l=n(91);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=c(this),o=i(n);return a(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(267);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(25).forEach,r=n(54)("forEach");e.exports=r?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(269);o({target:"Array",stat:!0,forced:!n(108)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(5),r=n(60),a=n(15),c=n(19),i=n(270),l=n(139),d=n(92),u=n(23),s=n(59),m=n(140),p=n(107),h=o.Array;e.exports=function(e){var t=c(e),n=d(this),o=arguments.length,f=o>1?arguments[1]:undefined,C=f!==undefined;C&&(f=r(f,o>2?arguments[2]:undefined));var N,b,V,g,v,y,_=p(t),x=0;if(!_||this==h&&l(_))for(N=u(t),b=n?new this(N):h(N);N>x;x++)y=C?f(t[x],x):t[x],s(b,x,y);else for(v=(g=m(t,_)).next,b=n?new this:[];!(V=a(v,g)).done;x++)y=C?i(g,f,[V.value,x],!0):V.value,s(b,x,y);return b.length=x,b}},function(e,t,n){"use strict";var o=n(9),r=n(185);e.exports=function(e,t,n,a){try{return a?t(o(n)[0],n[1]):t(n)}catch(c){r(e,"throw",c)}}},function(e,t,n){"use strict";var o=n(4),r=n(88).includes,a=n(6),c=n(61);o({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),c("includes")},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(88).indexOf,c=n(54),i=r([].indexOf),l=!!i&&1/i([1],1,-0)<0,d=c("indexOf");o({target:"Array",proto:!0,forced:l||!d},{indexOf:function(e){var t=arguments.length>1?arguments[1]:undefined;return l?i(this,e,t)||0:a(this,e,t)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(75)})},function(e,t,n){"use strict";var o=n(187).IteratorPrototype,r=n(52),a=n(64),c=n(53),i=n(94),l=function(){return this};e.exports=function(e,t,n,d){var u=t+" Iterator";return e.prototype=r(o,{next:a(+!d,n)}),c(e,u,!1,!0),i[u]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(85),c=n(31),i=n(54),l=r([].join),d=a!=Object,u=i("join",",");o({target:"Array",proto:!0,forced:d||!u},{join:function(e){return l(c(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(189);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(25).map;o({target:"Array",proto:!0,forced:!n(93)("map")},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(6),c=n(92),i=n(59),l=r.Array;o({target:"Array",stat:!0,forced:a((function(){function e(){}return!(l.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new(c(this)?this:l)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(109).left,a=n(54),c=n(57),i=n(76);o({target:"Array",proto:!0,forced:!a("reduce")||!i&&c>79&&c<83},{reduce:function(e){var t=arguments.length;return r(this,e,t,t>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(109).right,a=n(54),c=n(57),i=n(76);o({target:"Array",proto:!0,forced:!a("reduceRight")||!i&&c>79&&c<83},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(75),c=n(92),i=n(11),l=n(51),d=n(23),u=n(31),s=n(59),m=n(16),p=n(93),h=n(66),f=p("slice"),C=m("species"),N=r.Array,b=Math.max;o({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,o,r,m=u(this),p=d(m),f=l(e,p),V=l(t===undefined?p:t,p);if(a(m)&&(n=m.constructor,(c(n)&&(n===N||a(n.prototype))||i(n)&&null===(n=n[C]))&&(n=undefined),n===N||n===undefined))return h(m,f,V);for(o=new(n===undefined?N:n)(b(V-f,0)),r=0;f1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(27),c=n(19),i=n(23),l=n(20),d=n(6),u=n(190),s=n(54),m=n(191),p=n(192),h=n(57),f=n(143),C=[],N=r(C.sort),b=r(C.push),V=d((function(){C.sort(undefined)})),g=d((function(){C.sort(null)})),v=s("sort"),y=!d((function(){if(h)return h<70;if(!(m&&m>3)){if(p)return!0;if(f)return f<603;var e,t,n,o,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(o=0;o<47;o++)C.push({k:t+o,v:n})}for(C.sort((function(e,t){return t.v-e.v})),o=0;ol(n)?1:-1}}(e)),n=r.length,o=0;o9007199254740991)throw m("Maximum allowed length exceeded");for(r=d(N,o),s=0;sb-o+n;s--)delete N[s-1]}else if(n>o)for(s=b-o;s>V;s--)C=s+n-1,(f=s+o-1)in N?N[C]=N[f]:delete N[C];for(s=0;s>1,C=23===t?a(2,-24)-a(2,-77):0,N=e<0||0===e&&1/e<0?1:0,b=0;for((e=r(e))!=e||e===Infinity?(u=e!=e?1:0,d=h):(d=c(i(e)/l),e*(s=a(2,-d))<1&&(d--,s*=2),(e+=d+f>=1?C/s:C*a(2,1-f))*s>=2&&(d++,s/=2),d+f>=h?(u=0,d=h):d+f>=1?(u=(e*s-1)*a(2,t),d+=f):(u=e*a(2,f-1)*a(2,t),d=0));t>=8;)m[b++]=255&u,u/=256,t-=8;for(d=d<0;)m[b++]=255&d,d/=256,p-=8;return m[--b]|=128*N,m},unpack:function(e,t){var n,o=e.length,r=8*o-t-1,c=(1<>1,l=r-7,d=o-1,u=e[d--],s=127&u;for(u>>=7;l>0;)s=256*s+e[d--],l-=8;for(n=s&(1<<-l)-1,s>>=-l,l+=t;l>0;)n=256*n+e[d--],l-=8;if(0===s)s=1-i;else{if(s===c)return n?NaN:u?-Infinity:Infinity;n+=a(2,t),s-=i}return(u?-1:1)*n*a(2,s-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(14);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(6),c=n(110),i=n(9),l=n(51),d=n(41),u=n(95),s=c.ArrayBuffer,m=c.DataView,p=m.prototype,h=r(s.prototype.slice),f=r(p.getUint8),C=r(p.setUint8);o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new s(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(h&&t===undefined)return h(i(this),e);for(var n=i(this).byteLength,o=l(e,n),r=l(t===undefined?n:t,n),a=new(u(this,s))(d(r-o)),c=new m(this),p=new m(a),N=0;o9999?"+":"";return n+c(l(e),n?6:4,0)+"-"+c(N(this)+1,2,0)+"-"+c(m(this),2,0)+"T"+c(h(this),2,0)+":"+c(C(this),2,0)+":"+c(b(this),2,0)+"."+c(t,3,0)+"Z"}:u},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(19),c=n(128);o({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=a(this),n=c(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(18),r=n(24),a=n(299),c=n(16)("toPrimitive"),i=Date.prototype;o(i,c)||r(i,c,a)},function(e,t,n){"use strict";var o=n(5),r=n(9),a=n(173),c=o.TypeError;e.exports=function(e){if(r(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw c("Incorrect hint");return a(this,e)}},function(e,t,n){"use strict";var o=n(7),r=n(24),a=Date.prototype,c=o(a.toString),i=o(a.getTime);"Invalid Date"!=String(new Date(NaN))&&r(a,"toString",(function(){var e=i(this);return e==e?c(this):"Invalid Date"}))},function(e,t,n){"use strict";var o=n(4),r=n(194);o({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r})},function(e,t,n){"use strict";var o=n(13),r=n(11),a=n(17),c=n(42),i=n(16),l=n(132),d=i("hasInstance"),u=Function.prototype;d in u||a.f(u,d,{value:l((function(e){if(!o(this)||!r(e))return!1;var t=this.prototype;if(!r(t))return e instanceof this;for(;e=c(e);)if(t===e)return!0;return!1}),d)})},function(e,t,n){"use strict";var o=n(8),r=n(73).EXISTS,a=n(7),c=n(17).f,i=Function.prototype,l=a(i.toString),d=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=a(d.exec);o&&!r&&c(i,"name",{configurable:!0,get:function(){try{return u(d,l(this))[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(5);n(53)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";n(306)},function(e,t,n){"use strict";n(112)("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(195))},function(e,t,n){"use strict";var o=n(4),r=n(196),a=Math.acosh,c=Math.log,i=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?c(e)+l:r(e-1+i(e-1)*i(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,a=Math.log,c=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function i(e){return isFinite(e=+e)&&0!=e?e<0?-i(-e):a(e+c(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,a=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:a((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(149),a=Math.abs,c=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*c(a(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,a=Math.log,c=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(a(e+.5)*c):32}})},function(e,t,n){"use strict";var o=n(4),r=n(115),a=Math.cosh,c=Math.abs,i=Math.E;o({target:"Math",stat:!0,forced:!a||a(710)===Infinity},{cosh:function(e){var t=r(c(e)-1)+1;return(t+1/(t*i*i))*(i/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(115);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(315)})},function(e,t,n){"use strict";var o=n(149),r=Math.abs,a=Math.pow,c=a(2,-52),i=a(2,-23),l=a(2,127)*(2-i),d=a(2,-126);e.exports=Math.fround||function(e){var t,n,a=r(e),u=o(e);return al||n!=n?u*Infinity:u*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,a=Math.abs,c=Math.sqrt;o({target:"Math",stat:!0,arity:2,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,i=0,l=arguments.length,d=0;i0?(o=n/d)*o:n;return d===Infinity?Infinity:d*c(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,a=65535&o;return 0|r*a+((65535&n>>>16)*a+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log10:n(319)})},function(e,t,n){"use strict";var o=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return o(e)*r}},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(196)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,a=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/a}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(149)})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(115),c=Math.abs,i=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return c(e=+e)<1?(a(e)-a(-e))/2:(i(e-1)-i(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(115),a=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){"use strict";n(53)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,a=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?a:r)(e)}})},function(e,t,n){"use strict";var o=n(8),r=n(5),a=n(7),c=n(89),i=n(24),l=n(18),d=n(114),u=n(46),s=n(69),m=n(128),p=n(6),h=n(58).f,f=n(26).f,C=n(17).f,N=n(197),b=n(80).trim,V=r.Number,g=V.prototype,v=r.TypeError,y=a("".slice),_=a("".charCodeAt),x=function(e){var t=m(e,"number");return"bigint"==typeof t?t:k(t)},k=function(e){var t,n,o,r,a,c,i,l,d=m(e,"number");if(s(d))throw v("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2)if(d=b(d),43===(t=_(d,0))||45===t){if(88===(n=_(d,2))||120===n)return NaN}else if(48===t){switch(_(d,1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+d}for(c=(a=y(d,2)).length,i=0;ir)return NaN;return parseInt(a,o)}return+d};if(c("Number",!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var L,w=function(e){var t=arguments.length<1?0:V(x(e)),n=this;return u(g,n)&&p((function(){N(n)}))?d(Object(t),n,w):t},B=o?h(V):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),S=0;B.length>S;S++)l(V,L=B[S])&&!l(w,L)&&C(w,L,f(V,L));w.prototype=g,g.constructor=w,i(r,"Number",w,{constructor:!0})}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(330)})},function(e,t,n){"use strict";var o=n(5).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(150)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(150),a=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&a(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(337);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(20),i=n(80).trim,l=n(116),d=a("".charAt),u=o.parseFloat,s=o.Symbol,m=s&&s.iterator,p=1/u(l+"-0")!=-Infinity||m&&!r((function(){u(Object(m))}));e.exports=p?function(e){var t=i(c(e)),n=u(t);return 0===n&&"-"==d(t,0)?-0:n}:u},function(e,t,n){"use strict";var o=n(4),r=n(198);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(40),i=n(197),l=n(147),d=n(6),u=r.RangeError,s=r.String,m=Math.floor,p=a(l),h=a("".slice),f=a(1..toFixed),C=function g(e,t,n){return 0===t?n:t%2==1?g(e,t-1,n*e):g(e*e,t/2,n)},N=function(e,t,n){for(var o=-1,r=n;++o<6;)r+=t*e[o],e[o]=r%1e7,r=m(r/1e7)},b=function(e,t){for(var n=6,o=0;--n>=0;)o+=e[n],e[n]=m(o/t),o=o%t*1e7},V=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var o=s(e[t]);n=""===n?o:n+p("0",7-o.length)+o}return n};o({target:"Number",proto:!0,forced:d((function(){return"0.000"!==f(8e-5,3)||"1"!==f(.9,0)||"1.25"!==f(1.255,2)||"1000000000000000128"!==f(0xde0b6b3a7640080,0)}))||!d((function(){f({})}))},{toFixed:function(e){var t,n,o,r,a=i(this),l=c(e),d=[0,0,0,0,0,0],m="",f="0";if(l<0||l>20)throw u("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return s(a);if(a<0&&(m="-",a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*C(2,69,1))-69)<0?a*C(2,-t,1):a/C(2,t,1),n*=4503599627370496,(t=52-t)>0){for(N(d,0,n),o=l;o>=7;)N(d,1e7,0),o-=7;for(N(d,C(10,o,1),0),o=t-1;o>=23;)b(d,1<<23),o-=23;b(d,1<0?m+((r=f.length)<=l?"0."+p("0",l-r)+f:h(f,0,r-l)+"."+h(f,r-l)):m+f}})},function(e,t,n){"use strict";var o=n(4),r=n(341);o({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(8),r=n(7),a=n(15),c=n(6),i=n(90),l=n(105),d=n(102),u=n(19),s=n(85),m=Object.assign,p=Object.defineProperty,h=r([].concat);e.exports=!m||c((function(){if(o&&1!==m({b:1},m(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=m({},e)[n]||"abcdefghijklmnopqrst"!=i(m({},t)).join("")}))?function(e,t){for(var n=u(e),r=arguments.length,c=1,m=l.f,p=d.f;r>c;)for(var f,C=s(arguments[c++]),N=m?h(i(C),m(C)):i(C),b=N.length,V=0;b>V;)f=N[V++],o&&!a(p,C,f)||(n[f]=C[f]);return n}:m},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(8)},{create:n(52)})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(27),i=n(19),l=n(17);r&&o({target:"Object",proto:!0,forced:a},{__defineGetter__:function(e,t){l.f(i(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(136).f;o({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!r},{defineProperties:a})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(17).f;o({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!r},{defineProperty:a})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(27),i=n(19),l=n(17);r&&o({target:"Object",proto:!0,forced:a},{__defineSetter__:function(e,t){l.f(i(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(199).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(96),a=n(6),c=n(11),i=n(67).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:a((function(){l(1)})),sham:!r},{freeze:function(e){return l&&c(e)?l(i(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(79),a=n(59);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){a(t,e,n)}),{AS_ENTRIES:!0}),t}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(31),c=n(26).f,i=n(8),l=r((function(){c(1)}));o({target:"Object",stat:!0,forced:!i||l,sham:!i},{getOwnPropertyDescriptor:function(e,t){return c(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(133),c=n(31),i=n(26),l=n(59);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=c(e),r=i.f,d=a(o),u={},s=0;d.length>s;)(n=r(o,t=d[s++]))!==undefined&&l(u,t,n);return u}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(137).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(19),c=n(42),i=n(142);o({target:"Object",stat:!0,forced:r((function(){c(1)})),sham:!i},{getPrototypeOf:function(e){return c(a(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(200)})},function(e,t,n){"use strict";var o=n(4),r=n(113);o({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),c=n(45),i=n(148),l=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){l(1)}))||i},{isFrozen:function(e){return!a(e)||!(!i||"ArrayBuffer"!=c(e))||!!l&&l(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),a=n(11),c=n(45),i=n(148),l=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){l(1)}))||i},{isSealed:function(e){return!a(e)||!(!i||"ArrayBuffer"!=c(e))||!!l&&l(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(19),a=n(90);o({target:"Object",stat:!0,forced:n(6)((function(){a(1)}))},{keys:function(e){return a(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(19),i=n(56),l=n(42),d=n(26).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(e){var t,n=c(this),o=i(e);do{if(t=d(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(117),c=n(19),i=n(56),l=n(42),d=n(26).f;r&&o({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(e){var t,n=c(this),o=i(e);do{if(t=d(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(67).onFreeze,c=n(96),i=n(6),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!c},{preventExtensions:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(11),a=n(67).onFreeze,c=n(96),i=n(6),l=Object.seal;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!c},{seal:function(e){return l&&r(e)?l(a(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(62)})},function(e,t,n){"use strict";var o=n(135),r=n(24),a=n(365);o||r(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,n){"use strict";var o=n(135),r=n(74);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(199).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(198);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";n(369),n(375),n(376),n(377),n(378),n(379)},function(e,t,n){"use strict";var o,r,a,c=n(4),i=n(34),l=n(76),d=n(5),u=n(15),s=n(24),m=n(62),p=n(53),h=n(77),f=n(27),C=n(13),N=n(11),b=n(78),V=n(95),g=n(118).set,v=n(202),y=n(372),_=n(152),x=n(373),k=n(39),L=n(81),w=n(97),B=n(98),S=w.CONSTRUCTOR,I=w.REJECTION_EVENT,T=w.SUBCLASSING,A=k.getterFor("Promise"),E=k.set,M=L&&L.prototype,O=L,P=M,F=d.TypeError,R=d.document,D=d.process,j=B.f,W=j,z=!!(R&&R.createEvent&&d.dispatchEvent),U=function(e){var t;return!(!N(e)||!C(t=e.then))&&t},H=function(e,t){var n,o,r,a=t.value,c=1==t.state,i=c?e.ok:e.fail,l=e.resolve,d=e.reject,s=e.domain;try{i?(c||(2===t.rejection&&$(t),t.rejection=1),!0===i?n=a:(s&&s.enter(),n=i(a),s&&(s.exit(),r=!0)),n===e.promise?d(F("Promise-chain cycle")):(o=U(n))?u(o,n,l,d):l(n)):d(a)}catch(m){s&&!r&&s.exit(),d(m)}},G=function(e,t){e.notified||(e.notified=!0,v((function(){for(var n,o=e.reactions;n=o.get();)H(n,e);e.notified=!1,t&&!e.rejection&&Y(e)})))},K=function(e,t,n){var o,r;z?((o=R.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),d.dispatchEvent(o)):o={promise:t,reason:n},!I&&(r=d["on"+e])?r(o):"unhandledrejection"===e&&y("Unhandled promise rejection",n)},Y=function(e){u(g,d,(function(){var t,n=e.facade,o=e.value;if(q(e)&&(t=_((function(){l?D.emit("unhandledRejection",o,n):K("unhandledrejection",n,o)})),e.rejection=l||q(e)?2:1,t.error))throw t.value}))},q=function(e){return 1!==e.rejection&&!e.parent},$=function(e){u(g,d,(function(){var t=e.facade;l?D.emit("rejectionHandled",t):K("rejectionhandled",t,e.value)}))},X=function(e,t,n){return function(o){e(t,o,n)}},J=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,G(e,!0))},Q=function ee(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw F("Promise can't be resolved itself");var o=U(t);o?v((function(){var n={done:!1};try{u(o,t,X(ee,n,e),X(J,n,e))}catch(r){J(n,r,e)}})):(e.value=t,e.state=1,G(e,!1))}catch(r){J({done:!1},r,e)}}};if(S&&(P=(O=function(e){b(this,P),f(e),u(o,this);var t=A(this);try{e(X(Q,t),X(J,t))}catch(n){J(t,n)}}).prototype,(o=function(e){E(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new x,rejection:!1,state:0,value:undefined})}).prototype=s(P,"then",(function(e,t){var n=A(this),o=j(V(this,O));return n.parent=!0,o.ok=!C(e)||e,o.fail=C(t)&&t,o.domain=l?D.domain:undefined,0==n.state?n.reactions.add(o):v((function(){H(o,n)})),o.promise})),r=function(){var e=new o,t=A(e);this.promise=e,this.resolve=X(Q,t),this.reject=X(J,t)},B.f=j=function(e){return e===O||void 0===e?new r(e):W(e)},!i&&C(L)&&M!==Object.prototype)){a=M.then,T||s(M,"then",(function(e,t){var n=this;return new O((function(e,t){u(a,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete M.constructor}catch(Z){}m&&m(M,P)}c({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:O}),p(O,"Promise",!1,!0),h("Promise")},function(e,t,n){"use strict";var o=n(49),r=n(5);e.exports=/ipad|iphone|ipod/i.test(o)&&r.Pebble!==undefined},function(e,t,n){"use strict";var o=n(49);e.exports=/web0s(?!.*chrome)/i.test(o)},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=o.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var o=function(){this.head=null,this.tail=null};o.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},e.exports=o},function(e,t,n){"use strict";e.exports="object"==typeof window&&"object"!=typeof Deno},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(27),c=n(98),i=n(152),l=n(79);o({target:"Promise",stat:!0,forced:n(203)},{all:function(e){var t=this,n=c.f(t),o=n.resolve,d=n.reject,u=i((function(){var n=a(t.resolve),c=[],i=0,u=1;l(e,(function(e){var a=i++,l=!1;u++,r(n,t,e).then((function(e){l||(l=!0,c[a]=e,--u||o(c))}),d)})),--u||o(c)}));return u.error&&d(u.value),n.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(97).CONSTRUCTOR,c=n(81),i=n(29),l=n(13),d=n(24),u=c&&c.prototype;if(o({target:"Promise",proto:!0,forced:a,real:!0},{"catch":function(e){return this.then(undefined,e)}}),!r&&l(c)){var s=i("Promise").prototype["catch"];u["catch"]!==s&&d(u,"catch",s,{unsafe:!0})}},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(27),c=n(98),i=n(152),l=n(79);o({target:"Promise",stat:!0,forced:n(203)},{race:function(e){var t=this,n=c.f(t),o=n.reject,d=i((function(){var c=a(t.resolve);l(e,(function(e){r(c,t,e).then(n.resolve,o)}))}));return d.error&&o(d.value),n.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(98);o({target:"Promise",stat:!0,forced:n(97).CONSTRUCTOR},{reject:function(e){var t=a.f(this);return r(t.reject,undefined,e),t.promise}})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(34),c=n(81),i=n(97).CONSTRUCTOR,l=n(204),d=r("Promise"),u=a&&!i;o({target:"Promise",stat:!0,forced:a||i},{resolve:function(e){return l(u&&this===d?c:this,e)}})},function(e,t,n){"use strict";var o=n(4),r=n(34),a=n(81),c=n(6),i=n(29),l=n(13),d=n(95),u=n(204),s=n(24),m=a&&a.prototype;if(o({target:"Promise",proto:!0,real:!0,forced:!!a&&c((function(){m["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=d(this,i("Promise")),n=l(e);return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),!r&&l(a)){var p=i("Promise").prototype["finally"];m["finally"]!==p&&s(m,"finally",p,{unsafe:!0})}},function(e,t,n){"use strict";var o=n(4),r=n(47),a=n(27),c=n(9);o({target:"Reflect",stat:!0,forced:!n(6)((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return r(a(e),t,c(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(47),c=n(194),i=n(145),l=n(9),d=n(11),u=n(52),s=n(6),m=r("Reflect","construct"),p=Object.prototype,h=[].push,f=s((function(){function e(){}return!(m((function(){}),[],e)instanceof e)})),C=!s((function(){m((function(){}))})),N=f||C;o({target:"Reflect",stat:!0,forced:N,sham:N},{construct:function(e,t){i(e),l(t);var n=arguments.length<3?e:i(arguments[2]);if(C&&!f)return m(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return a(h,o,t),new(a(c,e,o))}var r=n.prototype,s=u(d(r)?r:p),N=a(e,s,t);return d(N)?N:s}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(9),c=n(56),i=n(17);o({target:"Reflect",stat:!0,forced:n(6)((function(){Reflect.defineProperty(i.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){a(e);var o=c(t);a(n);try{return i.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(26).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=a(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(11),c=n(9),i=n(205),l=n(26),d=n(42);o({target:"Reflect",stat:!0},{get:function u(e,t){var n,o,s=arguments.length<3?e:arguments[2];return c(e)===s?e[t]:(n=l.f(e,t))?i(n)?n.value:n.get===undefined?undefined:r(n.get,s):a(o=d(e))?u(o,t,s):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(8),a=n(9),c=n(26);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return c.f(a(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(42);o({target:"Reflect",stat:!0,sham:!n(142)},{getPrototypeOf:function(e){return a(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(113);o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),a(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(133)})},function(e,t,n){"use strict";var o=n(4),r=n(29),a=n(9);o({target:"Reflect",stat:!0,sham:!n(96)},{preventExtensions:function(e){a(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(15),a=n(9),c=n(11),i=n(205),l=n(6),d=n(17),u=n(26),s=n(42),m=n(64);o({target:"Reflect",stat:!0,forced:l((function(){var e=function(){},t=d.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}))},{set:function p(e,t,n){var o,l,h,f=arguments.length<4?e:arguments[3],C=u.f(a(e),t);if(!C){if(c(l=s(e)))return p(l,t,n,f);C=m(0)}if(i(C)){if(!1===C.writable||!c(f))return!1;if(o=u.f(f,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,d.f(f,t,o)}else d.f(f,t,m(0,n))}else{if((h=C.set)===undefined)return!1;r(h,f,n)}return!0}})},function(e,t,n){"use strict";var o=n(4),r=n(9),a=n(188),c=n(62);c&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),a(t);try{return c(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(8),r=n(5),a=n(7),c=n(89),i=n(114),l=n(50),d=n(58).f,u=n(46),s=n(153),m=n(20),p=n(206),h=n(155),f=n(395),C=n(24),N=n(6),b=n(18),V=n(39).enforce,g=n(77),v=n(16),y=n(207),_=n(208),x=v("match"),k=r.RegExp,L=k.prototype,w=r.SyntaxError,B=a(L.exec),S=a("".charAt),I=a("".replace),T=a("".indexOf),A=a("".slice),E=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,M=/a/g,O=/a/g,P=new k(M)!==M,F=h.MISSED_STICKY,R=h.UNSUPPORTED_Y,D=o&&(!P||F||y||_||N((function(){return O[x]=!1,k(M)!=M||k(O)==O||"/a/i"!=k(M,"i")})));if(c("RegExp",D)){for(var j=function(e,t){var n,o,r,a,c,d,h=u(L,this),f=s(e),C=t===undefined,N=[],g=e;if(!h&&f&&C&&e.constructor===j)return e;if((f||u(L,e))&&(e=e.source,C&&(t=p(g))),e=e===undefined?"":m(e),t=t===undefined?"":m(t),g=e,y&&"dotAll"in M&&(o=!!t&&T(t,"s")>-1)&&(t=I(t,/s/g,"")),n=t,F&&"sticky"in M&&(r=!!t&&T(t,"y")>-1)&&R&&(t=I(t,/y/g,"")),_&&(e=(a=function(e){for(var t,n=e.length,o=0,r="",a=[],c={},i=!1,l=!1,d=0,u="";o<=n;o++){if("\\"===(t=S(e,o)))t+=S(e,++o);else if("]"===t)i=!1;else if(!i)switch(!0){case"["===t:i=!0;break;case"("===t:B(E,A(e,o+1))&&(o+=2,l=!0),r+=t,d++;continue;case">"===t&&l:if(""===u||b(c,u))throw new w("Invalid capture group name");c[u]=!0,a[a.length]=[u,d],l=!1,u="";continue}l?u+=t:r+=t}return[r,a]}(e))[0],N=a[1]),c=i(k(e,t),h?this:L,j),(o||r||N.length)&&(d=V(c),o&&(d.dotAll=!0,d.raw=j(function(e){for(var t,n=e.length,o=0,r="",a=!1;o<=n;o++)"\\"!==(t=S(e,o))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),r+=t):r+="[\\s\\S]":r+=t+S(e,++o);return r}(e),n)),r&&(d.sticky=!0),N.length&&(d.groups=N)),e!==g)try{l(c,"source",""===g?"(?:)":g)}catch(v){}return c},W=d(k),z=0;W.length>z;)f(j,k,W[z++]);L.constructor=j,j.prototype=L,C(r,"RegExp",j,{constructor:!0})}g("RegExp")},function(e,t,n){"use strict";var o=n(17).f;e.exports=function(e,t,n){n in e||o(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},function(e,t,n){"use strict";var o=n(8),r=n(397),a=n(154),c=n(6),i=RegExp.prototype;o&&c((function(){return"sy"!==Object.getOwnPropertyDescriptor(i,"flags").get.call({dotAll:!0,sticky:!0})}))&&r(i,"flags",{configurable:!0,get:a})},function(e,t,n){"use strict";var o=n(132),r=n(17);e.exports=function(e,t,n){return n.get&&o(n.get,t,{getter:!0}),n.set&&o(n.set,t,{setter:!0}),r.f(e,t,n)}},function(e,t,n){"use strict";var o=n(73).PROPER,r=n(24),a=n(9),c=n(20),i=n(6),l=n(206),d=RegExp.prototype.toString,u=i((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),s=o&&"toString"!=d.name;(u||s)&&r(RegExp.prototype,"toString",(function(){var e=a(this);return"/"+c(e.source)+"/"+c(l(e))}),{unsafe:!0})},function(e,t,n){"use strict";n(400)},function(e,t,n){"use strict";n(112)("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(195))},function(e,t,n){"use strict";var o=n(4),r=n(156).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),a=n(7),c=n(26).f,i=n(41),l=n(20),d=n(157),u=n(32),s=n(158),m=n(34),p=a("".endsWith),h=a("".slice),f=Math.min,C=s("endsWith");r({target:"String",proto:!0,forced:!!(m||C||(o=c(String.prototype,"endsWith"),!o||o.writable))&&!C},{endsWith:function(e){var t=l(u(this));d(e);var n=arguments.length>1?arguments[1]:undefined,o=t.length,r=n===undefined?o:f(i(n),o),a=l(e);return p?p(t,a,r):h(t,r-a.length,r)===a}})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(7),c=n(51),i=r.RangeError,l=String.fromCharCode,d=String.fromCodePoint,u=a([].join);o({target:"String",stat:!0,arity:1,forced:!!d&&1!=d.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,r=0;o>r;){if(t=+arguments[r++],c(t,1114111)!==t)throw i(t+" is not a valid code point");n[r]=t<65536?l(t):l(55296+((t-=65536)>>10),t%1024+56320)}return u(n,"")}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(157),c=n(32),i=n(20),l=n(158),d=r("".indexOf);o({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~d(i(c(this)),i(a(e)),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(156).charAt,r=n(20),a=n(39),c=n(141),i=a.set,l=a.getterFor("String Iterator");c(String,"String",(function(e){i(this,{type:"String Iterator",string:r(e),index:0})}),(function(){var e,t=l(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(15),r=n(120),a=n(9),c=n(41),i=n(20),l=n(32),d=n(65),u=n(159),s=n(121);r("match",(function(e,t,n){return[function(t){var n=l(this),r=t==undefined?undefined:d(t,e);return r?o(r,t,n):new RegExp(t)[e](i(n))},function(e){var o=a(this),r=i(e),l=n(t,o,r);if(l.done)return l.value;if(!o.global)return s(o,r);var d=o.unicode;o.lastIndex=0;for(var m,p=[],h=0;null!==(m=s(o,r));){var f=i(m[0]);p[h]=f,""===f&&(o.lastIndex=u(r,c(o.lastIndex),d)),h++}return 0===h?null:p}]}))},function(e,t,n){"use strict";var o=n(4),r=n(146).end;o({target:"String",proto:!0,forced:n(210)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(146).start;o({target:"String",proto:!0,forced:n(210)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(31),c=n(19),i=n(20),l=n(23),d=r([].push),u=r([].join);o({target:"String",stat:!0},{raw:function(e){for(var t=a(c(e).raw),n=l(t),o=arguments.length,r=[],s=0;n>s;){if(d(r,i(t[s++])),s===n)return u(r,"");s=I&&(S+=x(i,I,E)+R,I=E+A.length)}return S+x(i,I)}]}),!!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}))||!k||L)},function(e,t,n){"use strict";var o=n(7),r=n(19),a=Math.floor,c=o("".charAt),i=o("".replace),l=o("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,o,s,m){var p=n+e.length,h=o.length,f=u;return s!==undefined&&(s=r(s),f=d),i(m,f,(function(r,i){var d;switch(c(i,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,p);case"<":d=s[l(i,1,-1)];break;default:var u=+i;if(0===u)return r;if(u>h){var m=a(u/10);return 0===m?r:m<=h?o[m-1]===undefined?c(i,1):o[m-1]+c(i,1):r}d=o[u-1]}return d===undefined?"":d}))}},function(e,t,n){"use strict";var o=n(15),r=n(120),a=n(9),c=n(32),i=n(200),l=n(20),d=n(65),u=n(121);r("search",(function(e,t,n){return[function(t){var n=c(this),r=t==undefined?undefined:d(t,e);return r?o(r,t,n):new RegExp(t)[e](l(n))},function(e){var o=a(this),r=l(e),c=n(t,o,r);if(c.done)return c.value;var d=o.lastIndex;i(d,0)||(o.lastIndex=0);var s=u(o,r);return i(o.lastIndex,d)||(o.lastIndex=d),null===s?-1:s.index}]}))},function(e,t,n){"use strict";var o=n(47),r=n(15),a=n(7),c=n(120),i=n(153),l=n(9),d=n(32),u=n(95),s=n(159),m=n(41),p=n(20),h=n(65),f=n(106),C=n(121),N=n(119),b=n(155),V=n(6),g=b.UNSUPPORTED_Y,v=Math.min,y=[].push,_=a(/./.exec),x=a(y),k=a("".slice);c("split",(function(e,t,n){var a;return a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var a=p(d(this)),c=n===undefined?4294967295:n>>>0;if(0===c)return[];if(e===undefined)return[a];if(!i(e))return r(t,a,e,c);for(var l,u,s,m=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),C=0,b=new RegExp(e.source,h+"g");(l=r(N,b,a))&&!((u=b.lastIndex)>C&&(x(m,k(a,C,l.index)),l.length>1&&l.index=c));)b.lastIndex===l.index&&b.lastIndex++;return C===a.length?!s&&_(b,"")||x(m,""):x(m,k(a,C)),m.length>c?f(m,0,c):m}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:r(t,this,e,n)}:t,[function(t,n){var o=d(this),c=t==undefined?undefined:h(t,e);return c?r(c,t,o,n):r(a,p(o),t,n)},function(e,o){var r=l(this),c=p(e),i=n(a,r,c,o,a!==t);if(i.done)return i.value;var d=u(r,RegExp),h=r.unicode,f=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(g?"g":"y"),N=new d(g?"^(?:"+r.source+")":r,f),b=o===undefined?4294967295:o>>>0;if(0===b)return[];if(0===c.length)return null===C(N,c)?[c]:[];for(var V=0,y=0,_=[];y1?arguments[1]:undefined,t.length)),o=l(e);return p?p(t,o,n):h(t,n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(80).trim;o({target:"String",proto:!0,forced:n(160)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";n(418);var o=n(4),r=n(211);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(e,t,n){"use strict";var o=n(4),r=n(211);o({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(e,t,n){"use strict";n(420);var o=n(4),r=n(212);o({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(e,t,n){"use strict";var o=n(4),r=n(212);o({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(36);o({target:"String",proto:!0,forced:n(37)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(55)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(5),r=n(40),a=o.RangeError;e.exports=function(e){var t=r(e);if(t<0)throw a("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(55)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(55)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(55)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(7),r=n(14),a=o(n(183)),c=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(e,t){return a(c(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).every,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(15),a=n(138),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return r(a,c(this),e,t>1?arguments[1]:undefined,t>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).filter,a=n(448),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("filter",(function(e){var t=r(c(this),e,arguments.length>1?arguments[1]:undefined);return a(this,t)}))},function(e,t,n){"use strict";var o=n(449),r=n(122);e.exports=function(e,t){return o(r(e),t)}},function(e,t,n){"use strict";var o=n(23);e.exports=function(e,t){for(var n=0,r=o(t),a=new e(r);r>n;)a[n]=t[n++];return a}},function(e,t,n){"use strict";var o=n(14),r=n(25).find,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).findIndex,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(25).forEach,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(161);(0,n(14).exportTypedArrayStaticMethod)("from",n(214),o)},function(e,t,n){"use strict";var o=n(14),r=n(88).includes,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(88).indexOf,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(5),r=n(6),a=n(7),c=n(14),i=n(186),l=n(16)("iterator"),d=o.Uint8Array,u=a(i.values),s=a(i.keys),m=a(i.entries),p=c.aTypedArray,h=c.exportTypedArrayMethod,f=d&&d.prototype,C=!r((function(){f[l].call([1])})),N=!!f&&f.values&&f[l]===f.values&&"values"===f.values.name,b=function(){return u(p(this))};h("entries",(function(){return m(p(this))}),C),h("keys",(function(){return s(p(this))}),C),h("values",b,C||!N,{name:"values"}),h(l,b,C||!N,{name:"values"})},function(e,t,n){"use strict";var o=n(14),r=n(7),a=o.aTypedArray,c=o.exportTypedArrayMethod,i=r([].join);c("join",(function(e){return i(a(this),e)}))},function(e,t,n){"use strict";var o=n(14),r=n(47),a=n(189),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return r(a,c(this),t>1?[e,arguments[1]]:[e])}))},function(e,t,n){"use strict";var o=n(14),r=n(25).map,a=n(122),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("map",(function(e){return r(c(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(a(e))(t)}))}))},function(e,t,n){"use strict";var o=n(14),r=n(161),a=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(a(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(14),r=n(109).left,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return r(a(this),e,t,t>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=n(109).right,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return r(a(this),e,t,t>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(14),r=o.aTypedArray,a=o.exportTypedArrayMethod,c=Math.floor;a("reverse",(function(){for(var e,t=r(this).length,n=c(t/2),o=0;o1?arguments[1]:undefined,1),n=l(e);if(C)return r(p,this,n,t);var o=this.length,a=c(n),d=0;if(a+t>o)throw u("Wrong length");for(;da;)d[a]=n[a++];return d}),a((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(14),r=n(25).some,a=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(5),r=n(7),a=n(6),c=n(27),i=n(190),l=n(14),d=n(191),u=n(192),s=n(57),m=n(143),p=l.aTypedArray,h=l.exportTypedArrayMethod,f=o.Uint16Array,C=f&&r(f.prototype.sort),N=!(!C||a((function(){C(new f(2),null)}))&&a((function(){C(new f(2),{})}))),b=!!C&&!a((function(){if(s)return s<74;if(d)return d<67;if(u)return!0;if(m)return m<602;var e,t,n=new f(516),o=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,o[e]=e-2*t+3;for(C(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==o[e])return!0}));h("sort",(function(e){return e!==undefined&&c(e),b?C(this,e):i(p(this),function(e){return function(t,n){return e!==undefined?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!b||N)},function(e,t,n){"use strict";var o=n(14),r=n(41),a=n(51),c=n(122),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=i(this),o=n.length,l=a(e,o);return new(c(n))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:a(t,o))-l))}))},function(e,t,n){"use strict";var o=n(5),r=n(47),a=n(14),c=n(6),i=n(66),l=o.Int8Array,d=a.aTypedArray,u=a.exportTypedArrayMethod,s=[].toLocaleString,m=!!l&&c((function(){s.call(new l(1))}));u("toLocaleString",(function(){return r(s,m?i(d(this)):d(this),i(arguments))}),c((function(){return[1,2].toLocaleString()!=new l([1,2]).toLocaleString()}))||!c((function(){l.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(14).exportTypedArrayMethod,r=n(6),a=n(5),c=n(7),i=a.Uint8Array,l=i&&i.prototype||{},d=[].toString,u=c([].join);r((function(){d.call({})}))&&(d=function(){return u(this)});var s=l.toString!=d;o("toString",d,s)},function(e,t,n){"use strict";n(472)},function(e,t,n){"use strict";var o,r=n(5),a=n(7),c=n(111),i=n(67),l=n(112),d=n(215),u=n(11),s=n(113),m=n(39).enforce,p=n(176),h=!r.ActiveXObject&&"ActiveXObject"in r,f=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},C=l("WeakMap",f,d);if(p&&h){o=d.getConstructor(f,"WeakMap",!0),i.enable();var N=C.prototype,b=a(N["delete"]),V=a(N.has),g=a(N.get),v=a(N.set);c(N,{"delete":function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),b(this,e)||t.frozen["delete"](e)}return b(this,e)},has:function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),V(this,e)||t.frozen.has(e)}return V(this,e)},get:function(e){if(u(e)&&!s(e)){var t=m(this);return t.frozen||(t.frozen=new o),V(this,e)?g(this,e):t.frozen.get(e)}return g(this,e)},set:function(e,t){if(u(e)&&!s(e)){var n=m(this);n.frozen||(n.frozen=new o),V(this,e)?v(this,e,t):n.frozen.set(e,t)}else v(this,e,t);return this}})}},function(e,t,n){"use strict";n(474)},function(e,t,n){"use strict";n(112)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(215))},function(e,t,n){"use strict";n(476),n(477)},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(118).clear;o({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==a},{clearImmediate:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(118).set;o({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==a},{setImmediate:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(202),c=n(27),i=n(151),l=n(76),d=r.process;o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){i(arguments.length,1),c(e);var t=l&&d.domain;a(t?t.bind(e):e)}})},function(e,t,n){"use strict";n(480),n(481)},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(216).setInterval;o({global:!0,bind:!0,forced:r.setInterval!==a},{setInterval:a})},function(e,t,n){"use strict";var o=n(4),r=n(5),a=n(216).setTimeout;o({global:!0,bind:!0,forced:r.setTimeout!==a},{setTimeout:a})},function(e,t,n){"use strict";(function(e){ /*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var a,c=n.document,i=c.createElement("link");if(t)a=t;else{var l=(c.body||c.getElementsByTagName("head")[0]).childNodes;a=l[l.length-1]}var d=c.styleSheets;if(r)for(var u in r)r.hasOwnProperty(u)&&i.setAttribute(u,r[u]);i.rel="stylesheet",i.href=e,i.media="only x",function p(e){if(c.body)return e();setTimeout((function(){p(e)}))}((function(){a.parentNode.insertBefore(i,t?a:a.nextSibling)}));var s=function h(e){for(var t=i.href,n=d.length;n--;)if(d[n].href===t)return e();setTimeout((function(){h(e)}))};function m(){i.addEventListener&&i.removeEventListener("load",m),i.media=o||"all"}return i.addEventListener&&i.addEventListener("load",m),i.onloadcssdefined=s,s(m),i}}).call(this,n(171))},function(e,t,n){"use strict";var o=function(e){var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(L){i=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var r=t&&t.prototype instanceof s?t:s,a=Object.create(r.prototype),c=new _(o||[]);return a._invoke=function(e,t,n){var o="suspendedStart";return function(r,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw a;return k()}for(n.method=r,n.arg=a;;){var c=n.delegate;if(c){var i=g(c,n);if(i){if(i===u)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=d(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}(e,n,c),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(L){return{type:"throw",arg:L}}}e.wrap=l;var u={};function s(){}function m(){}function p(){}var h={};i(h,r,(function(){return this}));var f=Object.getPrototypeOf,C=f&&f(f(x([])));C&&C!==t&&n.call(C,r)&&(h=C);var N=p.prototype=s.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){i(e,t,(function(e){return this._invoke(t,e)}))}))}function V(e,t){var o;this._invoke=function(r,a){function c(){return new t((function(o,c){!function i(o,r,a,c){var l=d(e[o],e,r);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){i("next",e,a,c)}),(function(e){i("throw",e,a,c)})):t.resolve(s).then((function(e){u.value=e,a(u)}),(function(e){return i("throw",e,a,c)}))}c(l.arg)}(r,a,o,c)}))}return o=o?o.then(c,c):c()}}function g(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,u;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function x(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o=0;--r){var a=this.tryEntries[r],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var i=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(i&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),y(n),u}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;y(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=o}catch(r){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";t.__esModule=!0,t.vecSubtract=t.vecScale=t.vecNormalize=t.vecMultiply=t.vecLength=t.vecInverse=t.vecDivide=t.vecCreate=t.vecAdd=void 0;var o=n(30);t.vecCreate=function(){for(var e=arguments.length,t=new Array(e),n=0;n3?i(c):null,V=String(c.key),g=String(c.char),v=c.location,y=c.keyCode||(c.keyCode=V)&&V.charCodeAt(0)||0,_=c.charCode||(c.charCode=g)&&g.charCodeAt(0)||0,x=c.bubbles,k=c.cancelable,L=c.repeat,w=c.locale,B=c.view||e;if(c.which||(c.which=c.keyCode),"initKeyEvent"in m)m.initKeyEvent(t,x,k,B,p,f,h,C,y,_);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,a){o=a,n=!1,e=undefined,t.dispatchEvent(r)}function a(e){this.value=e}function i(){t++,this.__ce__=new c("@DOMMap:"+t+Math.random())}return a.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},i.prototype={constructor:i,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new a(t),!1),this}},i}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,a,c=e.CustomEvent,i=e.dispatchEvent,l=e.addEventListener,d=e.removeEventListener,u=0,s=function(){u++},m=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},p=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",s,{once:!0}),i(new c("_")),i(new c("_")),d("_",s,{once:!0})}catch(h){}1!==u&&(a=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,c){if(c&&"boolean"!=typeof c){var i,l,d,u=a.get(this),s=p(c);u||a.set(this,u=new n),t in u||(u[t]={handler:[],wrap:[]}),l=u[t],(i=m.call(l.handler,r))<0?(i=l.handler.push(r)-1,l.wrap[i]=d=new n):d=l.wrap[i],s in d||(d[s]=o(t,r,c),e.call(this,t,d[s],d[s].capture))}else e.call(this,t,r,c)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,c,i,l,d=a.get(this);if(d&&t in d&&(i=d[t],-1<(c=m.call(i.handler,n))&&(r=p(o))in(l=i.wrap[c]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;i.handler.splice(c,1),i.wrap.splice(c,1),0===i.handler.length&&delete d[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict";!function(t,n){var o,r,a=t.html5||{},c=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,i=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,l=0,d={};function u(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function s(e){var t=d[e._html5shiv];return t||(t={},l++,e._html5shiv=l,d[l]=t),t}function m(e,t,o){return t||(t=n),r?t.createElement(e):(o||(o=s(t)),!(a=o.cache[e]?o.cache[e].cloneNode():i.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren||c.test(e)||a.tagUrn?a:o.frag.appendChild(a));var a}function p(e){e||(e=n);var t=s(e);return!h.shivCSS||o||t.hasCSS||(t.hasCSS=!!function(e,t){var n=e.createElement("p"),o=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",o.insertBefore(n.lastChild,o.firstChild)}(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?m(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+u().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,t),e}!function(){try{var e=n.createElement("a");e.innerHTML="",o="hidden"in e,r=1==e.childNodes.length||function(){n.createElement("a");var e=n.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(t){o=!0,r=!0}}();var h={elements:a.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==a.shivCSS,supportsUnknownElements:r,shivMethods:!1!==a.shivMethods,type:"default",shivDocument:p,createElement:m,createDocumentFragment:function(e,t){if(e||(e=n),r)return e.createDocumentFragment();for(var o=(t=t||s(e)).frag.cloneNode(),a=0,c=u(),i=c.length;a1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(10),a=n(510),c=n(33),i=n(82),l=n(22),d=["params"],u=["params"],s=["parent","params"];function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=(0,i.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(10),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(10),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(10),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this,t=this.props.value,n=this.inputRef.current;n&&(n.value=u(t),n.selectionStart=0,n.selectionEnd=n.value.length),(this.props.autoFocus||this.props.autoSelect)&&setTimeout((function(){n.focus(),e.props.autoSelect&&n.select()}),1)},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,y=e.fillValue,_=e.color,x=e.ranges,k=void 0===x?{}:x,L=e.size,w=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=y?y:c,m,s),h=(0,r.scale)(c,m,s),f=_||(0,r.keyOfMatchingRange)(null!=y?y:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,w&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((w?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(38),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(44),i=n(225);function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},u=function(e){var t,n;function c(t){var n;n=e.call(this,t)||this;window.innerWidth,window.innerHeight;return n.state={offsetX:128,offsetY:48,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),d(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),d(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),d(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=1.5*(n-e.zoom);return e.zoom=n,e.offsetX=e.offsetX-262*r,e.offsetY=e.offsetY-256*r,t.onZoom&&t.onZoom(e.zoom),e}))},n}return n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),c.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,m=e.map+"_nanomap_z1.png",p=510*d+"px",h={width:p,height:p,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:h,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:m,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,s,{zoom:d,onZoom:this.handleZoom})]})},c}(o.Component);t.NanoMap=u;u.Marker=function(e,t){var n=e.x,a=e.y,c=e.zoom,i=void 0===c?1:c,l=e.icon,d=e.tooltip,u=e.color,s=2*n*i-i-3,m=2*a*i-i-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",children:[(0,o.createComponentVNode)(2,r.Icon,{name:l,color:u,fontSize:"6px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:d})]}),2)};var s=function(e,t){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:1,maxValue:8,stepPixelSize:10,format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};u.Zoomer=s},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(10),a=n(22),c=n(221),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(10),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(12),a=n(10),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,y=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(10),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(10),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":526,"./AIFixer.js":527,"./APC.js":528,"./ATM.js":529,"./AccountsUplinkTerminal.js":530,"./AiAirlock.js":531,"./AirAlarm.js":532,"./AirlockAccessController.js":533,"./AirlockElectronics.js":534,"./AppearanceChanger.js":535,"./AtmosAlertConsole.js":536,"./AtmosControl.js":537,"./AtmosFilter.js":538,"./AtmosMixer.js":539,"./AtmosPump.js":540,"./AtmosTankControl.js":541,"./Autolathe.js":542,"./Biogenerator.js":543,"./BlueSpaceArtilleryControl.js":546,"./BluespaceTap.js":547,"./BodyScanner.js":548,"./BookBinder.js":549,"./BotClean.js":550,"./BotFloor.js":551,"./BotHonk.js":552,"./BotMed.js":553,"./BotSecurity.js":554,"./BrigCells.js":555,"./BrigTimer.js":556,"./CameraConsole.js":557,"./Canister.js":558,"./CardComputer.js":559,"./CargoConsole.js":560,"./ChangelogView.js":561,"./ChemDispenser.js":562,"./ChemHeater.js":563,"./ChemMaster.js":564,"./CloningConsole.js":565,"./ColourMatrixTester.js":566,"./CommunicationsComputer.js":567,"./CompostBin.js":568,"./Contractor.js":569,"./ConveyorSwitch.js":570,"./CrewMonitor.js":571,"./Cryo.js":572,"./CryopodConsole.js":573,"./DNAModifier.js":574,"./DestinationTagger.js":575,"./DisposalBin.js":576,"./DnaVault.js":577,"./DroneConsole.js":578,"./EFTPOS.js":579,"./ERTManager.js":580,"./EconomyManager.js":581,"./Electropack.js":582,"./EvolutionMenu.js":583,"./ExosuitFabricator.js":584,"./ExternalAirlockController.js":585,"./FaxMachine.js":586,"./FilingCabinet.js":587,"./FloorPainter.js":588,"./GPS.js":589,"./GeneModder.js":590,"./GenericCrewManifest.js":591,"./GhostHudPanel.js":592,"./GlandDispenser.js":593,"./GravityGen.js":594,"./GuestPass.js":595,"./HandheldChemDispenser.js":596,"./HealthSensor.js":597,"./Holodeck.js":598,"./ImplantPad.js":599,"./Instrument.js":600,"./KeycardAuth.js":601,"./KitchenMachine.js":602,"./LawManager.js":603,"./LibraryComputer.js":604,"./LibraryManager.js":605,"./ListInput.js":606,"./MODsuit.js":607,"./MagnetController.js":608,"./MechBayConsole.js":609,"./MechaControlConsole.js":610,"./MedicalRecords.js":611,"./MerchVendor.js":612,"./MiningVendor.js":613,"./NTRecruiter.js":614,"./Newscaster.js":615,"./NuclearBomb.js":616,"./OperatingComputer.js":617,"./Orbit.js":618,"./OreRedemption.js":619,"./PAI.js":620,"./PDA.js":633,"./Pacman.js":650,"./ParticleAccelerator.js":651,"./PdaPainter.js":652,"./PersonalCrafting.js":653,"./Photocopier.js":654,"./PoolController.js":655,"./PortablePump.js":656,"./PortableScrubber.js":657,"./PortableTurret.js":658,"./PowerMonitor.js":231,"./PrisonerImplantManager.js":659,"./PrisonerShuttleConsole.js":660,"./RCD.js":661,"./RPD.js":662,"./Radio.js":663,"./ReagentGrinder.js":664,"./RemoteSignaler.js":665,"./RequestConsole.js":666,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":681,"./RoboticsControlConsole.js":682,"./Safe.js":683,"./SatelliteControl.js":684,"./SecureStorage.js":685,"./SecurityRecords.js":686,"./SeedExtractor.js":687,"./ShuttleConsole.js":688,"./ShuttleManipulator.js":689,"./Sleeper.js":690,"./SlotMachine.js":691,"./Smartfridge.js":692,"./Smes.js":693,"./SolarControl.js":694,"./SpawnersMenu.js":695,"./SpecMenu.js":696,"./StationAlertConsole.js":697,"./SuitStorage.js":698,"./SupermatterMonitor.js":699,"./SyndicateComputerSimple.js":700,"./TEG.js":701,"./TachyonArray.js":702,"./Tank.js":703,"./TankDispenser.js":704,"./TcommsCore.js":705,"./TcommsRelay.js":706,"./Teleporter.js":707,"./TempGun.js":708,"./ThermoMachine.js":709,"./TransferValve.js":710,"./TurbineComputer.js":711,"./Uplink.js":712,"./Vending.js":713,"./VolumeMixer.js":714,"./VotePanel.js":715,"./Wires.js":716,"./WizardApprenticeContract.js":717};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=525},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,y=d.change_facial_hair_color,_=d.change_secondary_facial_hair_color,x=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,w=d.change_head_accessory,B=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,R=d.change_head_markings,F=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||y||_||x||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!w&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:B.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!R&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:F.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 2===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(12),i=n(43),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(48),a=n(30),c=n(1),i=n(2),l=n(3),d=n(21),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),y=v[0],_=v[1];0===y&&(y="Tools");var x=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=(0,c.useSharedState)(t,"search_text",""),B=w[0],S=w[1],I=(0,d.createSearch)(B,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(y)>-1||B)&&(m.showhacked||!e.hacked)})),B&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";B?E="Results for: '"+B+"':":y&&(E="Build ("+y+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:y,onSelected:function(e){return _(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:x}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,y);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},y=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(38);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(101);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(48),a=n(30),c=n(1),i=n(2),l=n(3),d=(n(44),n(21)),u=n(38);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),y=(v[0],v[1]),_=(0,d.createSearch)(N,(function(e){return e.name})),x=(0,c.useLocalState)(t,"selectedAccount"),k=x[0],L=(x[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(_),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),w="Crate Catalogue";return N?w="Results for '"+N+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:w,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),y(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexShrink:0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flexGrow:1,minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(28),d=["icon","imageTransform"];function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=[1,5,10];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,s=n.buffer_reagents,f=void 0===s?[]:s,C=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,m,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,p,{mode:C,bufferReagents:f}),(0,o.createComponentVNode)(2,h,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,_)]})]})};var m=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,d=e.beakerReagents,u=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"1",minHeight:"100px",buttons:u?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r=0||(r[n]=e[n]);return r}(e,d);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({style:{padding:0,"line-height":0}},c,{children:(0,o.createVNode)(1,"span",null,(0,o.createVNode)(1,"img",null,null,1,{style:{"-ms-interpolation-mode":"nearest-neighbor",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) "+(r||""),"margin-left":"1px"},src:n}),2,{style:{overflow:"hidden",display:"inline-block",width:"26px",height:"26px",position:"relative"}})})))},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.maxpills,d=i.pillamount,u=i.pillname,s=i.pillplaceholdername,m=i.pillsprite,p=i.pillstyles.map((function(e){var t=e.id,n=e.sprite;return(0,o.createComponentVNode)(2,b,{icon:n,imageTransform:"scale(2)",onClick:function(){return c("set_pills_style",{style:t})},selected:m===t},t)}));return(0,o.createComponentVNode)(2,N,{maxQuantity:l,medicineName:u,placeholderName:s,productionType:"pills",quantity:d,children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p})})},g=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.maxpatches,i=a.patchamount,l=a.patchname,d=a.patchplaceholdername;return(0,o.createComponentVNode)(2,N,{maxQuantity:c,medicineName:l,placeholderName:d,productionType:"patches",quantity:i})},v=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.bottlesprite,d=i.maxbottles,u=i.bottleamount,s=i.bottlename,m=i.bottleplaceholdername,p=i.bottlestyles.map((function(e){var t=e.id,n=e.sprite;return(0,o.createComponentVNode)(2,b,{icon:n,onClick:function(){return c("set_bottles_style",{style:t})},selected:l===t},t)}));return(0,o.createComponentVNode)(2,N,{maxQuantity:d,medicineName:s,placeholderName:m,productionType:"bottles",quantity:u,children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p})})},y=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"box",content:"Create condiment pack (10u max)",mb:"0.5rem",onClick:function(){return(0,l.modalOpen)(t,"create_condi_pack")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"wine-bottle",content:"Create bottle (50u max)",mb:"0",onClick:function(){return n("create_condi_bottle")}})],4)},_=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.loaded_pill_bottle_style,d=i.containerstyles,u=i.loaded_pill_bottle,s="20px",m="20px",p=d.map((function(e){var t=e.color,n=e.name,r=l===t;return(0,o.createComponentVNode)(2,a.Button,{style:{position:"relative",width:s,height:m},onClick:function(){return c("set_container_style",{style:t})},icon:r&&"check",iconStyle:{position:"relative","z-index":1},tooltip:n,tooltipPosition:"top",children:[!r&&(0,o.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,o.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:s,height:m,"background-color":t,opacity:.6,filter:"alpha(opacity=60)"}})]},t)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Container Customization",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,content:"Eject Container",onClick:function(){return c("ejectp")}}),children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",style:{position:"relative"},children:[(0,o.createComponentVNode)(2,a.Button,{style:{width:s,height:m},icon:"tint-slash",onClick:function(){return c("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),p]})}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})};(0,l.modalRegisterBodyOverride)("analyze",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args.analysis;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:i.condi?"Condiment Analysis":"Reagent Analysis",children:(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(43),l=n(28),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(228),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(30),a=n(21),c=n(1),i=n(2),l=n(68),d=n(43),u=n(3),s=n(38),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(21);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(44);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3),l=n(48),d=n(30);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,c.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createComponentVNode)(2,c.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return r("readapt")}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,u=n.data,s=u.evo_points,m=u.ability_tabs,p=u.purchased_abilities,h=u.view_mode,f=(0,a.useLocalState)(t,"selectedTab",m[0]),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"ability_tabs",m[0].abilities),y=v[0],_=v[1],x=function(e){if(g(e),""===e)return _(C.abilities);_(function(e,t){if(void 0===t&&(t=""),!e||0===e.length)return[];var n=(0,r.createSearch)(t,(function(e){return e.name+"|"+e.description}));return(0,l.flow)([(0,d.filter)((function(e){return null==e?void 0:e.name})),(0,d.filter)(n),(0,d.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(m.map((function(e){return e.abilities})).flat(),e))};return(0,o.createComponentVNode)(2,c.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(e,t){x(t)},value:V}),(0,o.createComponentVNode)(2,c.Button,{icon:h?"square-o":"check-square-o",selected:!h,content:"Compact",onClick:function(){return i("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,c.Button,{icon:h?"check-square-o":"square-o",selected:h,content:"Expanded",onClick:function(){return i("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,c.Tabs,{children:m.map((function(e){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:""===V&&C===e,onClick:function(){!function(e){N(e),_(e.abilities),g("")}(e)},children:e.category},e)}))}),y.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),p.includes(e.power_path)&&(0,o.createComponentVNode)(2,c.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,c.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,c.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{mr:.5,disabled:e.cost>s||p.includes(e.power_path),content:"Evolve",onClick:function(){return i("purchase",{power_path:e.power_path})}})})]}),!!h&&(0,o.createComponentVNode)(2,c.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(10),a=n(21),c=n(1),i=n(2),l=n(228),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(28),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(28),n(44));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(44),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:0,maxValue:p,value:m,stepPixelSize:59,onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:6,onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,y=u.sustainDropoffVolume,_=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:.1,maxValue:5,value:V,step:.5,stepPixelSize:85,format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:1.025,maxValue:10,value:g,step:.01,format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:2,format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:_,icon:_?"toggle-on":"toggle-off",content:_?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,y=i.zeroth_law,_=i.ion_law,x=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(38);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ListInput=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(99),d=0;t.ListInput=function(e,t){var n=(0,a.useBackend)(t),r=n.act,s=n.data,m=s.title,p=s.message,h=s.buttons,f=s.timeout,C=(0,a.useLocalState)(t,"search_bar",!0),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"displayed_array",h),g=V[0],v=V[1],y=(0,a.useLocalState)(t,"search_array",[]),_=y[0],x=y[1],k=(0,a.useLocalState)(t,"search_index",0),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"last_char_code",null),S=B[0],I=B[1],T=(0,a.useLocalState)(t,"selected_button",h[0]),A=T[0],E=T[1];return(0,o.createComponentVNode)(2,i.Window,{title:m,resizable:!0,children:[f!==undefined&&(0,o.createComponentVNode)(2,u,{value:f}),(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Layout__content--flexColumn",height:"100%",mb:"7px",children:(0,o.createComponentVNode)(2,c.Section,{className:"ListInput__Section",flexGrow:"1",scrollable:!0,fill:!0,title:p,tabIndex:1,onKeyDown:function(e){if(e.preventDefault(),!(d>performance.now())){if(d=performance.now()+125,e.keyCode===l.ARROW_KEY_UP||e.keyCode===l.ARROW_KEY_DOWN){var t=1;e.keyCode===l.ARROW_KEY_UP&&(t=-1);for(var n=0;n=h.length&&(n=0),E(h[n]),I(null),void document.getElementById(h[n]).focus()}var o=String.fromCharCode(e.keyCode).toLowerCase();if(o){var r;if(o===S&&_.length>0){var a=L+1;a<_.length?(r=_[a],w(a)):(r=_[0],w(0))}else{var c=g.filter((function(e){return e.substring(0,1).toLowerCase()===o}));c.length>0&&(x(c),w(0),r=c[0])}r&&(I(o),E(r),document.getElementById(r).focus())}}},buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"search",color:"transparent",selected:N,tooltip:"Search...",tooltipPosition:"left",onClick:function(){b(!N),v(h)},compact:!0}),children:(0,o.createComponentVNode)(2,c.Flex,{wrap:"wrap",overflowX:"hidden",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:e,id:e,width:"100%",selected:A===e,onClick:function(){A===e?r("choose",{choice:e}):E(e),I(null)}})},e)}))})})}),N&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2.5,children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",autoFocus:!0,onInput:function(e,t){return v(h.filter((function(e){return-1!==e.toLowerCase().search(t.toLowerCase())})))}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,ml:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"good",content:"Confirm",disabled:null===A,onClick:function(){return r("choose",{choice:A})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,mr:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"bad",content:"Cancel",onClick:function(){return r("cancel")}})})]})})]})})]})};var u=function(e){var t=e.value;return(0,o.createVNode)(1,"div","ListInput__Loader",(0,o.createComponentVNode)(2,c.Box,{className:"ListInput__LoaderProgress",style:{width:100*(0,r.clamp01)(t)+"%"}}),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MagnetController=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(28),d=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]);t.MagnetController=function(e,t){var n=(0,a.useBackend)(t),u=n.act,s=n.data,m=s.autolink,p=s.code,h=s.frequency,f=s.linkedMagnets,C=s.magnetConfiguration,N=s.path,b=s.pathPosition,V=s.probing,g=s.powerState,v=s.speed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!m&&(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Probe",icon:V?"spinner":"sync",iconSpin:!!V,disabled:V,onClick:function(){return u("probe_magnets")}}),title:"Magnet Linking",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,r.toFixed)(h/10,1)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:p})]})}),(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{icon:g?"power-off":"times",content:g?"On":"Off",selected:g,onClick:function(){return u("toggle_power")}}),title:"Controller Configuration",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:v.value,minValue:v.min,maxValue:v.max,onChange:function(e,t){return u("set_speed",{speed:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Path",children:[Array.from(d.entries()).map((function(e){var t=e[0],n=e[1],r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button,{icon:r,tooltip:a,onClick:function(){return u("path_add",{code:t})}},t)})),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){return u("path_clear")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){return(0,l.modalOpen)(t,"path_custom_input")}}),(0,o.createComponentVNode)(2,c.BlockQuote,{children:N.map((function(e,t){var n=d.get(e)||{icon:"question"},r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button.Confirm,{selected:t+2===b,icon:r,confirmIcon:r,confirmContent:"",tooltip:a,onClick:function(){return u("path_remove",{index:t+1,code:e})}},t)}))})]})]})}),f.map((function(e,t){var n=e.uid,r=e.powerState,a=e.electricityLevel,i=e.magneticField;return(0,o.createComponentVNode)(2,c.Section,{title:"Magnet #"+(t+1)+" Configuration",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:r?"power-off":"times",content:r?"On":"Off",selected:r,onClick:function(){return u("toggle_magnet_power",{id:n})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Move Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:a,minValue:C.electricityLevel.min,maxValue:C.electricityLevel.max,onChange:function(e,t){return u("set_electricity_level",{id:n,electricityLevel:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Field Size",children:(0,o.createComponentVNode)(2,c.Slider,{value:i,minValue:C.magneticField.min,maxValue:C.magneticField.max,onChange:function(e,t){return u("set_magnetic_field",{id:n,magneticField:t})}})})]})},n)}))]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(12),n(1)),a=n(2),c=n(3),i=n(21);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(28),l=n(38),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,y)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,_,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,_,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,_,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,_,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,_,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},_=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(38),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,y=m.channels,_=m.channel_idx,x=void 0===_?-1:_,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"viewingPhoto",""),S=B[0],I=(B[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=y.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return w(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:y.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&y[x-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),y=v[0],_=v[1],x=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=x[0],L=x[1],w=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),B=w[0],S=w[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:y,width:"35%",mr:"0.5rem",onInput:function(e,t){return _(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:y,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:B,icon:B?"lock":"lock-open",content:B?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!B)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:y,"public":k?1:0,admin_locked:B?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",y),(0,d.modalRegisterBodyOverride)("manage_channel",y),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],y=V[1],_=(0,a.useLocalState)(t,"title",""),x=_[0],k=_[1],L=(0,a.useLocalState)(t,"body",""),w=L[0],B=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return y(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:x,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:w,onInput:function(e,t){return B(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:x,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),w.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===x.trim().length||0===w.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:x.substr(0,127),body:w.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],y=V[1],_=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),x=_[0],k=_[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return y(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"lock":"lock-open",content:x?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!x)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:x?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(12),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:u,stepPixelSize:5,ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:m,stepPixelSize:5,ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,y=u.misc,_=u.npcs,x=(0,a.useLocalState)(t,"searchText",""),k=x[0],L=x[1],w={},B=l(N);!(n=B()).done;){var S=n.value;w[S.antag]===undefined&&(w[S.antag]=[]),w[S.antag].push(S)}var I=Object.entries(w);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,_,y];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:_,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:y,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(38),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(621);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":622,"./pai_bioscan.js":623,"./pai_directives.js":624,"./pai_doorjack.js":625,"./pai_main_menu.js":626,"./pai_manifest.js":627,"./pai_medrecords.js":628,"./pai_messenger.js":629,"./pai_radio.js":630,"./pai_secrecords.js":631,"./pai_signaler.js":632};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=621},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(229);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=i.speech_verbs,f=i.current_speech_verb,C=i.available_chassises,N=i.current_chassis,b=[];return d.map((function(e){return b[e.key]=e.name})),u.map((function(e){return b[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!b[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!b[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Speaking State",children:h.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.name===f,onClick:function(){return c("setSpeechStyle",{speech_state:e.name})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Chassis Type",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.icon===N,onClick:function(){return c("setChassis",{chassis_to_change:e.icon})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(230);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(12),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(634);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":635,"./pda_janitor.js":636,"./pda_main_menu.js":637,"./pda_manifest.js":638,"./pda_medical.js":639,"./pda_messenger.js":230,"./pda_mob_hunt.js":640,"./pda_mule.js":641,"./pda_nanobank.js":642,"./pda_notes.js":643,"./pda_power.js":644,"./pda_secbot.js":645,"./pda_security.js":646,"./pda_signaler.js":647,"./pda_status_display.js":648,"./pda_supplyrecords.js":649};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=634},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(229);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(12),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],y=[];return s.map((function(e){return y[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(y[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,y=d.output_max,_=d.power_gen,x=d.output_set,k=d.has_fuel,L=C/N,w=V/g,B=x*_,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:x,minValue:1,maxValue:y*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:w,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){return c("ai_text")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){return c("ai_pic")}})],4)],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(232),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onEnter:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(21),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(10),a=n(1),c=n(2),i=n(3),l=n(68),d=n(99);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38),l=n(3),d=n(28),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(44);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,y=(u>=100?"good":p&&"average")||"bad",_=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.helmet,u=i.suit,s=i.magboots,m=i.mask,p=i.storage,h=i.open,f=i.locked;return(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return c("cook")}}),(0,o.createComponentVNode)(2,a.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return c("toggle_lock")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:d,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:s,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.object),l=e.label,d=e.missingText,u=e.eject;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,a.Box,{my:.5,children:i?(0,o.createComponentVNode)(2,a.Button,{my:-1,icon:"eject",content:i,onClick:function(){return c(u)}}):(0,o.createComponentVNode)(2,a.Box,{color:"silver",bold:!0,children:["No ",d," found."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.open,d=i.locked;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:l?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:l?"times-circle":"expand",color:l?"red":"green",disabled:d,textAlign:"center",onClick:function(){return c("toggle_open")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(30),a=n(48),c=n(12),i=n(1),l=n(2),d=n(43),u=n(3);n(68);t.SupermatterMonitor=function(e,t){var n=(0,i.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p)};var s=function(e){return Math.log2(16+Math.max(0,e))-4},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.supermatters,c=void 0===a?[]:a;return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Detected Supermatters",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"sync",content:"Refresh",onClick:function(){return r("refresh")}}),children:(0,o.createComponentVNode)(2,l.Table,{children:c.map((function(e){return(0,o.createComponentVNode)(2,l.Table.Row,{children:[(0,o.createComponentVNode)(2,l.Table.Cell,{children:e.supermatter_id+". "+e.area_name}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,color:"label",children:"Integrity:"}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,width:"120px",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:e.integrity/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.Table.Cell,{collapsing:!0,children:(0,o.createComponentVNode)(2,l.Button,{content:"Details",onClick:function(){return r("view",{view:e.supermatter_id})}})})]},e.supermatter_id)}))})})})})},p=function(e,t){var n=(0,i.useBackend)(t),m=n.act,p=n.data,h=(p.active,p.SM_integrity),f=p.SM_power,C=p.SM_ambienttemp,N=p.SM_ambientpressure,b=(0,a.flow)([function(e){return e.filter((function(e){return e.amount>=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(44),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(223);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(12);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(30),a=n(48),c=n(21),i=n(1),l=n(2),d=n(38),u=n(3),s=n(28),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},y=(0,i.useLocalState)(t,"showDesc",1),_=y[0],x=y[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:_,onClick:function(){return x(!_)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:_},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e){return c[e.cat].items[e.item]})).filter((function(e){return e!==undefined&&null!==e})).map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:e})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(10),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,y=u.speaker,_=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:y?"check":"volume-mute",selected:y,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:_[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,o.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("fire")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,o.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("translocation")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,o.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("restoration")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,o.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Instant Summons, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("stealth")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,o.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping. ",(0,o.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("honk")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file +if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),a=Object.defineProperty||function(e,t,n){e[t]=n.value},c=Object.defineProperties||function(t,n){for(var o in n)if(l.call(n,o))try{a(t,o,n[o])}catch(r){e.console}},i=Object.getOwnPropertyDescriptor,l=Object.prototype.hasOwnProperty,d=e.Element.prototype,u=e.Text.prototype,s=/^[a-z]+$/,m=/loaded|complete/,p={},h=document.createElement("div"),f=document.documentElement,C=f.removeAttribute,N=f.setAttribute,b=function(e){return{enumerable:!0,writable:!0,configurable:!0,value:e}};_(e.HTMLCommentElement.prototype,d,"nodeValue"),_(e.HTMLScriptElement.prototype,null,"text"),_(u,null,"nodeValue"),_(e.HTMLTitleElement.prototype,null,"text"),a(e.HTMLStyleElement.prototype,"textContent",(t=i(e.CSSStyleSheet.prototype,"cssText"),y((function(){return t.get.call(this.styleSheet)}),(function(e){t.set.call(this.styleSheet,e)}))));var V=/\b\s*alpha\s*\(\s*opacity\s*=\s*(\d+)\s*\)/;a(e.CSSStyleDeclaration.prototype,"opacity",{get:function(){var e=this.filter.match(V);return e?(e[1]/100).toString():""},set:function(e){this.zoom=1;var t=!1;e=e<1?" alpha(opacity="+Math.round(100*e)+")":"",this.filter=this.filter.replace(V,(function(){return t=!0,e})),!t&&e&&(this.filter+=e)}}),c(d,{textContent:{get:k,set:S},firstElementChild:{get:function(){for(var e=this.childNodes||[],t=0,n=e.length;t1?r-1:0),c=1;c1?t-1:0),o=1;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["BlockQuote",t])},n)))}},function(e,t,n){"use strict";var o,r;t.__esModule=!0,t.VNodeFlags=t.ChildFlags=void 0,t.VNodeFlags=o,function(e){e[e.HtmlElement=1]="HtmlElement",e[e.ComponentUnknown=2]="ComponentUnknown",e[e.ComponentClass=4]="ComponentClass",e[e.ComponentFunction=8]="ComponentFunction",e[e.Text=16]="Text",e[e.SvgElement=32]="SvgElement",e[e.InputElement=64]="InputElement",e[e.TextareaElement=128]="TextareaElement",e[e.SelectElement=256]="SelectElement",e[e.Void=512]="Void",e[e.Portal=1024]="Portal",e[e.ReCreate=2048]="ReCreate",e[e.ContentEditable=4096]="ContentEditable",e[e.Fragment=8192]="Fragment",e[e.InUse=16384]="InUse",e[e.ForwardRef=32768]="ForwardRef",e[e.Normalized=65536]="Normalized",e[e.ForwardRefComponent=32776]="ForwardRefComponent",e[e.FormElement=448]="FormElement",e[e.Element=481]="Element",e[e.Component=14]="Component",e[e.DOMRef=2033]="DOMRef",e[e.InUseOrNormalized=81920]="InUseOrNormalized",e[e.ClearInUse=-16385]="ClearInUse",e[e.ComponentKnown=12]="ComponentKnown"}(o||(t.VNodeFlags=o={})),t.ChildFlags=r,function(e){e[e.UnknownChildren=0]="UnknownChildren",e[e.HasInvalidChildren=1]="HasInvalidChildren",e[e.HasVNodeChildren=2]="HasVNodeChildren",e[e.HasNonKeyedChildren=4]="HasNonKeyedChildren",e[e.HasKeyedChildren=8]="HasKeyedChildren",e[e.HasTextChildren=16]="HasTextChildren",e[e.MultipleChildren=12]="MultipleChildren"}(r||(t.ChildFlags=r={}))},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=void 0;var o=n(0),r=n(10),a=n(510),c=n(33),i=n(82),l=n(22),d=["params"],u=["params"],s=["parent","params"];function m(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=(0,i.createLogger)("ByondUi"),f=[];window.addEventListener("beforeunload",(function(){for(var e=0;e=0||(r[n]=e[n]);return r}(t,l),N=this.state.viewBox,b=function(e,t,n,o){if(0===e.length)return[];var a=(0,r.zipWith)(Math.min).apply(void 0,e),c=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(a[0]=n[0],c[0]=n[1]),o!==undefined&&(a[1]=o[0],c[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,a,c,t)}))(e)}(a,N,c,d);if(b.length>0){var V=b[0],g=b[b.length-1];b.push([N[0]+f,g[1]]),b.push([N[0]+f,-f]),b.push([-f,-f]),b.push([-f,V[1]])}var v=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,c);return(0,o.createVNode)(1,"div","Collapsible",[(0,o.createVNode)(1,"div","Table",[(0,o.createVNode)(1,"div","Table__cell",(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({fluid:!0,color:d,icon:n?"chevron-down":"chevron-right",onClick:function(){return e.setState({open:!n})}},m,{children:u}))),2),s&&(0,o.createVNode)(1,"div","Table__cell Table__cell--collapsing",s,0)],0),n&&(0,o.createComponentVNode)(2,r.Box,{mt:1,children:i})],0)},l}(o.Component);t.Collapsible=l},function(e,t,n){"use strict";t.__esModule=!0,t.ColorBox=void 0;var o=n(0),r=n(10),a=n(22),c=["content","children","className","color","backgroundColor"];var i=function(e){var t=e.content,n=(e.children,e.className),i=e.color,l=e.backgroundColor,d=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return d.color=t?null:"transparent",d.backgroundColor=i||l,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,a.computeBoxClassName)(d)]),t||".",0,Object.assign({},(0,a.computeBoxProps)(d))))};t.ColorBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(10),a=n(22),c=n(165),i=["color","over","noscroll","nochevron","width","onClick","selected","disabled"],l=["className"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(t){var n;return(n=e.call(this,t)||this).state={open:!1},n.handleClick=function(){n.state.open&&n.setOpen(!1)},n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var m=s.prototype;return m.componentWillUnmount=function(){window.removeEventListener("click",this.handleClick)},m.setOpen=function(e){var t=this;this.setState({open:e}),e?(setTimeout((function(){return window.addEventListener("click",t.handleClick)})),this.menuRef.focus()):window.removeEventListener("click",this.handleClick)},m.setSelected=function(e){this.setOpen(!1),this.props.onSelected(e)},m.buildMenu=function(){var e=this,t=this.props.options,n=(void 0===t?[]:t).map((function(t){return(0,o.createVNode)(1,"div","Dropdown__menuentry",t,0,{onClick:function(){e.setSelected(t)}},t)}));return n.length?n:"No Options Found"},m.render=function(){var e=this,t=this.props,n=t.color,u=void 0===n?"default":n,s=t.over,m=t.noscroll,p=t.nochevron,h=t.width,f=(t.onClick,t.selected),C=t.disabled,N=d(t,i),b=N.className,V=d(N,l),g=s?!this.state.open:this.state.open,v=this.state.open?(0,o.createVNode)(1,"div",(0,r.classes)([m?"Dropdown__menu-noscroll":"Dropdown__menu",s&&"Dropdown__over"]),this.buildMenu(),0,{tabIndex:"-1",style:{width:h}},null,(function(t){e.menuRef=t})):null;return(0,o.createVNode)(1,"div","Dropdown",[(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({width:h,className:(0,r.classes)(["Dropdown__control","Button","Button--color--"+u,C&&"Button--disabled",b])},V,{onClick:function(){C&&!e.state.open||e.setOpen(!e.state.open)},children:[(0,o.createVNode)(1,"span","Dropdown__selected-text",f,0),!!p||(0,o.createVNode)(1,"span","Dropdown__arrow-button",(0,o.createComponentVNode)(2,c.Icon,{name:g?"chevron-up":"chevron-down"}),2)]}))),v],0)},s}(o.Component);t.Dropdown=s},function(e,t,n){"use strict";t.__esModule=!0,t.Input=void 0;var o=n(0),r=n(10),a=n(22),c=["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"],i=["className","fluid"];function l(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){return(0,r.isFalsy)(e)?"":e},s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,a=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),a&&a(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=u(t.props.value),void e.target.blur()):void 0},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var m=s.prototype;return m.componentDidMount=function(){var e=this,t=this.props.value,n=this.inputRef.current;n&&(n.value=u(t),n.selectionStart=0,n.selectionEnd=n.value.length),(this.props.autoFocus||this.props.autoSelect)&&setTimeout((function(){n.focus(),e.props.autoSelect&&n.select()}),1)},m.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,a=this.inputRef.current;a&&!n&&o!==r&&(a.value=u(r))},m.setEditing=function(e){this.setState({editing:e})},m.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,d=(e.autofocus,e.disabled),u=e.multiline,s=e.cols,m=void 0===s?32:s,p=e.rows,h=void 0===p?4:p,f=l(e,c),C=f.className,N=f.fluid,b=l(f,i);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Input",N&&"Input--fluid",d&&"Input--disabled",C])},b,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),u?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:m,rows:h,disabled:d},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:d},null,this.inputRef)]})))},s}(o.Component);t.Input=s},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(12),a=n(10),c=n(33),i=n(22),l=n(224),d=n(166),u=["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"];t.Knob=function(e){if(c.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,d.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,s=e.maxValue,m=e.minValue,p=e.onChange,h=e.onDrag,f=e.step,C=e.stepPixelSize,N=e.suppressFlicker,b=e.unit,V=e.value,g=e.className,v=e.style,y=e.fillValue,_=e.color,x=e.ranges,k=void 0===x?{}:x,L=e.size,w=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:s,minValue:m,onChange:p,onDrag:h,step:f,stepPixelSize:C,suppressFlicker:N,unit:b,value:V},{children:function(e){var t=e.dragging,n=(e.editing,e.value),c=e.displayValue,l=e.displayElement,d=e.inputElement,u=e.handleDragStart,p=(0,r.scale)(null!=y?y:c,m,s),h=(0,r.scale)(c,m,s),f=_||(0,r.keyOfMatchingRange)(null!=y?y:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["Knob","Knob--color--"+f,w&&"Knob--bipolar",g,(0,i.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,a.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((w?2.75:2)-1.5*p)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),d],0,Object.assign({},(0,i.computeBoxProps)(Object.assign({style:Object.assign({"font-size":L+"rem"},v)},S)),{onMouseDown:u})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(38),a=["children"],c=["label","children"];function i(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var l=function(e){var t=e.children,n=i(e,a);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=l;l.Item=function(e){var t=e.label,n=e.children,a=i(e,c);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),a=n(1),c=n(44),i=n(225);function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},u=function(e){var t,n;function c(t){var n;n=e.call(this,t)||this;window.innerWidth,window.innerHeight;return n.state={offsetX:128,offsetY:48,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),d(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),d(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),d(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=1.5*(n-e.zoom);return e.zoom=n,e.offsetX=e.offsetX-262*r,e.offsetY=e.offsetY-256*r,t.onZoom&&t.onZoom(e.zoom),e}))},n}return n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),c.prototype.render=function(){var e=(0,a.useBackend)(this.context).config,t=this.state,n=t.dragging,c=t.offsetX,i=t.offsetY,l=t.zoom,d=void 0===l?1:l,u=this.props.children,m=e.map+"_nanomap_z1.png",p=510*d+"px",h={width:p,height:p,"margin-top":i+"px","margin-left":c+"px",overflow:"hidden",position:"relative","background-size":"cover","background-repeat":"no-repeat","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:h,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"img",null,null,1,{src:m,style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,r.Box,{children:u})]}),(0,o.createComponentVNode)(2,s,{zoom:d,onZoom:this.handleZoom})]})},c}(o.Component);t.NanoMap=u;u.Marker=function(e,t){var n=e.x,a=e.y,c=e.zoom,i=void 0===c?1:c,l=e.icon,d=e.tooltip,u=e.color,s=2*n*i-i-3,m=2*a*i-i-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:m+"px",left:s+"px",children:[(0,o.createComponentVNode)(2,r.Icon,{name:l,color:u,fontSize:"6px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:d})]}),2)};var s=function(e,t){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:1,maxValue:8,stepPixelSize:10,format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};u.Zoomer=s},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(10),a=n(22),c=n(221),i=["className","children","onEnter"];t.Modal=function(e){var t,n=e.className,l=e.children,d=e.onEnter,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i);return d&&(t=function(e){13===e.keyCode&&d(e)}),(0,o.createComponentVNode)(2,c.Dimmer,{onKeyDown:t,children:(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Modal",n,(0,a.computeBoxClassName)(u)]),l,0,Object.assign({},(0,a.computeBoxProps)(u))))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NoticeBox=void 0;var o=n(0),r=n(10),a=n(22),c=["className","color","info","warning","success","danger"];var i=function(e){var t=e.className,n=e.color,i=e.info,l=(e.warning,e.success),d=e.danger,u=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["NoticeBox",n&&"NoticeBox--color--"+n,i&&"NoticeBox--type--info",l&&"NoticeBox--type--success",d&&"NoticeBox--type--danger",t])},u)))};t.NoticeBox=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.ProgressBarCountdown=t.ProgressBar=void 0;var o=n(0),r=n(12),a=n(10),c=n(22),i=["className","value","minValue","maxValue","color","ranges","children","fractionDigits"],l=["start","current","end"];function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var s=function(e){var t=e.className,n=e.value,l=e.minValue,d=void 0===l?0:l,s=e.maxValue,m=void 0===s?1:s,p=e.color,h=e.ranges,f=void 0===h?{}:h,C=e.children,N=e.fractionDigits,b=void 0===N?0:N,V=u(e,i),g=(0,r.scale)(n,d,m),v=C!==undefined,y=p||(0,r.keyOfMatchingRange)(n,f)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,a.classes)(["ProgressBar","ProgressBar--color--"+y,t,(0,c.computeBoxClassName)(V)]),[(0,o.createVNode)(1,"div","ProgressBar__fill ProgressBar__fill--animated",null,1,{style:{width:100*(0,r.clamp01)(g)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",v?C:(0,r.toFixed)(100*g,b)+"%",0)],4,Object.assign({},(0,c.computeBoxProps)(V))))};t.ProgressBar=s,s.defaultHooks=a.pureComponentHooks;var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:Math.max(100*t.current,0)},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=Math.max(this.state.value+this.props.rate,0);e<=0&&clearInterval(this.timer),this.setState((function(t){return{value:e}}))},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),this.props.rate)},a.componentWillUnmount=function(){clearInterval(this.timer)},a.render=function(){var e=this.props,t=e.start,n=(e.current,e.end),r=u(e,l),a=(this.state.value/100-t)/(n-t);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s,Object.assign({value:a},r)))},r}(o.Component);t.ProgressBarCountdown=m,m.defaultProps={rate:1e3},s.Countdown=m},function(e,t,n){"use strict";t.__esModule=!0,t.Section=void 0;var o=n(0),r=n(10),a=n(22),c=["className","title","level","buttons","content","stretchContents","noTopPadding","showBottom","children"];var i=function(e){var t=e.className,n=e.title,i=e.level,l=void 0===i?1:i,d=e.buttons,u=e.content,s=e.stretchContents,m=e.noTopPadding,p=e.showBottom,h=void 0===p||p,f=e.children,C=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,c),N=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(d),b=!(0,r.isFalsy)(u)||!(0,r.isFalsy)(f);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+l,e.flexGrow&&"Section--flex",t])},C,{children:[N&&(0,o.createVNode)(1,"div",(0,r.classes)(["Section__title",h&&"Section__title--showBottom"]),[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",d,0)],4),b&&(0,o.createComponentVNode)(2,a.Box,{className:(0,r.classes)(["Section__content",!!s&&"Section__content--stretchContents",!!m&&"Section__content--noTopPadding"]),children:[u,f]})]})))};t.Section=i,i.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(10),a=n(22),c=n(164),i=["className","vertical","children"],l=["className","selected","altSelection"];function d(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var u=function(e){var t=e.className,n=e.vertical,c=e.children,l=d(e,i);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,a.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",c,0),2,Object.assign({},(0,a.computeBoxProps)(l))))};t.Tabs=u;u.Tab=function(e){var t=e.className,n=e.selected,a=e.altSelection,i=d(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",a&&n&&"Tabs__tab--altSelection",t]),selected:!a&&n,color:"transparent"},i)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":526,"./AIFixer.js":527,"./APC.js":528,"./ATM.js":529,"./AccountsUplinkTerminal.js":530,"./AiAirlock.js":531,"./AirAlarm.js":532,"./AirlockAccessController.js":533,"./AirlockElectronics.js":534,"./AppearanceChanger.js":535,"./AtmosAlertConsole.js":536,"./AtmosControl.js":537,"./AtmosFilter.js":538,"./AtmosMixer.js":539,"./AtmosPump.js":540,"./AtmosTankControl.js":541,"./Autolathe.js":542,"./Biogenerator.js":543,"./BlueSpaceArtilleryControl.js":546,"./BluespaceTap.js":547,"./BodyScanner.js":548,"./BookBinder.js":549,"./BotClean.js":550,"./BotFloor.js":551,"./BotHonk.js":552,"./BotMed.js":553,"./BotSecurity.js":554,"./BrigCells.js":555,"./BrigTimer.js":556,"./CameraConsole.js":557,"./Canister.js":558,"./CardComputer.js":559,"./CargoConsole.js":560,"./ChangelogView.js":561,"./ChemDispenser.js":562,"./ChemHeater.js":563,"./ChemMaster.js":564,"./CloningConsole.js":565,"./ColourMatrixTester.js":566,"./CommunicationsComputer.js":567,"./CompostBin.js":568,"./Contractor.js":569,"./ConveyorSwitch.js":570,"./CrewMonitor.js":571,"./Cryo.js":572,"./CryopodConsole.js":573,"./DNAModifier.js":574,"./DestinationTagger.js":575,"./DisposalBin.js":576,"./DnaVault.js":577,"./DroneConsole.js":578,"./EFTPOS.js":579,"./ERTManager.js":580,"./EconomyManager.js":581,"./Electropack.js":582,"./EvolutionMenu.js":583,"./ExosuitFabricator.js":584,"./ExternalAirlockController.js":585,"./FaxMachine.js":586,"./FilingCabinet.js":587,"./FloorPainter.js":588,"./GPS.js":589,"./GeneModder.js":590,"./GenericCrewManifest.js":591,"./GhostHudPanel.js":592,"./GlandDispenser.js":593,"./GravityGen.js":594,"./GuestPass.js":595,"./HandheldChemDispenser.js":596,"./HealthSensor.js":597,"./Holodeck.js":598,"./ImplantPad.js":599,"./Instrument.js":600,"./KeycardAuth.js":601,"./KitchenMachine.js":602,"./LawManager.js":603,"./LibraryComputer.js":604,"./LibraryManager.js":605,"./ListInput.js":606,"./MODsuit.js":607,"./MagnetController.js":608,"./MechBayConsole.js":609,"./MechaControlConsole.js":610,"./MedicalRecords.js":611,"./MerchVendor.js":612,"./MiningVendor.js":613,"./NTRecruiter.js":614,"./Newscaster.js":615,"./NuclearBomb.js":616,"./OperatingComputer.js":617,"./Orbit.js":618,"./OreRedemption.js":619,"./PAI.js":620,"./PDA.js":633,"./Pacman.js":650,"./ParticleAccelerator.js":651,"./PdaPainter.js":652,"./PersonalCrafting.js":653,"./Photocopier.js":654,"./PoolController.js":655,"./PortablePump.js":656,"./PortableScrubber.js":657,"./PortableTurret.js":658,"./PowerMonitor.js":231,"./PrisonerImplantManager.js":659,"./PrisonerShuttleConsole.js":660,"./RCD.js":661,"./RPD.js":662,"./Radio.js":663,"./ReagentGrinder.js":664,"./RemoteSignaler.js":665,"./RequestConsole.js":666,"./RndConsole.js":83,"./RobotSelfDiagnosis.js":681,"./RoboticsControlConsole.js":682,"./Safe.js":683,"./SatelliteControl.js":684,"./SecureStorage.js":685,"./SecurityRecords.js":686,"./SeedExtractor.js":687,"./ShuttleConsole.js":688,"./ShuttleManipulator.js":689,"./Sleeper.js":690,"./SlotMachine.js":691,"./Smartfridge.js":692,"./Smes.js":693,"./SolarControl.js":694,"./SpawnersMenu.js":695,"./SpecMenu.js":696,"./StationAlertConsole.js":697,"./StationTraitsPanel.js":698,"./SuitStorage.js":701,"./SupermatterMonitor.js":702,"./SyndicateComputerSimple.js":703,"./TEG.js":704,"./TachyonArray.js":705,"./Tank.js":706,"./TankDispenser.js":707,"./TcommsCore.js":708,"./TcommsRelay.js":709,"./Teleporter.js":710,"./TempGun.js":711,"./ThermoMachine.js":712,"./TransferValve.js":713,"./TurbineComputer.js":714,"./Uplink.js":715,"./Vending.js":716,"./VolumeMixer.js":717,"./VotePanel.js":718,"./Wires.js":719,"./WizardApprenticeContract.js":720};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=525},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var d=null;return d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,a.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:d,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return i("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var d=!0;2!==l.stat&&null!==l.stat||(d=!1);var u=null;u=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var s=!0;return l.integrity>=100&&2!==l.stat&&(s=!1),(0,o.createComponentVNode)(2,c.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:u,value:l.integrity/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:d?"green":"red",children:d?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,a.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return i("wireless")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return i("radio")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!s||l.active,content:!s||l.active?"Already Repaired":"Repair",onClick:function(){return i("fix")}})})]}),(0,o.createComponentVNode)(2,a.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.APC=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},d={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,u=n.data,s=u.locked&&!u.siliconUser,m=(u.normallyLocked,l[u.externalPower]||l[0]),p=l[u.chargingStatus]||l[0],h=u.powerChannels||[],f=d[u.malfStatus]||d[0],C=u.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main Breaker",color:m.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){return c("breaker")}}),children:["[ ",m.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",color:p.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){return c("charge")}}),children:["[ ",p.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:!s&&(1===e.status||3===e.status),disabled:s,onClick:function(){return c("channel",t.auto)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:"On",selected:!s&&2===e.status,disabled:s,onClick:function(){return c("channel",t.on)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:!s&&0===e.status,disabled:s,onClick:function(){return c("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[u.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,o.createFragment)([!!u.malfStatus&&(0,o.createComponentVNode)(2,a.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return c(f.action)}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return c("overload")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",selected:u.coverLocked,disabled:s,onClick:function(){return c("cover")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",selected:u.nightshiftLights,onClick:function(){return c("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u.coverLocked?"lock":"unlock",content:u.emergencyLights?"Engaged":"Disengaged",selected:u.emergencyLights,disabled:s,onClick:function(){return c("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ATM=function(e,t){var n,p=(0,r.useBackend)(t),h=(p.act,p.data),f=h.view_screen,C=h.authenticated_account,N=h.ticks_left_locked_down,b=h.linked_db;if(N>0)n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(b)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,d);break;case 3:n=(0,o.createComponentVNode)(2,m);break;default:n=(0,o.createComponentVNode)(2,u)}else n=(0,o.createComponentVNode)(2,s);else n=(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Section,{children:n})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(i.machine_id,i.held_card_name);return(0,o.createComponentVNode)(2,a.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,a.Box,{children:"For all your monetary needs!"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,a.Button,{content:l,icon:"eject",onClick:function(){return c("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.security_level;return(0,o.createComponentVNode)(2,a.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return c("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,a.Button,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return c("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"fundsAmount",0),m=s[0],h=s[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],N=f[1],b=i.money;return(0,o.createComponentVNode)(2,a.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",b]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Account Number",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"7 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Funds to Transfer",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,onInput:function(e,t){return N(t)}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return c("transfer",{target_acc_number:d,funds_amount:m,purpose:C})}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),d=l[0],u=l[1],s=i.owner_name,m=i.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Welcome, "+s,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return c("logout")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:["$",m]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,a.Input,{onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return c("withdrawal",{funds_amount:d})}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Change account security level",icon:"lock",onClick:function(){return c("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return c("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View transaction log",icon:"list",onClick:function(){return c("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print balance statement",icon:"print",onClick:function(){return c("balance_statement")}})})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=(0,r.useLocalState)(t,"accountID",null),d=l[0],u=l[1],s=(0,r.useLocalState)(t,"accountPin",null),m=s[0],p=s[1];i.machine_id,i.held_card_name;return(0,o.createComponentVNode)(2,a.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return u(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return p(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return c("attempt_auth",{account_num:d,account_pin:m})}})})]})})},m=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name})]},e)}))]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,p)]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return c("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38),l=n(68),d=n(3),u=n(123),s=n(124);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,a.useBackend)(t),c=(r.act,r.data),i=c.loginState,l=c.currentPage;return i.logged_in?(1===l?n=(0,o.createComponentVNode)(2,p):2===l?n=(0,o.createComponentVNode)(2,b):3===l&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m),n]})})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,a.useBackend)(t).data,r=(0,a.useLocalState)(t,"tabIndex",0),i=r[0],l=r[1];n.login_state;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"User Accounts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Department Accounts"]})]})},p=function(e,t){switch((0,a.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},h=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.accounts,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","owner_name")),m=s[0],p=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),h=p[0];p[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,C,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,C,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,C,{id:"suspended",children:"Account Status"}),(0,o.createComponentVNode)(2,C,{id:"money",children:"Account Balance"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended+"|"+e.money}))).sort((function(e,t){var n=h?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return i("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.department_accounts;return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,c.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",children:(0,o.createComponentVNode)(2,c.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:"Department Name"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Number"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Status"}),(0,o.createComponentVNode)(2,l.TableCell,{children:"Account Balance"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+e.suspended,onClick:function(){return r("view_account_detail",{account_num:e.account_number})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wallet"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.suspended}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.money})]},e.account_number)}))]})})})]})},C=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=(n.data.is_printing,(0,a.useLocalState)(t,"searchText","")),d=(l[0],l[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}})}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.account_number,d=i.owner_name,u=i.money,s=i.suspended,m=i.transactions,p=i.account_pin,h=i.is_department_account;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"#"+l+" / "+d,mt:1,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Number",children:["#",l]}),!!h&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Pin Actions",children:(0,o.createComponentVNode)(2,c.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:Boolean(h),onClick:function(){return r("set_account_pin",{account_number:l})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Status",color:s?"red":"green",children:[s?"Suspended":"Active",(0,o.createComponentVNode)(2,c.Button,{ml:1,content:s?"Unsuspend":"Suspend",icon:s?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.time}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.target_name})]},e)}))]})})],4)},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=(n.data,(0,a.useLocalState)(t,"accName","")),l=i[0],d=i[1],u=(0,a.useLocalState)(t,"accDeposit",""),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Name Here",onChange:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"0",onChange:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:s})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=i[d.power.main]||i[0],s=i[d.power.backup]||i[0],m=i[d.shock]||i[0];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Main",color:u.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[d.power.main?"Online":"Offline"," ",d.wires.main_power?d.power.main_timeleft>0&&"["+d.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Backup",color:s.color,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lightbulb-o",disabled:!d.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[d.power.backup?"Online":"Offline"," ",d.wires.backup_power?d.power.backup_timeleft>0&&"["+d.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Electrify",color:m.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",disabled:!(d.wires.shock&&2!==d.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"bolt",disabled:!d.wires.shock||0===d.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===d.shock?"Safe":"Electrified"," ",(d.wires.shock?d.shock_timeleft>0&&"["+d.shock_timeleft+"s]":"[Wires have been cut!]")||-1===d.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.id_scanner?"power-off":"times",content:d.id_scanner?"Enabled":"Disabled",selected:d.id_scanner,disabled:!d.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!d.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.emergency?"power-off":"times",content:d.emergency?"Enabled":"Disabled",selected:d.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.locked?"lock":"unlock",content:d.locked?"Lowered":"Raised",selected:d.locked,disabled:!d.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!d.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.lights?"power-off":"times",content:d.lights?"Enabled":"Disabled",selected:d.lights,disabled:!d.wires.lights,onClick:function(){return l("light-toggle")}}),children:!d.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.safe?"power-off":"times",content:d.safe?"Enabled":"Disabled",selected:d.safe,disabled:!d.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!d.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.speed?"power-off":"times",content:d.speed?"Enabled":"Disabled",selected:d.speed,disabled:!d.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!d.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d.opened?"sign-out-alt":"sign-in-alt",content:d.opened?"Open":"Closed",selected:d.opened,disabled:d.locked||d.welded,onClick:function(){return l("open-close")}}),children:!(!d.locked&&!d.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),d.locked?"bolted":"",d.locked&&d.welded?" and ":"",d.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(226);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.InterfaceLockNoticeBox),!a&&(0,o.createFragment)([(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,d=c.data,u=d.air,s=d.mode,m=d.atmos_alarm,p=d.locked,h=d.alarmActivated,f=d.rcon,C=d.target_temp;return n=0===u.danger.overall?0===m?"Optimal":"Caution: Atmos alert in area":1===u.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,a.Section,{title:"Air Status",children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.pressure),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.pressure})," kPa",!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:3===s?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===s,icon:"exclamation-triangle",onClick:function(){return i("mode",{mode:3===s?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.oxygen/100,fractionDigits:"1",color:l(u.danger.oxygen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.nitrogen/100,fractionDigits:"1",color:l(u.danger.nitrogen)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.co2/100,fractionDigits:"1",color:l(u.danger.co2)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.plasma/100,fractionDigits:"1",color:l(u.danger.plasma)})}),u.contents.n2o>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nitrous Oxide",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.n2o/100,fractionDigits:"1",color:l(u.danger.n2o)})}),u.contents.other>.1&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.contents.other/100,fractionDigits:"1",color:l(u.danger.other)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.temperature),children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature})," K /"," ",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,a.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return i("temperature")}}),(0,o.createComponentVNode)(2,a.Button,{content:u.thermostat_state?"On":"Off",selected:u.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,a.Box,{color:l(u.danger.overall),children:[n,!p&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Off",selected:1===f,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Auto",selected:2===f,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,a.Button,{content:"On",selected:3===f,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,a.Box,{children:"Unable to acquire air sample!"})})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),c=n[0],i=n[1];return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===c,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===c,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},s=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0];n[1];switch(a){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,p);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return c("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,a.Button,{content:"External",selected:1===e.checks,onClick:function(){return c("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return c("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"cog",onClick:function(){return c("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return c("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,a.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return c("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return c("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return c("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return c("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return c("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return c("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return c("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return c("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.modes,d=i.presets,u=i.emagged,s=i.mode,m=i.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!u)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===s,onClick:function(){return c("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,a.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,a.Table,{mt:1,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:"cog",selected:e.id===m,onClick:function(){return c("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.thresholds;return(0,o.createComponentVNode)(2,a.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,a.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return c("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AirlockAccessController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.exterior_status,m=u.interior_status,p=u.processing;return n="open"===s?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:p,onClick:function(){return d("force_ext")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext_door")}}),i="open"===m?(0,o.createComponentVNode)(2,a.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:p,color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int_door")}}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"External Door Status",children:"closed"===s?"Locked":"Open"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Door Status",children:"closed"===m?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:i})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,d)]})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,a.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:1})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:2})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:4})}})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&i?"selected":null,onClick:function(){return c("unrestricted_access",{unres_dir:8})}})})]})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.selected_accesses,u=l.one_access,s=l.regions;return(0,o.createComponentVNode)(2,i.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:u,content:"One",onClick:function(){return c("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,content:"All",onClick:function(){return c("set_one_access",{access:"all"})}})],4),accesses:s,selectedList:d,accessMod:function(e){return c("set",{access:e})},grantAll:function(){return c("grant_all")},denyAll:function(){return c("clear_all")},grantDep:function(e){return c("grant_region",{region:e})},denyDep:function(e){return c("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.change_race,s=d.species,m=d.specimen,p=d.change_gender,h=d.gender,f=d.has_gender,C=d.change_eye_color,N=d.change_skin_tone,b=d.change_skin_color,V=d.change_head_accessory_color,g=d.change_hair_color,v=d.change_secondary_hair_color,y=d.change_facial_hair_color,_=d.change_secondary_facial_hair_color,x=d.change_head_marking_color,k=d.change_body_marking_color,L=d.change_tail_marking_color,w=d.change_head_accessory,B=d.head_accessory_styles,S=d.head_accessory_style,I=d.change_hair,T=d.hair_styles,A=d.hair_style,E=d.change_hair_gradient,M=d.change_facial_hair,O=d.facial_hair_styles,P=d.facial_hair_style,F=d.change_head_markings,R=d.head_marking_styles,D=d.head_marking_style,j=d.change_body_markings,W=d.body_marking_styles,z=d.body_marking_style,U=d.change_tail_markings,H=d.tail_marking_styles,G=d.tail_marking_style,K=d.change_body_accessory,Y=d.body_accessory_styles,q=d.body_accessory_style,$=d.change_alt_head,X=d.alt_head_styles,J=d.alt_head_style,Q=!1;return(C||N||b||V||g||v||y||_||x||k||L)&&(Q=!0),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.specimen,selected:e.specimen===m,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,a.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Q&&(0,o.createComponentVNode)(2,i),!!w&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head accessory",children:B.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===S,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!I&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair",children:T.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.hairstyle,selected:e.hairstyle===A,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!E&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!M&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Facial hair",children:O.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===P,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!F&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Head markings",children:R.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body markings",children:W.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!U&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===G,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!K&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!$&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alternate head",children:X.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.altheadstyle,selected:e.altheadstyle===J,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!i[e.key]&&(0,o.createComponentVNode)(2,a.Button,{content:e.text,onClick:function(){return c(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data),l=i.priority||[],d=i.minor||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-bad",e,0,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(68),i=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),u=c[0],s=c[1];return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:0===u,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,c.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,a.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",content:"Access",onClick:function(){return i("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"zoom",1),i=c[0],l=c[1],d=n.alarms;return(0,o.createComponentVNode)(2,a.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,a.NanoMap,{onZoom:function(e){return l(e)},children:d.filter((function(e){return 2===e.z})).map((function(e){return(0,o.createComponentVNode)(2,a.NanoMap.Marker,{x:e.x,y:e.y,zoom:i,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0)},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.pressure,s=l.max_pressure,m=l.filter_type,p=l.filter_type_list;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_pressure")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Filter",children:p.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{selected:e.gas_type===m,content:e.label,onClick:function(){return i("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.pressure,m=d.max_pressure,p=d.node1_concentration,h=d.node2_concentration;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:m,value:s,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:s===m,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,i,{node_name:"Node 1",node_ref:p}),(0,o.createComponentVNode)(2,i,{node_name:"Node 2",node_ref:h})]})})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:i,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return c("set_node",{node_name:i,concentration:t/100})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return c("set_node",{node_name:i,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.on,u=l.rate,s=l.max_rate,m=l.gas_unit,p=l.step;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return i("min_rate")}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:m,width:6.1,lineHeight:1.5,step:p,minValue:0,maxValue:s,value:u,onDrag:function(e,t){return i("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",textAlign:"center",disabled:u===s,width:2.2,onClick:function(){return i("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosTankControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(12),i=n(43),l=n(3);t.AtmosTankControl=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.sensors||{};return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[Object.keys(s).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[Object.keys(s[e]).indexOf("pressure")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pressure",children:[s[e].pressure," kpa"]}):"",Object.keys(s[e]).indexOf("temperature")>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[s[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map((function(t){return Object.keys(s[e]).indexOf(t)>-1?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:(0,i.getGasLabel)(t),children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(0,i.getGasColor)(t),value:s[e][t],minValue:0,maxValue:100,children:(0,c.toFixed)(s[e][t],2)+"%"})},(0,i.getGasLabel)(t)):""}))]})},e)})),u.inlet&&Object.keys(u.inlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Inlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.inlet.on,"power-off"),content:u.inlet.on?"On":"Off",color:u.inlet.on?null:"red",selected:u.inlet.on,onClick:function(){return d("toggle_active",{dev:"inlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:u.inlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"inlet",val:t})}})})]})}):"",u.outlet&&Object.keys(u.outlet).length>0?(0,o.createComponentVNode)(2,a.Section,{title:"Outlet Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:(u.outlet.on,"power-off"),content:u.outlet.on?"On":"Off",color:u.outlet.on?null:"red",selected:u.outlet.on,onClick:function(){return d("toggle_active",{dev:"outlet"})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rate",children:(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:u.outlet.rate,onDrag:function(e,t){return d("set_pressure",{dev:"outlet",val:t})}})})]})}):""]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(48),a=n(30),c=n(1),i=n(2),l=n(3),d=n(21),u=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,c.useBackend)(t),s=n.act,m=n.data,p=m.total_amount,h=(m.max_amount,m.metal_amount),f=m.glass_amount,C=m.busyname,N=(m.busyamt,m.showhacked,m.buildQueue),b=m.buildQueueLen,V=m.recipes,g=m.categories,v=(0,c.useSharedState)(t,"category",0),y=v[0],_=v[1];0===y&&(y="Tools");var x=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),k=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),L=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=(0,c.useSharedState)(t,"search_text",""),B=w[0],S=w[1],I=(0,d.createSearch)(B,(function(e){return e.name})),T="";b>0&&(T=N.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:N[t][0],onClick:function(){return s("remove_from_queue",{remove_from_queue:N.indexOf(e)+1})}},e)},t)})));var A=(0,r.flow)([(0,a.filter)((function(e){return(e.category.indexOf(y)>-1||B)&&(m.showhacked||!e.hacked)})),B&&(0,a.filter)(I),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(V),E="Build";B?E="Results for: '"+B+"':":y&&(E="Build ("+y+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Section,{title:E,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:g,selected:y,onSelected:function(e){return _(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return S(t)},mb:1}),A.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&1===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,1),onClick:function(){return s("make",{make:e.uid,multiplier:1})},children:(0,d.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&10===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,10),onClick:function(){return s("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&25===m.busyamt,disabled:!u(e,m.metal_amount,m.glass_amount,25),onClick:function(){return s("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",selected:m.busyname===e.name&&m.busyamt===e.max_multiplier,disabled:!u(e,m.metal_amount,m.glass_amount,e.max_multiplier),onClick:function(){return s("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,d.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,i.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Metal",children:x}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Glass",children:k}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total",children:L}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Storage",children:[m.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Building",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Build Queue",children:[T,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Clear All",disabled:!m.buildQueueLen,onClick:function(){return s("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.Biogenerator=function(e,t){var n=(0,r.useBackend)(t),a=n.data,m=n.config,p=a.container,h=a.processing,f=m.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:h,name:f}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),p?(0,o.createComponentVNode)(2,s):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"flask",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},d=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.biomass,l=c.container,d=c.container_curr_reagents,u=c.container_max_reagents;return(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",children:i}),(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,maxValue:u,children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:d+" / "+u+" units"})}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"None"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_plants,d=i.container;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return c("activate")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!d,tooltip:d?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return c("detach_container")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return c("eject_plants")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.biomass,d=i.product_list,u=(0,r.useSharedState)(t,"vendAmount",1),s=u[0],m=u[1],p=Object.entries(d).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,a.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*s,(0,o.createComponentVNode)(2,a.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{textAlign:"right",width:"40%",children:(0,o.createComponentVNode)(2,a.Button,{content:"Vend",disabled:lm?"bad":"good";return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!b&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(m>V)&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Input Level",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===s,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===s,onClick:function(){return l("set",{set_level:m})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===s,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:s,fillValue:m,minValue:0,color:v,maxValue:N,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:s===N,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:s===N,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:N})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Power Use",children:(0,i.formatPower)(f)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power for next level",children:(0,i.formatPower)(g)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Surplus Power",children:(0,i.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Points",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,a.Button,{disabled:e.price>=p,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],s={average:[.25,.5],bad:[.5,Infinity]},m=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,c.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,a.useBackend)(t).data,r=n.occupied,c=n.occupant,l=void 0===c?{}:c,d=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,y);return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:d})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,b,{occupant:t}),(0,o.createComponentVNode)(2,g,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"print",onClick:function(){return i("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",onClick:function(){return i("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(d.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Implants",children:d.implant_len?(0,o.createComponentVNode)(2,c.Box,{children:d.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"None"})})]})})},N=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:d.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,c.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])}))}):(0,o.createComponentVNode)(2,c.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No abnormalities found."})})},b=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,c.Table,{children:m(u,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,V,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:s,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,c.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[p([!!e.status.splinted&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})]),p(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,c.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,c.Table,{children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:s,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,c.Box,{color:"average",display:"inline",children:p([h(e.germ_level)])}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:p([1===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},y=function(){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BookBinder=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(38);t.BookBinder=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.selectedbook,m=u.book_categories,p=[];return m.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Book Binder",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:m.map((function(e){return e.description})),onSelected:function(e){return d("toggle_binder_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),m.filter((function(e){return s.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return d("toggle_binder_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:s.summary})]})})]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return d("print_book")}})]})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.cleanblood;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Clean Blood",disabled:u,onClick:function(){return l("blood")}})}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotFloor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotFloor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.hullplating,p=d.replace,h=d.eat,f=d.make,C=d.fixfloor,N=d.nag_empty,b=d.magnet,V=d.tiles_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Floor Settings",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tiles Left",children:V})}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Add tiles to new hull plating",disabled:u,onClick:function(){return l("autotile")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Replace floor tiles",disabled:u,onClick:function(){return l("replacetiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Repair damaged tiles and platings",disabled:u,onClick:function(){return l("fixfloors")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Miscellaneous",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:u,onClick:function(){return l("eattiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Make pieces of metal into tiles when empty",disabled:u,onClick:function(){return l("maketiles")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:N,content:"Transmit notice when empty",disabled:u,onClick:function(){return l("nagonempty")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:b,content:"Traction Magnets",disabled:u,onClick:function(){return l("anchored")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotHonk=void 0;var o=n(0),r=n(1),a=(n(2),n(3)),c=n(101);t.BotHonk=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.BotStatus)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotMed=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotMed=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=(d.locked,d.noaccess),s=(d.maintpanel,d.on,d.autopatrol,d.canhack,d.emagged,d.remote_disabled,d.painame),m=d.shut_up,p=d.declare_crit,h=d.stationary_mode,f=d.heal_threshold,C=d.injection_amount,N=d.use_beaker,b=d.treat_virus,V=d.reagent_glass;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Communication Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!m,disabled:u,onClick:function(){return l("toggle_speaker")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:p,disabled:u,onClick:function(){return l("toggle_critical_alerts")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Treatment Settings",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Healing Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{value:f.value,minValue:f.min,maxValue:f.max,step:5,disabled:u,onChange:function(e,t){return l("set_heal_threshold",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Injection Level",children:(0,o.createComponentVNode)(2,a.Slider,{value:C.value,minValue:C.min,maxValue:C.max,step:5,format:function(e){return e+"u"},disabled:u,onChange:function(e,t){return l("set_injection_amount",{target:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reagent Source",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Beaker":"Internal Synthesizer",icon:N?"flask":"cogs",disabled:u,onClick:function(){return l("toggle_use_beaker")}})}),V&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:V.amount,minValue:0,maxValue:V.max_amount,children:[V.amount," / ",V.max_amount]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,a.Button,{content:"Eject",disabled:u,onClick:function(){return l("eject_reagent_glass")}})})]})})]}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Treat Viral Infections",checked:b,disabled:u,onClick:function(){return l("toggle_treat_viral")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:u,onClick:function(){return l("toggle_stationary_mode")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(101);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.noaccess,s=d.painame,m=d.check_id,p=d.check_weapons,h=d.check_warrant,f=d.arrest_mode,C=d.arrest_declare;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.BotStatus),(0,o.createComponentVNode)(2,a.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:m,content:"Unidentifiable Persons",disabled:u,onClick:function(){return l("authid")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Weapons",disabled:u,onClick:function(){return l("authweapon")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:u,onClick:function(){return l("authwarrant")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:f,content:"Detain Targets Indefinitely",disabled:u,onClick:function(){return l("arrtype")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{fluid:!0,checked:C,content:"Announce Arrests On Radio",disabled:u,onClick:function(){return l("arrdeclare")}})]}),s&&(0,o.createComponentVNode)(2,a.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:s,disabled:u,onClick:function(){return l("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),a=n(2),c=n(1),i=function(e,t){var n=e.cell,r=(0,c.useBackend)(t).act,i=n.cell_id,l=n.occupant,d=n.crimes,u=n.brigged_by,s=n.time_left_seconds,m=n.time_set_seconds,p=n.ref,h="";s>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,a.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:i}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:u}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:m})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{totalSeconds:s})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{type:"button",onClick:function(){r("release",{ref:p})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,a.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,i,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,c.useBackend)(t),i=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:i})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:l.occupant}));var d="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(d="exclamation-triangle"));var u=[],s=0;for(s=0;se.current_positions&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"-",disabled:s.cooldown_time||!e.can_close,onClick:function(){return u("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{content:"+",disabled:s.cooldown_time||!e.can_open,onClick:function(){return u("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:s.target_dept&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:s.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,a.Button,{content:e.is_priority?"Yes":"No",selected:e.is_priority,disabled:s.cooldown_time||!e.can_prioritize,onClick:function(){return u("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=s.authenticated&&s.scan_name?s.modify_name?(0,o.createComponentVNode)(2,i.AccessList,{accesses:s.regions,selectedList:s.selectedAccess,accessMod:function(e){return u("set",{access:e})},grantAll:function(){return u("grant_all")},denyAll:function(){return u("clear_all")},grantDep:function(e){return u("grant_region",{region:e})},denyDep:function(e){return u("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,a.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=s.authenticated?s.records.length?(0,o.createComponentVNode)(2,a.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Delete All Records",disabled:!s.authenticated||0===s.records.length||s.target_dept,onClick:function(){return u("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Reason"}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Deleted By"})]}),s.records.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.reason}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!s.iscentcom&&(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!s.authenticated||0===s.records.length,onClick:function(){return u("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=s.authenticated&&s.scan_name?(0,o.createComponentVNode)(2,a.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Actions"})]}),s.people_dept.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return u("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,a.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[p,m,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(48),a=n(30),c=n(1),i=n(2),l=n(3),d=(n(44),n(21)),u=n(38);t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)]})})};var s=function(e,t){var n=(0,c.useLocalState)(t,"contentsModal",null),r=n[0],a=n[1],l=(0,c.useLocalState)(t,"contentsModalTitle",null),d=l[0],u=l[1];return null!==r&&null!==d?(0,o.createComponentVNode)(2,i.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,i.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[d,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,i.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,i.Box,{m:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Close",onClick:function(){a(null),u(null)}})})]}):void 0},m=function(e,t){var n,r,a=(0,c.useBackend)(t),l=a.act,d=a.data,u=d.is_public,s=d.timeleft,m=d.moving,p=d.at_station;return m||p?!m&&p?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==s?"Shuttle is en route (ETA: "+s+" minutes)":"Shuttle is en route (ETA: "+s+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:n}),0===u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n,r=(0,c.useBackend)(t),a=(r.act,r.data.accounts),l=(0,c.useLocalState)(t,"selectedAccount"),d=l[0],u=l[1],s=[];return a.map((function(e){return s[e.name]=e.account_UID})),(0,o.createComponentVNode)(2,i.Section,{title:"Payment",children:[(0,o.createComponentVNode)(2,i.Dropdown,{mt:.6,width:"190px",options:a.map((function(e){return e.name})),selected:null==(n=a.filter((function(e){return e.account_UID===d}))[0])?void 0:n.name,onSelected:function(e){return u(s[e])}}),a.filter((function(e){return e.account_UID===d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Name",children:e.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Balance",children:e.balance})]},e.account_UID)}))]})},h=function(e,t){var n=(0,c.useBackend)(t),l=n.act,u=n.data,s=u.categories,m=u.supply_packs,p=(0,c.useSharedState)(t,"category","Emergency"),h=p[0],f=p[1],C=(0,c.useSharedState)(t,"search_text",""),N=C[0],b=C[1],V=(0,c.useLocalState)(t,"contentsModal",null),g=(V[0],V[1]),v=(0,c.useLocalState)(t,"contentsModalTitle",null),y=(v[0],v[1]),_=(0,d.createSearch)(N,(function(e){return e.name})),x=(0,c.useLocalState)(t,"selectedAccount"),k=x[0],L=(x[1],(0,r.flow)([(0,a.filter)((function(e){return e.cat===s.filter((function(e){return e.name===h}))[0].category||N})),N&&(0,a.filter)(_),(0,a.sortBy)((function(e){return e.name.toLowerCase()}))])(m)),w="Crate Catalogue";return N?w="Results for '"+N+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,i.Section,{title:w,buttons:(0,o.createComponentVNode)(2,i.Dropdown,{width:"190px",options:s.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return b(t)},mb:1}),(0,o.createComponentVNode)(2,i.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:L.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Order 1",icon:"shopping-cart",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:0,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!k,onClick:function(){return l("order",{crate:e.ref,multiple:1,account:k})}}),(0,o.createComponentVNode)(2,i.Button,{content:"View Contents",icon:"search",onClick:function(){g(e.contents),y(e.name)}})]})]},e.name)}))})})]})},f=function(e,t){var n,r,a=e.request;switch(a.department){case"Engineering":r="CE",n="orange";break;case"Medical":r="CMO",n="teal";break;case"Science":r="RD",n="purple";break;case"Supply":r="CT",n="brown";break;case"Service":r="HOP",n="olive";break;case"Security":r="HOS",n="red";break;case"Command":r="CAP",n="blue";break;case"Assistant":r="Any Head",n="grey"}return(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:"Approval Required:"}),Boolean(a.req_cargo_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{mr:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),Boolean(a.req_head_approval)&&(0,o.createComponentVNode)(2,u.FlexItem,{children:(0,o.createComponentVNode)(2,i.Button,{color:n,content:r,disabled:a.req_cargo_approval,icon:"user-tie",tooltip:a.req_cargo_approval?"This Order first requires approval from the QM before the "+r+" can approve it":"This Order requires approval from the "+r+" still"})})]})},C=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.requests,d=a.orders,u=a.shipments;return(0,o.createComponentVNode)(2,i.Section,{title:"Orders",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{className:"Cargo_RequestList",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{children:["Order #",e.ordernum,": ",e.supply_type," (",e.cost," credits) for"," ",(0,o.createVNode)(1,"b",null,e.orderedby,0)," with"," ",e.department?"The "+e.department+" Department":"Their Personal"," ","Account"]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]}),(0,o.createComponentVNode)(2,f,{request:e})]}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Approve",color:"green",disabled:!e.can_approve,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Deny",color:"red",disabled:!e.can_deny,onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"Order in Transit"}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChangelogView=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ChangelogView=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,r.useLocalState)(t,"onlyRecent",0),u=d[0],s=d[1],m=l.cl_data,p=l.last_cl,h={FIX:(0,o.createComponentVNode)(2,a.Icon,{name:"tools",title:"Fix"}),WIP:(0,o.createComponentVNode)(2,a.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,o.createComponentVNode)(2,a.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,o.createComponentVNode)(2,a.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,o.createComponentVNode)(2,a.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})};return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,o.createComponentVNode)(2,a.Button,{content:u?"Showing all changes":"Showing changes since last connection",onClick:function(){return s(!u)}}),children:m.map((function(e){return!u&&e.merge_ts<=p||(0,o.createComponentVNode)(2,a.Section,{mb:2,title:e.author+" - Merged on "+e.merge_date,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"#"+e.num,onClick:function(){return i("open_pr",{pr_number:e.num})}}),children:e.entries.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:[(t=e.etype,t in h?h[t]:(0,o.createComponentVNode)(2,a.Icon,{name:"plus",color:"green"}))," ",e.etext]},e);var t}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(126),i=n(3),l=[1,5,10,20,30,50],d=[1,5,10];t.ChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})})};var u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.amount,u=i.energy,s=i.maxEnergy;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=[],s=0;s<(d.length+1)%3;s++)u.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Dispenser":"Chemical Dispenser",flexShrink:0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})},m=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,u=l.isBeakerLoaded,s=l.beakerCurrentVolume,m=l.beakerMaxVolume,p=l.beakerContents,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,a.Section,{title:l.glass?"Glass":"Beaker",flexGrow:1,minHeight:"25%",buttons:(0,o.createComponentVNode)(2,a.Box,{children:[!!u&&(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:2,children:[s," / ",m," units"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return i("ejectBeaker")}})]}),children:(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:u,beakerContents:h,buttons:function(e){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return i("remove",{reagent:e.id,amount:-1})}}),d.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{content:t,onClick:function(){return i("remove",{reagent:e.id,amount:t})}},n)})),(0,o.createComponentVNode)(2,a.Button,{content:"ALL",onClick:function(){return i("remove",{reagent:e.id,amount:e.volume})}})],0)}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemHeater=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(126),l=n(3);t.ChemHeater=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.targetTemp,u=l.targetTempReached,s=l.autoEject,m=l.isActive,p=l.currentTemp,h=l.isBeakerLoaded;return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",flexBasis:"content",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{content:"Auto-eject",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return i("toggle_autoeject")}}),(0,o.createComponentVNode)(2,c.Button,{content:m?"On":"Off",icon:"power-off",selected:m,disabled:!h,onClick:function(){return i("toggle_on")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,c.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,r.round)(d,0),minValue:0,maxValue:1e3,onDrag:function(e,t){return i("adjust_temperature",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Reading",color:u?"good":"average",children:h&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:p,format:function(e){return(0,r.toFixed)(e)+" K"}})||"\u2014"})]})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.isBeakerLoaded,u=l.beakerCurrentVolume,s=l.beakerMaxVolume,m=l.beakerContents;return(0,o.createComponentVNode)(2,c.Section,{title:"Beaker",flexGrow:"1",buttons:!!d&&(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:"label",mr:2,children:[u," / ",s," units"]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject",onClick:function(){return r("eject_beaker")}})]}),children:(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:d,beakerContents:m})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ChemMaster=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(126),l=n(28),d=["icon","imageTransform"];function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=[1,5,10];t.ChemMaster=function(e,t){var n=(0,r.useBackend)(t).data,a=n.condi,i=n.beaker,d=n.beaker_reagents,u=void 0===d?[]:d,s=n.buffer_reagents,f=void 0===s?[]:s,C=n.mode;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,m,{beaker:i,beakerReagents:u,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,p,{mode:C,bufferReagents:f}),(0,o.createComponentVNode)(2,h,{isCondiment:a,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,_)]})]})};var m=function(e,t){var n=(0,r.useBackend)(t).act,c=e.beaker,d=e.beakerReagents,u=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,a.Section,{title:"Beaker",flexGrow:"1",minHeight:"100px",buttons:u?(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!c,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:c?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r0?(0,o.createComponentVNode)(2,i.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,a.Box,{mb:r=0||(r[n]=e[n]);return r}(e,d);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({style:{padding:0,"line-height":0}},c,{children:(0,o.createVNode)(1,"span",null,(0,o.createVNode)(1,"img",null,null,1,{style:{"-ms-interpolation-mode":"nearest-neighbor",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) "+(r||""),"margin-left":"1px"},src:n}),2,{style:{overflow:"hidden",display:"inline-block",width:"26px",height:"26px",position:"relative"}})})))},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.maxpills,d=i.pillamount,u=i.pillname,s=i.pillplaceholdername,m=i.pillsprite,p=i.pillstyles.map((function(e){var t=e.id,n=e.sprite;return(0,o.createComponentVNode)(2,b,{icon:n,imageTransform:"scale(2)",onClick:function(){return c("set_pills_style",{style:t})},selected:m===t},t)}));return(0,o.createComponentVNode)(2,N,{maxQuantity:l,medicineName:u,placeholderName:s,productionType:"pills",quantity:d,children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p})})},g=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.maxpatches,i=a.patchamount,l=a.patchname,d=a.patchplaceholdername;return(0,o.createComponentVNode)(2,N,{maxQuantity:c,medicineName:l,placeholderName:d,productionType:"patches",quantity:i})},v=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.bottlesprite,d=i.maxbottles,u=i.bottleamount,s=i.bottlename,m=i.bottleplaceholdername,p=i.bottlestyles.map((function(e){var t=e.id,n=e.sprite;return(0,o.createComponentVNode)(2,b,{icon:n,onClick:function(){return c("set_bottles_style",{style:t})},selected:l===t},t)}));return(0,o.createComponentVNode)(2,N,{maxQuantity:d,medicineName:s,placeholderName:m,productionType:"bottles",quantity:u,children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",children:p})})},y=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"box",content:"Create condiment pack (10u max)",mb:"0.5rem",onClick:function(){return(0,l.modalOpen)(t,"create_condi_pack")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"wine-bottle",content:"Create bottle (50u max)",mb:"0",onClick:function(){return n("create_condi_bottle")}})],4)},_=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.loaded_pill_bottle_style,d=i.containerstyles,u=i.loaded_pill_bottle,s="20px",m="20px",p=d.map((function(e){var t=e.color,n=e.name,r=l===t;return(0,o.createComponentVNode)(2,a.Button,{style:{position:"relative",width:s,height:m},onClick:function(){return c("set_container_style",{style:t})},icon:r&&"check",iconStyle:{position:"relative","z-index":1},tooltip:n,tooltipPosition:"top",children:[!r&&(0,o.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,o.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:s,height:m,"background-color":t,opacity:.6,filter:"alpha(opacity=60)"}})]},t)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Container Customization",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",disabled:!u,content:"Eject Container",onClick:function(){return c("ejectp")}}),children:u?(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Style",style:{position:"relative"},children:[(0,o.createComponentVNode)(2,a.Button,{style:{width:s,height:m},icon:"tint-slash",onClick:function(){return c("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),p]})}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})};(0,l.modalRegisterBodyOverride)("analyze",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args.analysis;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:i.condi?"Condiment Analysis":"Reagent Analysis",children:(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!i.condi&&(0,o.createComponentVNode)(2,a.Button,{icon:i.printing?"spinner":"print",disabled:i.printing,iconSpin:!!i.printing,ml:"0.5rem",content:"Print",onClick:function(){return c("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(43),l=n(28),d=n(3),u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=e.args,u=d.activerecord,s=d.realname,m=d.health,p=d.unidentity,h=d.strucenzymes,f=m.split(" - ");return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+s,children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:s}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,c.Box,{color:i.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:p}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:u})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",u),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,m)})]})]})};var s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.menu;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},m=function(e,t){var n,r=(0,a.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,p):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.loading,u=l.scantemp,s=l.occupant,m=l.locked,p=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,N=l.selected_pod,b=m&&!!s;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,selected:b,icon:b?"toggle-on":"toggle-off",content:b?"Engaged":"Disengaged",onClick:function(){return i("lock")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:b||!s,icon:"user-slash",content:"Eject Occupant",onClick:function(){return i("eject")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,c.Box,{color:u.color,children:u.text})}),!!p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,c.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return i("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s||d,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return i("scan")}})]}),(0,o.createComponentVNode)(2,c.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,c.Button,{selected:N===e.pod,icon:N===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return i("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,c.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,c.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.records;return i.length?(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,c.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var d=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.NoticeBox,Object.assign({},d,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,c.Button,{icon:"times-circle",float:"right",onClick:function(){return i("cleartemp")}}),(0,o.createComponentVNode)(2,c.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.scanner,d=i.numberofpods,u=i.autoallowed,s=i.autoprocess;i.disk;return(0,o.createComponentVNode)(2,c.Section,{title:"Status",buttons:(0,o.createFragment)(!!u&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:s?0:1})}})],4),0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pods",children:d?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[d," connected"]}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ColourMatrixTester=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ColourMatrixTester=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.colour_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Modify Matrix",children:[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]].map((function(e){return(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:e.map((function(e){return(0,o.createFragment)([e.name,(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{value:l[e.idx],step:.05,minValue:-5,maxValue:5,onDrag:function(t,n){return i("setvalue",{idx:e.idx+1,value:n})}})],0,e.name)}))},e)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){switch(e){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,m);case 3:return(0,o.createComponentVNode)(2,p);case 4:return(0,o.createComponentVNode)(2,f);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}};t.CommunicationsComputer=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.menu_state);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),i(a)]})})};var l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authenticated,u=l.noauthbutton,s=l.esc_section,m=l.esc_callable,p=l.esc_recallable,h=l.esc_status,f=l.authhead,C=l.is_ai,N=l.lastCallLoc,b=!1;return d?1===d?n="Command":2===d?n="Captain":3===d?n="CentComm Officer":4===d?(n="CentComm Secure Connection",b=!0):n="ERROR: Report This Bug!":n="Not Logged In",(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:b&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Access",children:n})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"sign-out-alt":"id-card",selected:d,disabled:u,content:d?"Log Out ("+n+")":"Log In",onClick:function(){return i("auth")}})})})}),!!s&&(0,o.createComponentVNode)(2,a.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!h&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:h}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"rocket",content:"Call Shuttle",disabled:!f,onClick:function(){return i("callshuttle")}})}),!!p&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Recall Shuttle",disabled:!f||C,onClick:function(){return i("cancelshuttle")}})}),!!N&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Last Call/Recall From",children:N})]})})],0)},d=function(e,t){var n=(0,r.useBackend)(t);n.act;return n.data.is_admin?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,s)},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.gamma_armory_location,u=i.admin_levels,m=i.authenticated,p=i.ert_allowed;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"CentComm Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:u,required_access:l,use_confirm:1})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!l,onClick:function(){return c("send_to_cc_announcement_page")}}),4===m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Make Other Announcement",disabled:!l,onClick:function(){return c("make_other_announcement")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Response Team",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!l,onClick:function(){return c("dispatch_ert")}}),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:p,content:p?"ERT calling enabled":"ERT calling disabled",tooltip:p?"Command can request an ERT":"ERTs cannot be requested",disabled:!l,onClick:function(){return c("toggle_ert_allowed")},selected:null})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!l,onClick:function(){return c("send_nuke_codes")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gamma Armory",children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"biohazard",content:d?"Send Gamma Armory":"Recall Gamma Armory",disabled:!l,onClick:function(){return c("move_gamma_armory")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Other",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"coins",content:"View Economy",disabled:!l,onClick:function(){return c("view_econ")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fax",content:"Fax Manager",disabled:!l,onClick:function(){return c("view_fax")}})]})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"View Command accessible controls",children:(0,o.createComponentVNode)(2,s)})],4)},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.msg_cooldown,d=i.emagged,u=i.cc_cooldown,s=i.security_level_color,m=i.str_security_level,p=i.levels,f=i.authcapt,C=i.authhead,N=i.messages,b="Make Priority Announcement";l>0&&(b+=" ("+l+"s)");var V=d?"Message [UNKNOWN]":"Message CentComm",g="Request Authentication Codes";return u>0&&(V+=" ("+u+"s)",g+=" ("+u+"s)"),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Alert",color:s,children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Change Alert",children:(0,o.createComponentVNode)(2,h,{levels:p,required_access:f})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bullhorn",content:b,disabled:!f||l>0,onClick:function(){return c("announce")}})}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",color:"red",content:V,disabled:!f||u>0,onClick:function(){return c("MessageSyndicate")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!f,onClick:function(){return c("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",content:V,disabled:!f||u>0,onClick:function(){return c("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,a.Button,{icon:"bomb",content:g,disabled:!f||u>0,onClick:function(){return c("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,a.Button,{icon:"tv",content:"Change Status Displays",disabled:!C,onClick:function(){return c("status")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,a.Button,{icon:"folder-open",content:"View ("+N.length+")",disabled:!C,onClick:function(){return c("messagelist")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!C,onClick:function(){return c("RestartNanoMob")}})})]})})],4)},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.stat_display,d=i.authhead,u=(i.current_message_title,l.presets.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.name===l.type,disabled:!d,onClick:function(){return c("setstat",{statdisp:e.name})}},e.name)}))),s=l.alerts.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.label,selected:e.alert===l.icon,disabled:!d,onClick:function(){return c("setstat",{statdisp:3,alert:e.alert})}},e.alert)}));return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Presets",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alerts",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_1,disabled:!d,onClick:function(){return c("setmsg1")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:l.line_2,disabled:!d,onClick:function(){return c("setmsg2")}})})]})})},p=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.authhead,u=l.current_message_title,s=l.current_message,m=l.messages;l.security_level;if(u)n=(0,o.createComponentVNode)(2,a.Section,{title:u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Return To Message List",disabled:!d,onClick:function(){return i("messagelist")}}),children:(0,o.createComponentVNode)(2,a.Box,{children:s})});else{var p=m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"eye",content:"View",disabled:!d||u===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"times",content:"Delete",disabled:!d,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)}));n=(0,o.createComponentVNode)(2,a.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:p})})}return(0,o.createComponentVNode)(2,a.Box,{children:n})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.levels,d=e.required_access,u=e.use_confirm,s=i.security_level;return u?l.map((function(e){return(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)})):l.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.icon,content:e.name,disabled:!d||e.id===s,tooltip:e.tooltip,onClick:function(){return c("newalertlevel",{level:e.id})}},e.name)}))},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.is_admin,d=i.possible_cc_sounds;if(!l)return c("main");var u=(0,r.useLocalState)(t,"subtitle",""),s=u[0],m=u[1],p=(0,r.useLocalState)(t,"text",""),h=p[0],f=p[1],C=(0,r.useLocalState)(t,"classified",0),N=C[0],b=C[1],V=(0,r.useLocalState)(t,"beepsound","Beep"),g=V[0],v=V[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Central Command Report",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return c("main")}}),children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:s,onChange:function(e,t){return m(t)},mb:"5px"}),(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:h,onChange:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("make_cc_announcement",{subtitle:s,text:h,classified:N,beepsound:g})}}),(0,o.createComponentVNode)(2,a.Flex,{mt:"5px",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{width:"260px",height:"20px",options:d,selected:g,onSelected:function(e){return v(e)},disabled:N})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"volume-up",mx:"5px",disabled:N,tooltip:"Test sound",onClick:function(){return c("test_sound",{sound:g})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Classified",fluid:!0,tooltip:N?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!N)}})})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CompostBin=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.CompostBin=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.biomass,u=l.compost,s=l.biomass_capacity,m=l.compost_capacity,p=(0,r.useSharedState)(t,"vendAmount",1),h=p[0],f=p[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{label:"Resources",children:[(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Biomass",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[d," / ",s," Units"]})})})}),(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compost",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:m,ranges:{good:[.5*m,Infinity],average:[.25*m,.5*m],bad:[-Infinity,.25*m]},children:[u," / ",m," Units"]})})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:h,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(e,t){return f(t)}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:"5px",textAlign:"right",width:"0%",children:(0,o.createComponentVNode)(2,a.Button,{align:"right",content:"Make Soil",disabled:u<25*h,icon:"arrow-circle-down",onClick:function(){return i("create",{amount:h})}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(228),l=n(3);function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},s=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,a.useBackend)(t),i=r.act,d=r.data;n=d.unauthorized?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):d.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"hidden",children:1===d.page?(0,o.createComponentVNode)(2,h,{height:"100%"}):(0,o.createComponentVNode)(2,C,{height:"100%"})})],4):(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,N,{height:"100%",allMessages:s,finishedTimeout:3e3,onFinished:function(){return i("complete_load_animation")}})});var u=(0,a.useLocalState)(t,"viewingPhoto",""),f=u[0];u[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[f&&(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:n})})]})};var m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.tc_available,d=i.tc_paid_out,u=i.completed_contracts,s=i.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,c.Box,{verticalAlign:"middle",mt:"0.25rem",children:[s," Rep"]})},e,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,c.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"TC Earned",children:[d," TC"]})]})}),(0,o.createComponentVNode)(2,c.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,c.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:u})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===i,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===i,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"shopping-cart"}),"Hub"]})]})))},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,d=l.contracts,s=l.contract_active,m=l.can_extract,p=!!s&&d.filter((function(e){return 1===e.status}))[0],h=p&&p.time_left>0,C=(0,a.useLocalState)(t,"viewingPhoto",""),N=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,c.Button,{disabled:!m||h,icon:"parachute-box",content:["Call Extraction",h&&(0,o.createComponentVNode)(2,i.Countdown,{timeLeft:p.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,c.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return N("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,c.Box,{width:"100%",children:[!!u[e.status]&&(0,o.createComponentVNode)(2,c.Box,{color:u[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:u[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,c.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",f(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!!s,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,c.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},f=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,a=e.objective.locs.target_area_id,i=e.objective.locs.target_coords,l=t===a;return(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(i[1]-n[1],i[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.rep,d=i.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,c.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},N=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,d(t,n);var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,c.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),b=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.slowFactor,u=l.oneWay,s=l.position;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lever position",children:s>0?"forward":s<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:!u,onClick:function(){return i("toggleOneWay")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",onClick:function(){return i("slowFactor",{value:d-5})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-left",onClick:function(){return i("slowFactor",{value:d-1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Slider,{width:"100px",mx:"1px",value:d,fillValue:d,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return i("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-right",onClick:function(){return i("slowFactor",{value:d+1})}})," "]}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",onClick:function(){return i("slowFactor",{value:d+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(30),a=n(21),c=n(1),i=n(2),l=n(68),d=n(43),u=n(3),s=n(38),m=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.possible_levels,d=a.viewing_current_z_level,m=a.is_advanced,p=(0,c.useLocalState)(t,"tabIndex",0),C=p[0],N=p[1];return(0,o.createComponentVNode)(2,u.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,s.FlexItem,{grow:!0,basis:100,children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===C,onClick:function(){return N(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===C,onClick:function(){return N(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),m?(0,o.createComponentVNode)(2,s.FlexItem,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:l,selected:d,onSelected:function(e){return r("switch_level",{new_level:e})}})}):null]})}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,h);case 1:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}}(C)]})})})};var h=function(e,t){var n=(0,c.useBackend)(t),u=n.act,s=n.data,h=(0,r.sortBy)((function(e){return e.name}))(s.crewmembers||[]),f=(0,c.useLocalState)(t,"search",""),C=f[0],N=f[1],b=(0,a.createSearch)(C,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Location"})]}),h.filter(b).map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:p(e,s.critThreshold),children:m(e,s.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:["(",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:d.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?s.isAI?(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return u("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"grey",children:"Not Available"})})]},e.name)}))]})]})},f=function(e,t){var n=(0,c.useBackend)(t).data,r=(0,c.useLocalState)(t,"zoom",1),a=r[0],l=r[1];return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return l(e)},children:n.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:a,icon:"circle",tooltip:e.name+" ("+e.assignment+")",color:p(e,n.critThreshold)},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,s=d.isOperating,m=d.hasOccupant,p=d.occupant,h=void 0===p?[]:p,f=d.cellTemperature,C=d.cellTemperatureStatus,N=d.isBeakerLoaded,b=d.cooldownProgress,V=d.auto_eject_healthy,g=d.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectOccupant")},disabled:!m,children:"Eject"}),children:m?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[h.stat][0],children:l[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),i.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Cell",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return c("ejectBeaker")},disabled:!N,children:"Eject Beaker"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return c(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dosage interval",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{average:[-Infinity,99],good:[99,Infinity]},color:!N&&"average",value:b,minValue:0,maxValue:100})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:V?"toggle-on":"toggle-off",selected:V,onClick:function(){return c(V?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:V?"On":"Off"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,o.createComponentVNode)(2,a.Button,{icon:g?"toggle-on":"toggle-off",selected:g,onClick:function(){return c(g?"auto_eject_dead_off":"auto_eject_dead_on")},children:g?"On":"Off"})})]})})],4)},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.isBeakerLoaded,l=c.beakerLabel,d=c.beakerVolume;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:!l&&"average",children:l||"No label"}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",float:"right",color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})],4):(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"bad",children:"No beaker loaded"})}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(21);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,i=n.account_name,u=n.allow_items;return(0,o.createComponentVNode)(2,c.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Hello, "+(i||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!u&&(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored crew!"})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.frozen_items,d=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,i.toTitleCase)(t)};return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Stored Items",children:l.length?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:d(e.name),buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return c("one_item",{item:e.uid})}})},e)}))})}),(0,o.createComponentVNode)(2,a.Button,{content:"Drop All Items",color:"red",onClick:function(){return c("all_items")}})],4):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,a=(0,r.useBackend)(t),l=(a.act,a.data),d=l.irradiating,u=l.dnaBlockSize,p=l.occupant;return t.dnaBlockSize=u,t.isDNAInvalid=!p.isViableSubject||!p.uniqueIdentity||!p.structuralEnzymes,d&&(n=(0,o.createComponentVNode)(2,g,{duration:d})),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),n,(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m)]})]})};var s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.locked,u=i.hasOccupant,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Engaged":"Disengaged",onClick:function(){return c("toggleLock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||d,icon:"user-slash",content:"Eject",onClick:function(){return c("ejectOccupant")}})],4),children:u?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:s.minHealth,max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:s.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:i.occupant.uniqueEnzymes?i.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Cell unoccupied."})})},m=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,u=l.selectedMenuKey,s=l.hasOccupant;l.occupant;return s?t.isDNAInvalid?(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,f)],4):"se"===u?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===u?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===u&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,a.Tabs,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:u===e[0],onClick:function(){return i("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedUIBlock,d=i.selectedUISubBlock,u=i.selectedUITarget,s=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:s.uniqueIdentity,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:u,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return c("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return c("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.selectedSEBlock,d=i.selectedSESubBlock,u=i.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.structuralEnzymes,selectedBlock:l,selectedSubblock:d,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return c("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.radiationIntensity,d=i.radiationDuration;return(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:d,popUpPosition:"right",ml:"0",onChange:function(e,t){return c("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return c("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,N,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Buffers",level:"2",children:c}),(0,o.createComponentVNode)(2,b)],4)},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.id,d=e.name,u=e.buffer,s=i.isInjectorReady,m=d+(u.data?" - "+u.label:"");return(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:m,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!u.data,icon:"trash",content:"Clear",onClick:function(){return c("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data,icon:"pen",content:"Rename",onClick:function(){return c("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u.data||!i.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return c("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return c("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!i.hasDisk||!i.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return c("bufferOption",{option:"loadDisk",id:l})}})]}),!!u.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:u.owner||(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===u.type?"Unique Identifiers":"Structural Enzymes",!!u.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:s?"syringe":"spinner",iconSpin:!s,content:"Block Injector",mb:"0",onClick:function(){return c("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return c("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!u.data&&(0,o.createComponentVNode)(2,a.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.hasDisk,d=i.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l||!d.data,icon:"trash",content:"Wipe",onClick:function(){return c("wipeDisk")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectDisk")}})],4),children:l?d.data?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Label",children:d.label?d.label:"No label"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Subject",children:d.owner?d.owner:(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},V=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.isBeakerLoaded,d=i.beakerVolume,s=i.beakerLabel;return(0,o.createComponentVNode)(2,a.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return c("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inject",children:[u.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:e>d,icon:"syringe",content:e,onClick:function(){return c("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,a.Button,{disabled:d<=0,icon:"syringe",content:"All",onClick:function(){return c("injectRejuvenators",{amount:d})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:s||"No label"}),d?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[d," unit",1===d?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,a.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=(n.data,e.dnaString),l=e.selectedBlock,d=e.selectedSubblock,u=e.blockSize,s=e.action,m=i.split(""),p=[],h=function(e){for(var t=e/u+1,n=[],r=function(r){var i=r+1;n.push((0,o.createComponentVNode)(2,a.Button,{selected:l===t&&d===i,content:m[e+r],mb:"0",onClick:function(){return c(s,{block:t,subblock:i})}}))},i=0;ii.spawnpoints?"red":"green",children:[i.total," total, versus ",i.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,a.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert",{silent:u})}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.ert_request_messages;return(0,o.createComponentVNode)(2,a.Section,{children:l&&l.length?l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.time,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.sender_real_name,onClick:function(){return c("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel"}),children:e.message},(0,i.decodeHtmlEntities)(e.time))})):(0,o.createComponentVNode)(2,a.Box,{fluid:!0,italic:!0,textAlign:"center",children:"No ERT requests"})})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=(n.data,(0,r.useLocalState)(t,"text","")),l=i[0],d=i[1];return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:l,onChange:function(e,t){return d(t)}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:"5px",textAlign:"center",onClick:function(){return c("deny_ert",{reason:l})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.EconomyManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(44);t.EconomyManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.next_payroll_time;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Global",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"global"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Department Members",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"department_members"})}})}),(0,o.createComponentVNode)(2,l.LabeledListItem,{label:"Single Accounts",children:(0,o.createComponentVNode)(2,a.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return c("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.Box,{mb:.5,children:["Next Payroll in: ",i," Minutes"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return c("delay_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){return c("set_payroll")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return c("accelerate_payroll")}})]}),(0,o.createComponentVNode)(2,a.NoticeBox,{children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons"]})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Electropack=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.power,s=d.code,m=d.frequency,p=d.minFrequency,h=d.maxFrequency;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,c.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:p/10,maxValue:h/10,value:m/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:s,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3),l=n(48),d=n(30);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.evo_points,d=i.can_respec;return(0,o.createComponentVNode)(2,c.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createComponentVNode)(2,c.Button,{ml:2.5,disabled:!d,content:"Readapt",icon:"sync",onClick:function(){return r("readapt")}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,u=n.data,s=u.evo_points,m=u.ability_tabs,p=u.purchased_abilities,h=u.view_mode,f=(0,a.useLocalState)(t,"selectedTab",m[0]),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"ability_tabs",m[0].abilities),y=v[0],_=v[1],x=function(e){if(g(e),""===e)return _(C.abilities);_(function(e,t){if(void 0===t&&(t=""),!e||0===e.length)return[];var n=(0,r.createSearch)(t,(function(e){return e.name+"|"+e.description}));return(0,l.flow)([(0,d.filter)((function(e){return null==e?void 0:e.name})),(0,d.filter)(n),(0,d.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(m.map((function(e){return e.abilities})).flat(),e))};return(0,o.createComponentVNode)(2,c.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(e,t){x(t)},value:V}),(0,o.createComponentVNode)(2,c.Button,{icon:h?"square-o":"check-square-o",selected:!h,content:"Compact",onClick:function(){return i("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,c.Button,{icon:h?"check-square-o":"square-o",selected:h,content:"Expanded",onClick:function(){return i("set_view_mode",{mode:1})}})],4),children:[(0,o.createComponentVNode)(2,c.Tabs,{children:m.map((function(e){return(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:""===V&&C===e,onClick:function(){!function(e){N(e),_(e.abilities),g("")}(e)},children:e.category},e)}))}),y.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,c.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),p.includes(e.power_path)&&(0,o.createComponentVNode)(2,c.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,c.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,o.createComponentVNode)(2,c.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,c.Button,{mr:.5,disabled:e.cost>s||p.includes(e.power_path),content:"Evolve",onClick:function(){return i("purchase",{power_path:e.power_path})}})})]}),!!h&&(0,o.createComponentVNode)(2,c.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(10),a=n(21),c=n(1),i=n(2),l=n(228),d=n(3),u=["id","amount","lineDisplay","onClick"];var s={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data.building);return(0,o.createComponentVNode)(2,d.Window,{children:(0,o.createComponentVNode)(2,d.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),r&&(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,f)})]})})]})})})};var m=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.materials,d=a.capacity,u=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,i.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.25rem",children:[(u/d*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,C,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,c.useBackend)(t),r=n.act,l=n.data,d=l.curCategory,u=l.categories,s=l.designs,m=l.syncing,p=(0,c.useLocalState)(t,"searchText",""),h=p[0],f=p[1],C=(0,a.createSearch)(h,(function(e){return e.name})),b=s.filter(C);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,i.Dropdown,{selected:d,options:u,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,i.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:m,iconSpin:m,icon:"sync-alt",content:m?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),b.map((function(e){return(0,o.createComponentVNode)(2,N,{design:e},e.id)})),0===b.length&&(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No designs found."})]})},h=function(e,t){var n=(0,c.useBackend)(t),r=(n.act,n.data),a=r.building,d=r.buildStart,u=r.buildEnd,s=r.worldTime;return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar.Countdown,{start:d,current:s,end:u,bold:!0,children:[(0,o.createComponentVNode)(2,i.Box,{float:"left",children:(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:!0})}),"Building ",a,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:s,timeLeft:u-s,format:function(e,t){return t.substr(3)}}),")"]})})},f=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=a.queue,d=a.processingQueue,u=Object.entries(a.queueDeficit).filter((function(e){return e[1]<0})),s=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,i.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Processing time:",(0,o.createComponentVNode)(2,i.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,i.Box,{display:"inline",bold:!0,children:new Date(s/10*1e3).toISOString().substr(14,5)})]}),Object.keys(u).length>0&&(0,o.createComponentVNode)(2,i.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,i.Divider),"Lacking materials to complete:",u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},C=function(e,t){var n=(0,c.useBackend)(t),a=(n.act,n.data),l=e.id,d=e.amount,m=e.lineDisplay,p=e.onClick,h=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,u),f=l.replace("$",""),C=a.materials[l]||0,N=d||C;if(!(N<=0&&"metal"!==f&&"glass"!==f)){var b=d&&d>C;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",m&&"Exofab__material--line"])},h,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,i.Button,{onClick:p,children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[f]||f)+".png"})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:m?(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",color:b&&"bad",children:N.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--name",children:f}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__material--amount",children:[N.toLocaleString("en-US")," cm\xb3 (",Math.round(N/2e3*10)/10," ","sheets)"]})],4)})]})))}},N=function(e,t){var n=(0,c.useBackend)(t),r=n.act,a=n.data,l=e.design;return(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:l.notEnough||a.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,C,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,i.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ExternalAirlockController=function(e,t){var n,i,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.chamber_pressure,m=(u.exterior_status,u.interior_status),p=u.processing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:(n=s,i="good",n<80?i="bad":n<95||n>110?i="average":n>120&&(i="bad"),i),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:p,onClick:function(){return d("cycle_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:p,onClick:function(){return d("cycle_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_ext")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===m?"red":p?"yellow":null,onClick:function(){return d("force_int")}})]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Abort",icon:"ban",color:"red",disabled:!p,onClick:function(){return d("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return i("scan")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:l.nologin,content:l.realauth?"Log Out":"Log In",onClick:function(){return i("auth")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,a.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return i("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return i("rename")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return i("dept")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,a.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return i("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FilingCabinet=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.FilingCabinet=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=n.config,u=l.contents,s=d.title;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" The ",s," is empty. "]}),!!u&&u.slice().map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"80%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){return i("retrieve",{index:e.index})}})})]},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,e.image),c=e.isSelected,i=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+a,style:{"border-style":c?"solid":"none","border-width":"2px","border-color":"orange",padding:c?"2px":"4px"},onClick:i})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.availableStyles,s=d.selectedStyle,m=d.selectedDir,p=d.directionsPreview,h=d.allStylesPreview;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:s,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,a.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,i,{image:h[e],isSelected:s===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,a.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,a.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,a.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,i,{image:p[e],isSelected:e===m,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,a.useBackend)(t).data,r=n.emped,l=n.active,p=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,d,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,u)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{area:p,position:h})}),f&&(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,s,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,c.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,m,{height:"100%"})})],0):(0,o.createComponentVNode)(2,d)],0)})})})};var d=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,c.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.active,d=i.tag,u=i.same_z,s=(0,a.useLocalState)(t,"newTag",d),m=s[0],p=s[1];return(0,o.createComponentVNode)(2,c.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,c.Input,{width:"5rem",value:d,onEnter:function(){return r("tag",{newtag:m})},onInput:function(e,t){return p(t)}}),(0,o.createComponentVNode)(2,c.Button,{disabled:d===m,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:m})},children:(0,o.createComponentVNode)(2,c.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"compress":"expand",content:u?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},s=function(e,t){var n=e.title,r=e.area,a=e.position;return(0,o.createComponentVNode)(2,c.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,c.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(a)]})})},m=function(e,t){var n=(0,a.useBackend)(t).data,i=n.position,d=n.signals;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,c.Table,{children:d.map((function(e){return Object.assign({},e,function(e,t){if(e&&t){if(e[2]!==t[2])return null;var n=Math.atan2(t[1]-e[1],t[0]-e[0]),o=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(n),distance:o}}}(i,e.position))})).map((function(e,t){return(0,o.createComponentVNode)(2,c.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,c.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,c.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,c.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,c.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GeneModder=void 0;var o=n(0),r=n(1),a=n(2),c=n(28),i=n(3);t.GeneModder=function(e,t){var n=(0,r.useBackend)(t).data.has_seed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,c.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Genes",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Insert Gene from Disk",disabled:!i||!i.can_insert||i.is_core,icon:"arrow-circle-down",onClick:function(){return c("insert")}}),children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,p)]})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"leaf",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.has_seed,s=d.seed,m=d.has_disk,p=d.disk;return n=u?(0,o.createComponentVNode)(2,a.Flex.Item,{mb:"-6px",mt:"-4px",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{content:s.name,onClick:function(){return l("eject_seed")}}),(0,o.createComponentVNode)(2,a.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return l("variant_name")}})]}):(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"None",onClick:function(){return l("eject_seed")}})}),c=m?p.name:"None",(0,o.createComponentVNode)(2,a.Section,{title:"Storage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Plant Sample",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Data Disk",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:c,onClick:function(){return l("eject_disk")}})})})]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.disk,d=i.core_genes;return(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core Genes",open:!0,children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=l&&l.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Replace",disabled:!e.is_type||!l.can_insert,icon:"arrow-circle-down",onClick:function(){return c("replace",{id:e.id})}})})]},e)}))},"Core Genes")},m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.reagent_genes,c=n.has_reagent;return(0,o.createComponentVNode)(2,h,{title:"Reagent Genes",gene_set:a,do_we_show:c})},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.trait_genes,c=n.has_trait;return(0,o.createComponentVNode)(2,h,{title:"Trait Genes",gene_set:a,do_we_show:c})},h=function(e,t){var n=e.title,c=e.gene_set,i=e.do_we_show,l=(0,r.useBackend)(t),d=l.act,u=l.data.disk;return(0,o.createComponentVNode)(2,a.Collapsible,{title:n,open:!0,children:i?c.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{py:"2px",className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"100%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{pr:"5px",children:(0,o.createComponentVNode)(2,a.Button,{content:"Extract",disabled:!(null!=u&&u.can_extract),icon:"save",onClick:function(){return d("extract",{id:e.id})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"times",onClick:function(){return d("remove",{id:e.id})}})})]},e)})):(0,o.createComponentVNode)(2,a.Flex.Item,{children:"No Genes Detected"})},n)}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),a=n(3),c=n(168);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,c.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,d=n.medical,u=n.diagnostic,s=n.radioactivity,m=n.ahud;return(0,o.createComponentVNode)(2,c.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,i,{label:"Medical",type:"medical",is_active:d}),(0,o.createComponentVNode)(2,i,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,i,{label:"Diagnostic",type:"diagnostic",is_active:u}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,i,{label:"Antag HUD",is_active:m,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var i=function(e,t){var n=(0,r.useBackend)(t).act,c=e.label,i=e.type,l=void 0===i?null:i,d=e.is_active,u=e.act_on,s=void 0===u?"hud_on":u,m=e.act_off,p=void 0===m?"hud_off":m;return(0,o.createComponentVNode)(2,a.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{mr:.6,content:d?"On":"Off",icon:d?"toggle-on":"toggle-off",selected:d,onClick:function(){return n(d?p:s,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,c.Window,{theme:"abductor",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return i("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGen=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.GravityGen=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data,u=d.charging_state,s=d.charge_count,m=d.breaker,p=d.ext_power;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[function(e){if(e>0)return(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,p:1.5,children:[(0,o.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}(u),(0,o.createComponentVNode)(2,a.Section,{title:"Generator Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"power-off":"times",content:m?"Online":"Offline",color:m?"green":"red",px:1.5,onClick:function(){return l("breaker")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power Status",color:p?"good":"bad",children:(n=u,n>0?(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"average",children:["[ ",1===n?"Charging":"Discharging"," ]"]}):(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:p?"good":"bad",children:["[ ",p?"Powered":"Unpowered"," ]"]}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:s/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GuestPass=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(100);t.GuestPass=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"id-card",selected:!d.showlogs,onClick:function(){return l("mode",{mode:0})},children:"Issue Pass"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{icon:"scroll",selected:d.showlogs,onClick:function(){return l("mode",{mode:1})},children:["Records (",d.issue_log.length,")"]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.scan_name?"eject":"id-card",selected:d.scan_name,content:d.scan_name?d.scan_name:"-----",tooltip:d.scan_name?"Eject ID":"Insert ID",onClick:function(){return l("scan")}})})})}),!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issue Guest Pass",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Issue To",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.giv_name?d.giv_name:"-----",disabled:!d.scan_name,onClick:function(){return l("giv_name")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reason",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.reason?d.reason:"-----",disabled:!d.scan_name,onClick:function(){return l("reason")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pencil-alt",content:d.duration?d.duration:"-----",disabled:!d.scan_name,onClick:function(){return l("duration")}})})]}),!!d.scan_name&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.AccessList,{grantableList:d.grantableList,accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return l("access",{access:e})},grantAll:function(){return l("grant_all")},denyAll:function(){return l("clear_all")},grantDep:function(e){return l("grant_region",{region:e})},denyDep:function(e){return l("deny_region",{region:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",content:d.printmsg,disabled:!d.canprint,onClick:function(){return l("issue")}})],4)]}),!!d.showlogs&&(0,o.createComponentVNode)(2,a.Section,{title:"Issuance Log",children:!!d.issue_log.length&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:d.issue_log.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:e},t)}))}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:!d.scan_name,onClick:function(){return l("print")}})],4)||(0,o.createComponentVNode)(2,a.Box,{children:"None."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.amount,u=l.energy,s=l.maxEnergy,m=l.mode;return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:s,ranges:{good:[.5*s,Infinity],average:[.25*s,.5*s],bad:[-Infinity,.25*s]},children:[u," / ",s," Units"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",spacing:"1",children:i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:d===e,content:e,m:"0",width:"100%",onClick:function(){return c("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"dispense"===m,content:"Dispense",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"remove"===m,content:"Remove",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"cog",selected:"isolate"===m,content:"Isolate",m:"0",width:"32%",onClick:function(){return c("mode",{mode:"isolate"})}})]})})]})})},d=function(e,t){for(var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.chemicals,d=void 0===l?[]:l,u=i.current_reagent,s=[],m=0;m<(d.length+1)%3;m++)s.push(!0);return(0,o.createComponentVNode)(2,a.Section,{title:i.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:u===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return c("dispense",{reagent:e.id})}})},t)})),s.map((function(e,t){return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.HealthSensor=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.HealthSensor=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.on,m=u.user_health,p=u.minHealth,h=u.maxHealth,f=u.alarm_health;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Scanning",children:(0,o.createComponentVNode)(2,c.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return d("scan_toggle")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health activation",children:(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:p,maxValue:h,value:f,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return d("alarm_health",{alarm_health:t})}})}),null!==m&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"User health",children:(0,o.createComponentVNode)(2,c.Box,{color:l(m),bold:m>=100,children:(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:m})})})]})})})})};var l=function(e){return e>50?"green":e>0?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=(n(28),n(44));t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.decks,s=d.current_deck,m=d.ai_override,p=d.emagged;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Holodeck Control System",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",s]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Available Programs",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{block:!0,content:e,selected:e===s,onClick:function(){return l("select_deck",{deck:e})}},e)})),Boolean(p)&&(0,o.createComponentVNode)(2,a.Button,{content:"Wildlife Simulation",color:"red",onClick:function(){return l("wildlifecarp")}}),(0,o.createVNode)(1,"hr"),(0,o.createComponentVNode)(2,a.LabeledList,{children:[Boolean(m)&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Override Protocols",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){return l("ai_override")}})}),(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Safety Protocols",children:(0,o.createComponentVNode)(2,a.Box,{color:p?"bad":"good",children:p?"Off":"On"})})]})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),a=n(2),c=n(44),i=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.implant,s=d.contains_case;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Bio-chip Mini-Computer",children:[u&&s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),u.name]}),(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Life",children:u.life}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Notes",children:u.notes}),(0,o.createComponentVNode)(2,c.LabeledListItem,{label:"Function",children:u["function"]})]})],4):s?(0,o.createComponentVNode)(2,a.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,a.Box,{children:"Please insert a bio-chip casing!"}),(0,o.createComponentVNode)(2,a.Button,{mt:2,content:"Eject Case",icon:"eject",disabled:!s,onClick:function(){return l("eject_case")}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.Instrument=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,s)]})]})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes separated by hyphens\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("as defined above.")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("and in\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("scale.")],0),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("or\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen:"),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A"),(0,o.createTextVNode)(" "),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,c.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,c.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},d=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data,d=l.lines,s=l.playing,m=l.repeat,p=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,N=l.tickLag,b=l.volume,V=l.minVolume,g=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,c.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"info",content:"Help",onClick:function(){return i("help")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file",content:"New",onClick:function(){return i("newsong")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Import",onClick:function(){return i("import")}})],4),children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,disabled:0===d.length||m<0,icon:"play",content:"Play",onClick:function(){return i("play")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!s,icon:"stop",content:"Stop",onClick:function(){return i("stop")}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:0,maxValue:p,value:m,stepPixelSize:59,onChange:function(e,t){return i("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return i("tempo",{"new":h+N})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,c.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return i("tempo",{"new":h-N})}})]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:V,maxValue:g,value:b,stepPixelSize:6,onDrag:function(e,t){return i("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,u)]})},u=function(e,t){var n,i,l=(0,a.useBackend)(t),d=l.act,u=l.data,s=u.allowedInstrumentNames,m=u.instrumentLoaded,p=u.instrument,h=u.canNoteShift,f=u.noteShift,C=u.noteShiftMin,N=u.noteShiftMax,b=u.sustainMode,V=u.sustainLinearDuration,g=u.sustainExponentialDropoff,v=u.legacy,y=u.sustainDropoffVolume,_=u.sustainHeldNote;return 1===b?(n="Linear",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:.1,maxValue:5,value:V,step:.5,stepPixelSize:85,format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return d("setlinearfalloff",{"new":t/10})}})):2===b&&(n="Exponential",i=(0,o.createComponentVNode)(2,c.Slider,{minValue:1.025,maxValue:10,value:g,step:.01,format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return d("setexpfalloff",{"new":t})}})),s.sort(),(0,o.createComponentVNode)(2,c.Box,{my:-1,children:(0,o.createComponentVNode)(2,c.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,c.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current",children:m?(0,o.createComponentVNode)(2,c.Dropdown,{options:s,selected:p,width:"40%",onSelected:function(e){return d("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:C,maxValue:N,value:f,stepPixelSize:2,format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return d("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,c.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return d("setsustainmode",{"new":e})}}),i]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,c.Slider,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,t){return d("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,c.Button,{selected:_,icon:_?"toggle-on":"toggle-off",content:_?"Yes":"No",onClick:function(){return d("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,c.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return d("reset")}})]})})})},s=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.playing,d=i.lines,u=i.editing;return(0,o.createComponentVNode)(2,c.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!u||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:d.length+1})}}),(0,o.createComponentVNode)(2,c.Button,{selected:!u,icon:u?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!u&&(d.length>0?(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=(0,o.createComponentVNode)(2,a.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,a.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?u=(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(u=(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Waiting for second person to confirm..."})):u=(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,a.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return i("ert")}})})}),(0,o.createComponentVNode)(2,a.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return i("reset")}}),children:u})]})})}return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[d,(0,o.createComponentVNode)(2,a.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return i("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,a.Button,{icon:"broadcast-tower",onClick:function(){return i("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"door-open",onClick:function(){return i("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,a.Button,{icon:"door-closed",onClick:function(){return i("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KitchenMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(167);t.KitchenMachine=function(e,t){var n=(0,r.useBackend)(t),d=n.data,u=n.config,s=d.ingredients,m=d.operating,p=u.title;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Operating,{operating:m,name:p}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Section,{title:"Ingredients",flexGrow:1,children:(0,o.createComponentVNode)(2,a.Table,{className:"Ingredient__Table",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{tr:5,children:[(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.name}),2),(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]}),2)]},e.name)}))})})]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.inactive,d=i.tooltip;return(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return c("cook")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?d:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return c("eject")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.isAdmin,m=u.isSlaved,p=u.isMalf,h=u.isAIMalf,f=u.view;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!(!s||!m)&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:["This unit is slaved to ",m,"."]}),!(!p&&!h)&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Law Management",selected:0===f,onClick:function(){return d("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Lawsets",selected:1===f,onClick:function(){return d("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,i),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.has_zeroth_laws,u=i.zeroth_laws,s=i.has_ion_laws,m=i.ion_laws,p=i.ion_law_nr,h=i.has_inherent_laws,f=i.inherent_laws,C=i.has_supplied_laws,N=i.supplied_laws,b=i.channels,V=i.channel,g=i.isMalf,v=i.isAdmin,y=i.zeroth_law,_=i.ion_law,x=i.inherent_law,k=i.supplied_law,L=i.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,d,{title:"ERR_NULL_VALUE",laws:u,ctx:t}),!!s&&(0,o.createComponentVNode)(2,d,{title:p,laws:m,ctx:t}),!!h&&(0,o.createComponentVNode)(2,d,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,d,{title:"Supplied",laws:N,ctx:t}),(0,o.createComponentVNode)(2,a.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Statement Channel",children:b.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.channel,selected:e.channel===V,onClick:function(){return c("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,a.Button,{content:"State Laws",onClick:function(){return c("state_laws")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,a.Button,{content:"Notify",onClick:function(){return c("notify_laws")}})})]})}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_zeroth_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:_}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_ion_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_inherent_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:L,onClick:function(){return c("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("change_supplied_law")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Add",icon:"plus",onClick:function(){return c("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.law_sets;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Load Laws",icon:"download",onClick:function(){return c("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},d=function(e,t){var n=(0,r.useBackend)(e.ctx),c=n.act,i=n.data.isMalf;return(0,o.createComponentVNode)(2,a.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return c("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return c("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return c("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28),l=n(38);t.LibraryComputer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,s)]})]})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.selected_rating,d=Array(10).fill().map((function(e,t){return 1+t}));return(0,o.createComponentVNode)(2,a.Flex,{children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{bold:!0,icon:"star",color:i>=e?"caution":"default",onClick:function(){return c("set_rating",{rating_value:e})}})},t)})),(0,o.createComponentVNode)(2,l.FlexItem,{bold:!0,ml:2,fontSize:"150%",children:[i+"/10",(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",0),i=c[0],l=c[1],d=n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===i,onClick:function(){return l(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Book Archives"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Corporate Literature"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Upload Book"]}),1===d&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===i,onClick:function(){return l(3)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Patron Manager"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:4===i,onClick:function(){return l(4)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"Inventory"]})]})},s=function(e,t){switch((0,r.useLocalState)(t,"tabIndex",0)[0]){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,f);case 3:return(0,o.createComponentVNode)(2,C);case 4:return(0,o.createComponentVNode)(2,N);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.searchcontent,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Flex,{"flex-direction":"row",children:[(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.title||"Input Title",onClick:function(){return(0,i.modalOpen)(t,"edit_search_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",width:"auto",content:u.author||"Input Author",onClick:function(){return(0,i.modalOpen)(t,"edit_search_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Ratings",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{mr:1,width:"min-content",content:u.ratingmin,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmin")}})}),(0,o.createComponentVNode)(2,l.FlexItem,{children:"To"}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.Button,{ml:1,width:"min-content",content:u.ratingmax,onClick:function(){return(0,i.modalOpen)(t,"edit_search_ratingmax")}})})]})})]})]}),(0,o.createComponentVNode)(2,l.FlexItem,{width:"40%",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,width:"190px",options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_search_category",{category_id:p[e]})}})})})}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return c("toggle_search_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Search",icon:"eraser",onClick:function(){return c("clear_search")}}),u.ckey?(0,o.createComponentVNode)(2,a.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return c("clear_ckey_search")}}):(0,o.createComponentVNode)(2,a.Button,{content:"Find My Books",icon:"search",onClick:function(){return c("find_users_books",{user_ckey:m})}})]})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.external_booklist,u=l.archive_pagenumber,s=l.num_pages,p=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Book System Access",children:[(0,o.createComponentVNode)(2,m),(0,o.createVNode)(1,"hr"),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-left",disabled:1===u,onClick:function(){return c("deincrementpagemax")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-left",disabled:1===u,onClick:function(){return c("deincrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{bold:!0,content:u,onClick:function(){return(0,i.modalOpen)(t,"setpagenumber")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",disabled:u===s,onClick:function(){return c("incrementpage")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"angle-double-right",disabled:u===s,onClick:function(){return c("incrementpagemax")}})],4),(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Ratings"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Category"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===p&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_external_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},e.id)}))]})]})},h=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.programmatic_booklist,u=l.login_state;return(0,o.createComponentVNode)(2,a.Section,{title:"Corporate Book Catalog",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Actions"})]}),d.map((function(e,n){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book",mr:2}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[1===u&&(0,o.createComponentVNode)(2,a.Button,{content:"Order",icon:"print",onClick:function(){return c("order_programmatic_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"More...",onClick:function(){return(0,i.modalOpen)(t,"expand_info",{bookid:e.id})}})]})]},n)}))]})})},f=function(e,t){var n=(0,r.useBackend)(t),c=n.act,d=n.data,u=d.selectedbook,s=d.book_categories,m=d.user_ckey,p=[];return s.map((function(e){return p[e.description]=e.category_id})),(0,o.createComponentVNode)(2,a.Section,{title:"Book System Upload",children:[u.copyright?(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Uploader"]}),(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.title,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_title")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Button,{textAlign:"left",icon:"pen",disabled:u.copyright,content:u.author,onClick:function(){return(0,i.modalOpen)(t,"edit_selected_author")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Categories",children:(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Dropdown,{mt:.6,options:s.map((function(e){return e.description})),onSelected:function(e){return c("toggle_upload_category",{category_id:p[e]})}})})})]}),(0,o.createVNode)(1,"br"),s.filter((function(e){return u.categories.includes(e.category_id)})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.description,disabled:u.copyright,selected:!0,icon:"unlink",onClick:function(){return c("toggle_upload_category",{category_id:e.category_id})}},e.category_id)}))]}),(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:(0,o.createComponentVNode)(2,a.Button,{icon:"pen",width:"auto",disabled:u.copyright,content:"Edit Summary",onClick:function(){return(0,i.modalOpen)(t,"edit_selected_summary")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:u.summary})]})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,mt:16,icon:"upload",width:"auto",disabled:u.copyright,content:"Upload Book",onClick:function(){return c("uploadbook",{user_ckey:m})}})]})},C=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.checkout_data;return(0,o.createComponentVNode)(2,a.Section,{title:"Checked Out Books",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Patron"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time Left"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actions"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-tag"}),e.patron_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.title}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:(0,o.createComponentVNode)(2,a.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return c("reportlost",{libraryid:e.libraryid})}})})]},t)}))]})})},N=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.inventory_list);return(0,o.createComponentVNode)(2,a.Section,{title:"Library Inventory",children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"LIB ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"})]}),c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.libraryid}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"})," ",e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},t)}))]})})};(0,i.modalRegisterBodyOverride)("expand_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=e.args,u=l.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:d.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:d.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Summary",children:d.summary}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[d.rating,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!d.isProgrammatic&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Categories",children:d.categories.join(", ")})]}),(0,o.createVNode)(1,"br"),u===d.ckey&&(0,o.createComponentVNode)(2,a.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:d.isProgrammatic,onClick:function(){return c("delete_book",{bookid:d.id,user_ckey:u})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Report Book",icon:"flag",color:"red",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"report_book",{bookid:d.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:d.isProgrammatic,onClick:function(){return(0,i.modalOpen)(t,"rate_info",{bookid:d.id})}})]})})),(0,i.modalRegisterBodyOverride)("report_book",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,d=i.selected_report,u=i.report_categories,s=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Report this book for Rule Violations",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Reasons",children:(0,o.createComponentVNode)(2,a.Box,{children:u.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.description,selected:e.category_id===d,onClick:function(){return c("set_report",{report_type:e.category_id})}}),(0,o.createVNode)(1,"br")],4,t)}))})})]}),(0,o.createComponentVNode)(2,a.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return c("submit_report",{bookid:l.id,user_ckey:s})}})]})})),(0,i.modalRegisterBodyOverride)("rate_info",(function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.args,u=i.user_ckey;return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:l.title}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:l.author}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Rating",children:[l.current_rating?l.current_rating:0,(0,o.createComponentVNode)(2,a.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Ratings",children:l.total_ratings?l.total_ratings:0})]}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return c("rate_book",{bookid:l.id,user_ckey:u})}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.LibraryManager=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(28);t.LibraryManager=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,l)})]})};var l=function(e,t){var n=(0,r.useBackend)(t);n.act;switch(n.data.pagestate){case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,u);default:return"WE SHOULDN'T BE HERE!"}},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.4rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,i.modalOpen)(t,"specify_ssid_delete")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_delete")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,i.modalOpen)(t,"specify_ckey_search")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return c("view_reported_books")}})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.reports;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"All Reported Books",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Uploader CKEY"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Report Type"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reporter Ckey"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.uploader_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.report_description}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:e.reporter_ckey}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return c("unflag_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.ckey,d=i.booklist;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Table,{className:"Library__Booklist",children:[(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.2rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,o.createVNode)(1,"br"),"Books uploaded by ",l,(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return c("return")}}),(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"SSID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Title"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Author"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"book"}),e.title]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"left",children:e.author}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return c("delete_book",{bookid:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"View",onClick:function(){return c("view_book",{bookid:e.id})}})]})]},e.id)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ListInput=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(99),d=0;t.ListInput=function(e,t){var n=(0,a.useBackend)(t),r=n.act,s=n.data,m=s.title,p=s.message,h=s.buttons,f=s.timeout,C=(0,a.useLocalState)(t,"search_bar",!0),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"displayed_array",h),g=V[0],v=V[1],y=(0,a.useLocalState)(t,"search_array",[]),_=y[0],x=y[1],k=(0,a.useLocalState)(t,"search_index",0),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"last_char_code",null),S=B[0],I=B[1],T=(0,a.useLocalState)(t,"selected_button",h[0]),A=T[0],E=T[1];return(0,o.createComponentVNode)(2,i.Window,{title:m,resizable:!0,children:[f!==undefined&&(0,o.createComponentVNode)(2,u,{value:f}),(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Layout__content--flexColumn",height:"100%",mb:"7px",children:(0,o.createComponentVNode)(2,c.Section,{className:"ListInput__Section",flexGrow:"1",scrollable:!0,fill:!0,title:p,tabIndex:1,onKeyDown:function(e){if(e.preventDefault(),!(d>performance.now())){if(d=performance.now()+125,e.keyCode===l.ARROW_KEY_UP||e.keyCode===l.ARROW_KEY_DOWN){var t=1;e.keyCode===l.ARROW_KEY_UP&&(t=-1);for(var n=0;n=h.length&&(n=0),E(h[n]),I(null),void document.getElementById(h[n]).focus()}var o=String.fromCharCode(e.keyCode).toLowerCase();if(o){var r;if(o===S&&_.length>0){var a=L+1;a<_.length?(r=_[a],w(a)):(r=_[0],w(0))}else{var c=g.filter((function(e){return e.substring(0,1).toLowerCase()===o}));c.length>0&&(x(c),w(0),r=c[0])}r&&(I(o),E(r),document.getElementById(r).focus())}}},buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"search",color:"transparent",selected:N,tooltip:"Search...",tooltipPosition:"left",onClick:function(){b(!N),v(h)},compact:!0}),children:(0,o.createComponentVNode)(2,c.Flex,{wrap:"wrap",overflowX:"hidden",children:g.map((function(e){return(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"100%",children:(0,o.createComponentVNode)(2,c.Button,{color:"transparent",content:e,id:e,width:"100%",selected:A===e,onClick:function(){A===e?r("choose",{choice:e}):E(e),I(null)}})},e)}))})})}),N&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:2.5,children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",autoFocus:!0,onInput:function(e,t){return v(h.filter((function(e){return-1!==e.toLowerCase().search(t.toLowerCase())})))}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,ml:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"good",content:"Confirm",disabled:null===A,onClick:function(){return r("choose",{choice:A})}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,basis:0,mr:1,mx:"5px",children:(0,o.createComponentVNode)(2,c.Button,{fluid:!0,color:"bad",content:"Cancel",onClick:function(){return r("cancel")}})})]})})]})})]})};var u=function(e){var t=e.value;return(0,o.createVNode)(1,"div","ListInput__Loader",(0,o.createComponentVNode)(2,c.Box,{className:"ListInput__LoaderProgress",style:{width:100*(0,r.clamp01)(t)+"%"}}),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.MODsuitContent=t.MODsuit=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.NumberInput,{value:c,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(e,t){return l("configure",{key:n,value:t,ref:i})}})},l=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:c,onClick:function(){return l("configure",{key:n,value:!c,ref:i})}})},d=function(e,t){var n=e.name,c=e.value,i=e.module_ref,l=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"paint-brush",onClick:function(){return l("configure",{key:n,ref:i})}}),(0,o.createComponentVNode)(2,a.ColorBox,{color:c,mr:.5})],4)},u=function(e,t){var n=e.name,c=e.value,i=e.values,l=e.module_ref,d=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Dropdown,{displayText:c,options:i,onSelected:function(e){return d("configure",{key:n,value:e,ref:l})}})},s=function(e,t){e.name;var n=e.display_name,r=e.type,c=(e.value,e.values,e.module_ref,{number:(0,o.normalizeProps)((0,o.createComponentVNode)(2,i,Object.assign({},e))),bool:(0,o.normalizeProps)((0,o.createComponentVNode)(2,l,Object.assign({},e))),color:(0,o.normalizeProps)((0,o.createComponentVNode)(2,d,Object.assign({},e))),list:(0,o.normalizeProps)((0,o.createComponentVNode)(2,u,Object.assign({},e)))});return(0,o.createComponentVNode)(2,a.Box,{children:[n,": ",c[r]]})},m={rad_counter:function(e,t){var n=e.active,r=e.userradiated,c=e.usertoxins,i=e.usermaxtoxins,l=e.threatlevel;return(0,o.createComponentVNode)(2,a.Flex,{fill:!0,textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Radiation Level",color:n&&r?"bad":"good",children:n&&r?"IRRADIATED!":"RADIATION-FREE"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxins Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?c/i:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Hazard Level",color:n&&l?"bad":"good",bold:!0,children:n&&l?l:0})})]})},health_analyzer:function(e,t){var n=e.active,r=e.userhealth,c=e.usermaxhealth,i=e.userbrute,l=e.userburn,d=e.usertoxin,u=e.useroxy;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?r/c:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?r:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?l/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?l:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/c:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})})]})],4)},status_readout:function(e,t){var n=e.active,r=e.statustime,c=e.statusid,i=e.statushealth,l=e.statusmaxhealth,d=e.statusbrute,u=e.statusburn,s=e.statustoxin,m=e.statusoxy,p=e.statustemp,h=e.statusnutrition,f=e.statusfingerprints,C=e.statusdna,N=e.statusviruses;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Time",children:n?r:"00:00:00"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Operation Number",children:n?c||"0":"???"})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?i/l:0,ranges:{good:[.5,Infinity],average:[.2,.5],bad:[-Infinity,.2]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?i:0})})}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Brute",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?d/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?d:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Burn",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?u/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:n?u:0})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Toxin",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?s/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:s})})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Suffocation",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:n?m/l:0,ranges:{good:[-Infinity,.2],average:[.2,.5],bad:[.5,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:m})})})})]}),(0,o.createComponentVNode)(2,a.Flex,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Body Temperature",children:n?p:0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Nutrition Status",children:n?h:0})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"DNA",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fingerprints",children:n?f:"???"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unique Enzymes",children:n?C:"???"})]})}),!!n&&!!N&&(0,o.createComponentVNode)(2,a.Section,{title:"Diseases",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),N.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.type}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.stage,"/",e.maxstage]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.cure})]},e.name)}))]})})],0)}},p=function(){return(0,o.createComponentVNode)(2,a.Section,{align:"center",fill:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,o.createComponentVNode)(2,a.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},h=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Dimmer,{children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},f=function(e,t){var n=e.configuration_data,r=e.module_ref,c=Object.keys(n);return(0,o.createComponentVNode)(2,a.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[c.map((function(e){var t=n[e];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,s,{name:e,display_name:t.display_name,type:t.type,value:t.value,values:t.values,module_ref:r})},t.key)})),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:e.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},C=function(e){switch(e){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},N=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.malfunctioning,u=i.locked,s=i.open,m=i.selected_module,p=i.complexity,h=i.complexity_max,f=i.wearer_name,C=i.wearer_job,N=d?"Malfunctioning":l?"Active":"Inactive";return(0,o.createComponentVNode)(2,a.Section,{title:"Parameters",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",content:l?"Deactivate":"Activate",onClick:function(){return c("activate")}}),children:N}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID Lock",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock-open":"lock",content:u?"Unlock":"Lock",onClick:function(){return c("lock")}}),children:u?"Locked":"Unlocked"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cover",children:s?"Open":"Closed"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Selected Module",children:m||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Complexity",children:[p," (",h,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:[f,", ",C]})]})})},b=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.active,c.control),l=c.helmet,d=c.chestplate,u=c.gauntlets,s=c.boots,m=c.core,p=c.charge;return(0,o.createComponentVNode)(2,a.Section,{title:"Hardware",children:[(0,o.createComponentVNode)(2,a.Collapsible,{title:"Parts",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Control Unit",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Helmet",children:l||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chestplate",children:d||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gauntlets",children:u||"None"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Boots",children:s||"None"})]})}),(0,o.createComponentVNode)(2,a.Collapsible,{title:"Core",children:m&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Type",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Core Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/100,content:p+"%",ranges:{good:[.6,Infinity],average:[.3,.6],bad:[-Infinity,.3]}})})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},V=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=c.active,l=c.modules.filter((function(e){return!!e.id}));return(0,o.createComponentVNode)(2,a.Section,{title:"Info",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==l.length&&l.map((function(e){var t=m[e.id];return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[!i&&(0,o.createComponentVNode)(2,h),(0,o.normalizeProps)((0,o.createComponentVNode)(2,t,Object.assign({},e,{active:i})))]},e.ref)}))||(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.complexity_max,d=i.modules,u=(0,r.useLocalState)(t,"module_configuration",null),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Modules",fill:!0,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:0!==d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Collapsible,{title:e.module_name,children:(0,o.createComponentVNode)(2,a.Section,{children:[s===e.ref&&(0,o.createComponentVNode)(2,f,{configuration_data:e.configuration_data,module_ref:e.ref,onExit:function(){return m(null)}}),(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.module_complexity,"/",l]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.idle_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.active_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:e.use_power}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[e.cooldown>0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:C(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return m(e.ref)},icon:"cog",selected:s===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===e.configuration_data.length}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,o.createComponentVNode)(2,a.Box,{children:e.description})]})})},e.ref)}))||(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:"No Modules Detected"})})})})},v=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data),i=(c.ui_theme,c.interface_break);return(0,o.createComponentVNode)(2,a.Section,{children:!!i&&(0,o.createComponentVNode)(2,p)||(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,N)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,b)}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:!0,children:(0,o.createComponentVNode)(2,g)})]})})};t.MODsuitContent=v;t.MODsuit=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),i=a.ui_theme,l=a.interface_break;return(0,o.createComponentVNode)(2,c.Window,{theme:i,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!l,children:(0,o.createComponentVNode)(2,v)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MagnetController=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=n(28),d=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]);t.MagnetController=function(e,t){var n=(0,a.useBackend)(t),u=n.act,s=n.data,m=s.autolink,p=s.code,h=s.frequency,f=s.linkedMagnets,C=s.magnetConfiguration,N=s.path,b=s.pathPosition,V=s.probing,g=s.powerState,v=s.speed;return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[!m&&(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{content:"Probe",icon:V?"spinner":"sync",iconSpin:!!V,disabled:V,onClick:function(){return u("probe_magnets")}}),title:"Magnet Linking",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:(0,r.toFixed)(h/10,1)}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Code",children:p})]})}),(0,o.createComponentVNode)(2,c.Section,{buttons:(0,o.createComponentVNode)(2,c.Button,{icon:g?"power-off":"times",content:g?"On":"Off",selected:g,onClick:function(){return u("toggle_power")}}),title:"Controller Configuration",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:v.value,minValue:v.min,maxValue:v.max,onChange:function(e,t){return u("set_speed",{speed:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Path",children:[Array.from(d.entries()).map((function(e){var t=e[0],n=e[1],r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button,{icon:r,tooltip:a,onClick:function(){return u("path_add",{code:t})}},t)})),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){return u("path_clear")}}),(0,o.createComponentVNode)(2,c.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){return(0,l.modalOpen)(t,"path_custom_input")}}),(0,o.createComponentVNode)(2,c.BlockQuote,{children:N.map((function(e,t){var n=d.get(e)||{icon:"question"},r=n.icon,a=n.tooltip;return(0,o.createComponentVNode)(2,c.Button.Confirm,{selected:t+2===b,icon:r,confirmIcon:r,confirmContent:"",tooltip:a,onClick:function(){return u("path_remove",{index:t+1,code:e})}},t)}))})]})]})}),f.map((function(e,t){var n=e.uid,r=e.powerState,a=e.electricityLevel,i=e.magneticField;return(0,o.createComponentVNode)(2,c.Section,{title:"Magnet #"+(t+1)+" Configuration",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:r?"power-off":"times",content:r?"On":"Off",selected:r,onClick:function(){return u("toggle_magnet_power",{id:n})}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Move Speed",children:(0,o.createComponentVNode)(2,c.Slider,{value:a,minValue:C.electricityLevel.min,maxValue:C.electricityLevel.max,onChange:function(e,t){return u("set_electricity_level",{id:n,electricityLevel:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Field Size",children:(0,o.createComponentVNode)(2,c.Slider,{value:i,minValue:C.magneticField.min,maxValue:C.magneticField.max,onChange:function(e,t){return u("set_magnetic_field",{id:n,magneticField:t})}})})]})},n)}))]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell,s=d&&d.name;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:s?"Mech status: "+s:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return i("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(12),n(1)),a=n(2),c=n(3),i=n(21);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.beacons,s=d.stored_data;return s.length?(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,a.Box,{children:(0,i.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:u.length&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,a.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,a.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,i.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(28),l=n(38),d=n(3),u=n(123),s=n(124),m=n(169),p={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},h={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},f=function(e,t){(0,i.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,r=(0,a.useBackend)(t).data,l=r.loginState,p=r.screen;return l.logged_in?(2===p?n=(0,o.createComponentVNode)(2,C):3===p?n=(0,o.createComponentVNode)(2,N):4===p?n=(0,o.createComponentVNode)(2,b):5===p?n=(0,o.createComponentVNode)(2,v):6===p&&(n=(0,o.createComponentVNode)(2,y)),(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,i.ComplexModal),(0,o.createComponentVNode)(2,d.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,k),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.records,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],p=(0,a.useLocalState)(t,"sortId","name"),f=p[0],C=(p[1],(0,a.useLocalState)(t,"sortOrder",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,l.FlexItem,{children:(0,o.createComponentVNode)(2,c.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){return i("screen",{screen:3})}})}),(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Physical Status, or Mental Status",width:"100%",onInput:function(e,t){return m(t)}})})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,_,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,_,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,_,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,_,{id:"p_stat",children:"Patient Status"}),(0,o.createComponentVNode)(2,_,{id:"m_stat",children:"Mental Status"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.p_stat+"|"+e.m_stat}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listRow--"+h[e.p_stat],onClick:function(){return i("view_record",{view_record:e.ref})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.p_stat}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.m_stat})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all_med_records")}})],0)},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.medical,d=i.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d?"spinner":"print",disabled:d,iconSpin:!!d,content:"Print Record",ml:"0.5rem",onClick:function(){return r("print_record")}}),children:(0,o.createComponentVNode)(2,V)}),(0,o.createComponentVNode)(2,c.Section,{title:"Medical Data",level:2,buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",onClick:function(){return r("del_med_record")}}),children:(0,o.createComponentVNode)(2,g)})],4)},V=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,c.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return f(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return f(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,i.modalOpen)(t,"add_comment")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return r("del_comment",{del_comment:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return r("new_med_record")}})]})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data.virus,u=(0,a.useLocalState)(t,"searchText",""),s=u[0],m=u[1],h=(0,a.useLocalState)(t,"sortId2","name"),f=h[0],C=(h[1],(0,a.useLocalState)(t,"sortOrder2",!0)),N=C[0];C[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex,{children:(0,o.createComponentVNode)(2,l.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, Max Stages, or Severity",width:"100%",onInput:function(e,t){return m(t)}})})}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,x,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,x,{id:"max_stages",children:"Max Stages"}),(0,o.createComponentVNode)(2,x,{id:"severity",children:"Severity"})]}),d.filter((0,r.createSearch)(s,(function(e){return e.name+"|"+e.max_stages+"|"+e.severity}))).sort((function(e,t){var n=N?1:-1;return e[f].localeCompare(t[f])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listVirus--"+e.severity,onClick:function(){return i("vir",{vir:e.D})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"virus"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.max_stages}),(0,o.createComponentVNode)(2,c.Table.Cell,{color:p[e.severity],children:e.severity})]},e.id)}))]})})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.medbots);return 0===r.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"There are no Medibots."}):(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"MedicalRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Area"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Chemicals"})]}),r.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"MedicalRecords__listMedbot--"+e.on,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"medical"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.on?(0,o.createComponentVNode)(2,c.Box,{color:"good",children:"Online"}):(0,o.createComponentVNode)(2,c.Box,{color:"average",children:"Offline"})}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer"})]},e.id)}))]})})})},_=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e,t){var n=(0,a.useLocalState)(t,"sortId2","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder2",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},k=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){r("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:5===l,onClick:function(){r("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:6===l,onClick:function(){return r("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"plus-square"}),"Medibot Tracking"]}),3===l&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"wrench"}),"Record Maintenance"]}),4===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:4===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})};(0,i.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Severity",color:p[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MerchVendor=void 0;var o=n(0),r=n(1),a=n(2),c=n(38),i=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productImage,u=e.productCategory,s=i.user_money;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{disabled:l.price>s,icon:"shopping-cart",content:l.price,textAlign:"left",onClick:function(){return c("purchase",{name:l.name,category:u})}})})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1)[0],i=n.products,d=n.imagelist,u=["apparel","toy","decoration"];return(0,o.createComponentVNode)(2,a.Table,{children:i[u[c]].map((function(e){return(0,o.createComponentVNode)(2,l,{product:e,productImage:d[e.path],productCategory:u[c]},e.name)}))})};t.MerchVendor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,m=s.user_cash,p=s.inserted_cash;return(0,o.createComponentVNode)(2,i.Window,{title:"Merch Computer",resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[(0,o.createComponentVNode)(2,a.Box,{m:2,children:"Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives."}),null!==m&&(0,o.createComponentVNode)(2,a.Box,{children:["Your balance is ",(0,o.createVNode)(1,"b",null,[m||0,(0,o.createTextVNode)(" credits")],0),"."]}),(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Box,{color:"light-grey",children:["There is ",(0,o.createVNode)(1,"b",null,p,0)," credits inserted."]})}),(0,o.createComponentVNode)(2,c.FlexItem,{width:"50%",children:(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return l("change")}})})]})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})]})})};var u=function(e,t){var n=(0,r.useBackend)(t).data,c=(0,r.useLocalState)(t,"tabIndex",1),i=c[0],l=c[1];n.login_state;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===i,onClick:function(){return l(1)},children:"Toys"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===i,onClick:function(){return l(2)},children:"Decorations"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3),l=["title","items"];var d={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,s)]})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.has_id,d=i.id;return(0,o.createComponentVNode)(2,c.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",d.name,".",(0,o.createVNode)(1,"br"),"You have ",d.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,c.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,c.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},s=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.has_id,u=i.id,s=i.items,m=(0,a.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,a.useLocalState)(t,"sort","Alphabetical")),C=f[0],N=(f[1],(0,a.useLocalState)(t,"descending",!1)),b=N[0],V=(N[1],(0,r.createSearch)(h,(function(e){return e[0]}))),g=!1,v=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).filter(V).map((function(e){return e[1].affordable=l&&u.points>=e[1].price,e[1]})).sort(d[C]);if(0!==n.length)return b&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Section,{children:g?v:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No items matching your criteria was found!"})})})},m=function(e,t){var n=(0,a.useLocalState)(t,"search",""),r=(n[0],n[1]),i=(0,a.useLocalState)(t,"sort",""),l=(i[0],i[1]),u=(0,a.useLocalState)(t,"descending",!1),s=u[0],m=u[1];return(0,o.createComponentVNode)(2,c.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:"Alphabetical",options:Object.keys(d),width:"100%",lineHeight:"19px",onSelected:function(e){return l(e)}})}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return m(!s)}})})]})})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,d=e.title,u=e.items,s=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,l);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Collapsible,Object.assign({open:!0,title:d},s,{children:u.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,c.Button,{disabled:!i.has_id||i.id.points=0||(r[n]=e[n]);return r}var h=["security","engineering","medical","science","service","supply"],f={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,i=(0,a.useBackend)(t),s=i.act,m=i.data,p=m.is_security,h=m.is_admin,f=m.is_silent,V=m.is_printing,g=m.screen,y=m.channels,_=m.channel_idx,x=void 0===_?-1:_,k=(0,a.useLocalState)(t,"menuOpen",!1),L=k[0],w=k[1],B=(0,a.useLocalState)(t,"viewingPhoto",""),S=B[0],I=(B[1],(0,a.useLocalState)(t,"censorMode",!1)),T=I[0],A=I[1];0===g||2===g?n=(0,o.createComponentVNode)(2,N):1===g&&(n=(0,o.createComponentVNode)(2,b));var E=y.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:p&&"security",children:[S?(0,o.createComponentVNode)(2,v):(0,o.createComponentVNode)(2,d.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",L&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,C,{icon:"bars",title:"Toggle Menu",onClick:function(){return w(!L)}}),(0,o.createComponentVNode)(2,C,{icon:"newspaper",title:"Headlines",selected:0===g,onClick:function(){return s("headlines")},children:E>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:E>=10?"9+":E})}),(0,o.createComponentVNode)(2,C,{icon:"briefcase",title:"Job Openings",selected:1===g,onClick:function(){return s("jobs")}}),(0,o.createComponentVNode)(2,c.Divider)]}),(0,o.createComponentVNode)(2,c.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:y.map((function(e){return(0,o.createComponentVNode)(2,C,{icon:e.icon,title:e.name,selected:2===g&&y[x-1]===e,onClick:function(){return s("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,c.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,c.Divider),(!!p||!!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,C,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,C,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return A(!T)}}),(0,o.createComponentVNode)(2,c.Divider)],4),(0,o.createComponentVNode)(2,C,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,d.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,C,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,d.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,c.Divider),(0,o.createComponentVNode)(2,C,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return s("print_newspaper")}}),(0,o.createComponentVNode)(2,C,{icon:f?"volume-mute":"volume-up",title:"Mute: "+(f?"On":"Off"),onClick:function(){return s("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,u.TemporaryNotice),n]})]})})]})};var C=function(e,t){(0,a.useBackend)(t).act;var n=e.icon,i=void 0===n?"":n,l=e.iconSpin,d=e.selected,u=void 0!==d&&d,m=e.security,h=void 0!==m&&m,f=e.onClick,C=e.title,N=e.children,b=p(e,s);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",u&&"Newscaster__menuButton--selected",h&&"Newscaster__menuButton--security"]),onClick:f},b,{children:[u&&(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,c.Icon,{name:i,spin:l,size:"2"}),(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__menuButton--title",children:C}),N]})))},N=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.screen,u=i.is_admin,s=i.channel_idx,m=i.channel_can_manage,p=i.channels,h=i.stories,f=i.wanted,C=(0,a.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,a.useLocalState)(t,"censorMode",!1)),g=b[0],v=(b[1],2===l&&s>-1?p[s-1]:null);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,V,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,V,{story:e},e)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([g&&(0,o.createComponentVNode)(2,c.Button,{disabled:!!v.admin&&!u,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!m,icon:"cog",content:"Manage",onClick:function(){return(0,d.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),!!u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Ckey",children:v.author_ckey}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},b=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=i.jobs,d=i.wanted,u=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",flex:"1",children:[!!d&&(0,o.createComponentVNode)(2,V,{story:d,wanted:!0}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:u>0?h.map((function(e){return Object.assign({},f[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,c.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,c.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the"," ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},V=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=e.story,s=e.wanted,m=void 0!==s&&s,p=d.is_admin,h=(0,a.useLocalState)(t,"fullStories",[]),f=h[0],C=h[1],N=(0,a.useLocalState)(t,"censorMode",!1),b=N[0];N[1];return(0,o.createComponentVNode)(2,c.Section,{className:(0,r.classes)(["Newscaster__story",m&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([m&&(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&u.censor_flags?"[REDACTED]":u.title)||"News from "+u.author],0),buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,c.Box,{color:"label",children:[!m&&b&&(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:(0,o.createComponentVNode)(2,c.Button,{enabled:2&u.censor_flags,icon:2&u.censor_flags?"comment-slash":"comment",content:2&u.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:u.uid})}})}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",u.author," |\xa0",!!p&&(0,o.createFragment)([(0,o.createTextVNode)("ckey: "),u.author_ckey,(0,o.createTextVNode)(" |\xa0")],0),!m&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),u.view_count.toLocaleString(),(0,o.createTextVNode)(" "),(0,o.createTextVNode)("|\xa0")],0),(0,o.createComponentVNode)(2,c.Icon,{name:"clock"})," ",(0,i.timeAgo)(u.publish_time,d.world_time)]})]})}),children:(0,o.createComponentVNode)(2,c.Box,{children:2&u.censor_flags?"[REDACTED]":(0,o.createFragment)([!!u.has_photo&&(0,o.createComponentVNode)(2,g,{name:"story_photo_"+u.uid+".png",float:"right",ml:"0.5rem"}),(u.body_short||u.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),u.body_short&&(0,o.createComponentVNode)(2,c.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return C([].concat(f,[u.uid]))}}),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})],0)})})},g=function(e,t){var n=e.name,r=p(e,m),i=(0,a.useLocalState)(t,"viewingPhoto",""),l=(i[0],i[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},v=function(e,t){var n=(0,a.useLocalState)(t,"viewingPhoto",""),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,c.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return i("")}})]})},y=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||i){var l="manage_channel"===e.id,u=!!e.args.is_admin,s=e.args.scanned_user,m=(0,a.useLocalState)(t,"author",(null==i?void 0:i.author)||s||"Unknown"),p=m[0],h=m[1],f=(0,a.useLocalState)(t,"name",(null==i?void 0:i.name)||""),C=f[0],N=f[1],b=(0,a.useLocalState)(t,"description",(null==i?void 0:i.description)||""),V=b[0],g=b[1],v=(0,a.useLocalState)(t,"icon",(null==i?void 0:i.icon)||"newspaper"),y=v[0],_=v[1],x=(0,a.useLocalState)(t,"isPublic",!!l&&!(null==i||!i["public"])),k=x[0],L=x[1],w=(0,a.useLocalState)(t,"adminLocked",1===(null==i?void 0:i.admin)||!1),B=w[0],S=w[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+i.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!u,width:"100%",value:p,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return N(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:V,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,c.Input,{disabled:!u,value:y,width:"35%",mr:"0.5rem",onInput:function(e,t){return _(t)}}),(0,o.createComponentVNode)(2,c.Icon,{name:y,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,c.Button,{selected:k,icon:k?"toggle-on":"toggle-off",content:k?"Yes":"No",onClick:function(){return L(!k)}})}),u&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:B,icon:B?"lock":"lock-open",content:B?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return S(!B)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===p.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:p,name:C.substr(0,49),description:V.substr(0,128),icon:y,"public":k?1:0,admin_locked:B?1:0}),(0,a.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,d.modalClose)(t)};(0,d.modalRegisterBodyOverride)("create_channel",y),(0,d.modalRegisterBodyOverride)("manage_channel",y),(0,d.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.channels,s=i.channel_idx,m=void 0===s?-1:s,p=!!e.args.is_admin,h=e.args.scanned_user,f=u.slice().sort((function(e,t){if(m<0)return 0;var n=u[m-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return p||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,a.useLocalState)(t,"author",h||"Unknown"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],y=V[1],_=(0,a.useLocalState)(t,"title",""),x=_[0],k=_[1],L=(0,a.useLocalState)(t,"body",""),w=L[0],B=L[1],S=(0,a.useLocalState)(t,"adminLocked",!1),I=S[0],T=S[1];return(0,o.createComponentVNode)(2,c.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!p,width:"100%",value:N,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return y(e)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Divider),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:x,onInput:function(e,t){return k(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:w,onInput:function(e,t){return B(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Section,{noTopPadding:!0,title:x,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,c.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"}),w.split("\n").map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,c.Box,{clear:"right"})]})})}),p&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:I,icon:I?"lock":"lock-open",content:I?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return T(!I)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===N.trim().length||0===v.trim().length||0===x.trim().length||0===w.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,"create_story","",{author:N,channel:v,title:x.substr(0,127),body:w.substr(0,1023),admin_locked:I?1:0}),(0,a.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,d.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.photo,u=i.wanted,s=!!e.args.is_admin,m=e.args.scanned_user,p=(0,a.useLocalState)(t,"author",(null==u?void 0:u.author)||m||"Unknown"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"name",(null==u?void 0:u.title.substr(8))||""),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"description",(null==u?void 0:u.body)||""),v=V[0],y=V[1],_=(0,a.useLocalState)(t,"adminLocked",1===(null==u?void 0:u.admin_locked)||!1),x=_[0],k=_[1];return(0,o.createComponentVNode)(2,c.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,c.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,c.Input,{disabled:!s,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,c.Input,{width:"100%",value:N,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return y(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,g,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,c.Button,{selected:x,icon:x?"lock":"lock-open",content:x?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return k(!x)}})})]})}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:!u,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,d.modalClose)(t),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{disabled:0===h.trim().length||0===N.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,d.modalAnswer)(t,e.id,"",{author:h,name:N.substr(0,127),description:v.substr(0,511),admin_locked:x?1:0}),(0,a.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return i("auth")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,a.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return i("code")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authdisk,content:l.anchored?"YES":"NO",onClick:function(){return i("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,a.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return i("set_time")}})})||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return i("toggle_safety")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,a.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return i("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return i("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(12),a=n(1),c=n(3),i=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,a.useBackend)(t),l=r.act,d=r.data,u=d.hasOccupant,s=d.choice;return n=s?(0,o.createComponentVNode)(2,h):u?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!s,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:!!s,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:n})]})})};var m=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),d.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:s[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Procedure",level:"2",children:n.inSurgery?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Procedure",children:n.surgeryName}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Next Step",children:n.stepName})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No procedure ongoing."})})],4)},p=function(){return(0,o.createComponentVNode)(2,i.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.verbose,d=c.health,u=c.healthAlarm,s=c.oxy,m=c.oxyAlarm,p=c.crit;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,i.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,i.Button,{selected:d,icon:d?"toggle-on":"toggle-off",content:d?"On":"Off",onClick:function(){return r(d?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:u,stepPixelSize:5,ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,i.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,i.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:m,stepPixelSize:5,ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,i.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){return r(p?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(3);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},p=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(u),a=o.match(u);return r&&a&&n.replace(u,"")===o.replace(u,"")?parseInt(r[1],10)-parseInt(a[1],10):m(n,o)},h=function(e,t){var n=e.searchText,r=e.source,a=e.title,i=e.color,l=e.sorted,d=r.filter(s(n));return l&&d.sort(p),r.length>0&&(0,o.createComponentVNode)(2,c.Section,{title:a+" - ("+r.length+")",children:d.map((function(e){return(0,o.createComponentVNode)(2,f,{thing:e,color:i},e.name)}))})},f=function(e,t){var n=(0,a.useBackend)(t).act,r=e.color,i=e.thing;return(0,o.createComponentVNode)(2,c.Button,{color:r,onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,o.createComponentVNode)(2,c.Box,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,o.createComponentVNode)(2,c.Icon,{name:"eye"}),")"]})]})};t.Orbit=function(e,t){for(var n,r=(0,a.useBackend)(t),d=r.act,u=r.data,C=u.alive,N=u.antagonists,b=u.highlights,V=u.response_teams,g=(u.auto_observe,u.dead),v=u.ghosts,y=u.misc,_=u.npcs,x=(0,a.useLocalState)(t,"searchText",""),k=x[0],L=x[1],w={},B=l(N);!(n=B()).done;){var S=n.value;w[S.antag]===undefined&&(w[S.antag]=[]),w[S.antag].push(S)}var I=Object.entries(w);I.sort((function(e,t){return m(e[0],t[0])}));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:(0,o.createComponentVNode)(2,c.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:k,onInput:function(e,t){return L(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[I.map((function(e){return e[0],e[1]})),b,C,v,g,_,y];t0&&(0,o.createComponentVNode)(2,c.Section,{title:"Antagonists",children:I.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,c.Section,{title:t+" - ("+n.length+")",level:2,children:n.filter(s(k)).sort(p).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),b.length>0&&(0,o.createComponentVNode)(2,h,{title:"Highlights",source:b,searchText:k,color:"teal"}),(0,o.createComponentVNode)(2,h,{title:"Response Teams",source:V,searchText:k,color:"purple"}),(0,o.createComponentVNode)(2,h,{title:"Alive",source:C,searchText:k,color:"good"}),(0,o.createComponentVNode)(2,h,{title:"Ghosts",source:v,searchText:k,color:"grey"}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:g,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:_,searchText:k,sorted:!1}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:y,searchText:k,sorted:!1})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),a=n(2),c=n(38),i=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"43%"}),(0,o.createComponentVNode)(2,s,{height:"57%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,d=i.id,u=i.points,s=i.disk,m=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({},m,{children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID card",children:d?(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:d.name,tooltip:"Ejects the ID card.",onClick:function(){return c("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,a.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return c("insert_id")}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.points)})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:l(d.total_points)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed Points",color:u>0?"good":"grey",bold:u>0&&"good",children:l(u)}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!d,icon:"hand-holding-usd",content:"Claim",onClick:function(){return c("claim")}})})]}),(0,o.createComponentVNode)(2,a.Divider),s?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,a.Button,{selected:!0,bold:!0,icon:"eject",content:s.name,tooltip:"Ejects the design disk.",onClick:function(){return c("eject_disk")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,a.Box,{color:s.design&&(s.compatible?"good":"bad"),children:s.design||"N/A"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{children:(0,o.createComponentVNode)(2,a.Button,{disabled:!s.design||!s.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return c("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.sheets),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,p,{ore:e},e.id)}))]})))},s=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.alloys),i=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},i,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),c.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,a.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)}))]})})},p=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore;if(!(c.value&&c.amount<=0)||["$metal","$glass"].indexOf(c.id)>-1){var i=c.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+i+".png",verticalAlign:"middle",ml:"0rem"}),c.name]}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",color:c.amount>=1?"good":"gray",bold:c.amount>=1,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:c.value}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},h=function(e,t){var n=(0,r.useBackend)(t).act,i=e.ore,l=i.id.replace("$","");return(0,o.createComponentVNode)(2,a.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,c.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:i.name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"35%",textAlign:"middle",color:i.amount>=1?"good":"gray",align:"center",children:i.description}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"10%",textAlign:"center",color:i.amount>=1?"good":"gray",bold:i.amount>=1,align:"center",children:i.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:0,minValue:0,maxValue:Math.min(i.amount,50),stepPixelSize:6,onChange:function(e,t){return n(i.value?"sheet":"alloy",{id:i.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(621);t.PAI=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.app_template,m=u.app_icon,p=u.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(s);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m,mr:1}),p,"pai_main_menu"!==s&&(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return d("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_atmosphere.js":622,"./pai_bioscan.js":623,"./pai_directives.js":624,"./pai_doorjack.js":625,"./pai_main_menu.js":626,"./pai_manifest.js":627,"./pai_medrecords.js":628,"./pai_messenger.js":629,"./pai_radio.js":630,"./pai_secrecords.js":631,"./pai_signaler.js":632};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=621},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),a=n(229);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.AtmosScan,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),a=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.app_data),i=c.holder,l=c.dead,d=c.health,u=c.brute,s=c.oxy,m=c.tox,p=c.burn;c.temp;return i?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"blue",children:s})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"green",children:m})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:p})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.Box,{color:"red",children:u})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),a=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.master,d=i.dna,u=i.prime,s=i.supplemental;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master",children:l?l+" ("+d+")":"None"}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return c("getdna")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prime Directive",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Supplemental Directives",children:s||"None"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),a=n(2);t.pai_doorjack=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data.app_data,u=d.cable,s=d.machine,m=d.inprogress,p=d.progress;d.aborted;return n=s?(0,o.createComponentVNode)(2,a.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,a.Button,{content:u?"Extended":"Retracted",color:u?"orange":null,onClick:function(){return l("cable")}}),s&&(c=(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[67,Infinity],average:[33,67],bad:[-Infinity,33]},value:p,maxValue:100}),m?(0,o.createComponentVNode)(2,a.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,a.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cable",children:n}),c]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),a=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app_data,l=i.available_software,d=i.installed_software,u=i.installed_toggles,s=i.available_ram,m=i.emotions,p=i.current_emotion,h=i.speech_verbs,f=i.current_speech_verb,C=i.available_chassises,N=i.current_chassis,b=[];return d.map((function(e){return b[e.key]=e.name})),u.map((function(e){return b[e.key]=e.name})),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available RAM",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!b[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>s,onClick:function(){return c("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!b[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Software",children:[d.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,onClick:function(){return c("startSoftware",{software_key:e.key})}},e.key)})),0===d.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Installed Toggles",children:[u.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return c("setToggle",{toggle_key:e.key})}},e.key)})),0===u.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Emotion",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.id===p,onClick:function(){return c("setEmotion",{emotion:e.id})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Speaking State",children:h.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.name===f,onClick:function(){return c("setSpeechStyle",{speech_state:e.name})}},e.id)}))}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Select Chassis Type",children:C.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,selected:e.icon===N,onClick:function(){return c("setChassis",{chassis_to_change:e.icon})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.CrewManifest,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),a=n(230);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return c.app_data.active_convo?(0,o.createComponentVNode)(2,a.ActiveConversation,{data:c.app_data}):(0,o.createComponentVNode)(2,a.MessengerList,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),a=n(12),c=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.app_data,d=l.minFrequency,u=l.maxFrequency,s=l.frequency,m=l.broadcasting;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,a.toFixed)(e,1)},onChange:function(e,t){return i("freq",{freq:t})}}),(0,o.createComponentVNode)(2,c.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return i("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,c.Button,{onClick:function(){return i("toggleBroadcast")},selected:m,content:m?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),a=n(127);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),a=n(170);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data);return(0,o.createComponentVNode)(2,a.Signaler,{data:c.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(162),l=n(634);t.PDA=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data),m=s.app;if(!s.owner)return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var p=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,i.routingError)("notFound",e);throw o}var n=t[e];return n||(0,i.routingError)("missingExport",e)}(m.template);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:m.icon,mr:1}),m.name]}),p:1,children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Box,{mb:8}),(0,o.createComponentVNode)(2,u)]})})};var d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.idInserted,d=i.idLink,u=i.stationTime,s=i.cartridge_name;return(0,o.createComponentVNode)(2,a.Box,{mb:1,children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"id-card",color:"transparent",onClick:function(){return c("Authenticate")},content:d})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),s?(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"sd-card",color:"transparent",onClick:function(){return c("Eject")},content:"Eject "+s})}):(0,o.createComponentVNode)(2,a.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:u})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.app;return(0,o.createComponentVNode)(2,a.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return c("Back")}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:i.is_home?"disabled":"white",icon:"home",onClick:function(){c("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":635,"./pda_janitor.js":636,"./pda_main_menu.js":637,"./pda_manifest.js":638,"./pda_medical.js":639,"./pda_messenger.js":230,"./pda_mob_hunt.js":640,"./pda_mule.js":641,"./pda_nanobank.js":642,"./pda_notes.js":643,"./pda_power.js":644,"./pda_secbot.js":645,"./pda_security.js":646,"./pda_signaler.js":647,"./pda_status_display.js":648,"./pda_supplyrecords.js":649};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=634},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),a=n(229);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),a=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.janitor),i=c.user_loc,l=c.mops,d=c.buckets,u=c.cleanbots,s=c.carts;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Location",children:[i.x,",",i.y]}),l&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mop Bucket Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cleanbot Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Janitorial Cart Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(12),n(1)),a=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.owner,d=i.ownjob,u=i.idInserted,s=i.categories,m=i.pai,p=i.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",d]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Update PDA Info",disabled:!u,onClick:function(){return c("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e){var t=i.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:e.uid in p?e.notify_icon:e.icon,iconSpin:e.uid in p,color:e.uid in p?"red":"transparent",content:e.name,onClick:function(){return c("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!m&&(0,o.createComponentVNode)(2,a.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return c("pai",{option:1})}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return c("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),a=n(168);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),a=n(127);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,a.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.connected,d=i.wild_captures,u=i.no_collection,s=i.entry;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return c("Disconnect")}})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,a.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return c("Reconnect")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Wild Captures",children:d})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,a.Box,{children:!u&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return c("Prev")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Next",icon:"arrow-right",onClick:function(){return c("Next")}})]})}),children:u?"Your collection is empty! Go capture some Nano-Mobs!":s?(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:s.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[s.nickname&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nickname",children:s.nickname}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Species",children:s.real_name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:s.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Primary Type",children:s.type1}),s.type2&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Secondary Type",children:s.type2}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return c("Transfer")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Release",icon:"arrow-up",onClick:function(){return c("Release")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return c("Rename")}}),!!s.is_hacked&&(0,o.createComponentVNode)(2,a.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return c("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),a=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,a.Box,{children:l?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,c)})};var c=function(e,t){var n=(0,r.useBackend)(t),c=n.act;return n.data.mulebot.bots.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:e.Name,icon:"cog",onClick:function(){return c("control",{bot:e.uid})}})},e.Name)}))},i=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data.mulebot,d=l.botstatus,u=l.active,s=d.mode,m=d.loca,p=d.load,h=d.powr,f=d.dest,C=d.home,N=d.retn,b=d.pick;switch(s){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=s}return(0,o.createComponentVNode)(2,a.Section,{title:u,children:[-1===s&&(0,o.createComponentVNode)(2,a.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,a.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return i("target")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,a.Button,{content:p?p+" (Unload)":"None",disabled:!p,onClick:function(){return i("unload")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,a.Button,{content:b?"Yes":"No",selected:b,onClick:function(){return i("set_pickup_type",{autopick:b?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,a.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return i("set_auto_return",{autoret:N?0:1})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Stop",icon:"stop",onClick:function(){return i("stop")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Proceed",icon:"play",onClick:function(){return i("start")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Return Home",icon:"home",onClick:function(){return i("home")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_nanobank=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38);t.pda_nanobank=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.logged_in,u=r.owner_name,s=r.money;return i?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Name",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account Balance",children:["$",s]})]})}),(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,d)]})],4):(0,o.createComponentVNode)(2,p)};var l=function(e,t){(0,a.useBackend)(t).data;var n=(0,a.useLocalState)(t,"tabIndex",1),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,c.Tabs,{mt:2,children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transfers"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===r,onClick:function(){return i(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Account Actions"]}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===r,onClick:function(){return i(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"Transaction History"]})]})},d=function(e,t){var n=(0,a.useLocalState)(t,"tabIndex",1)[0];if(!(0,a.useBackend)(t).data.db_status)return(0,o.createComponentVNode)(2,c.Box,{children:"Account Database Connection Severed"});switch(n){case 1:return(0,o.createComponentVNode)(2,u);case 2:return(0,o.createComponentVNode)(2,s);case 3:return(0,o.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},u=function(e,t){var n,i=(0,a.useBackend)(t),l=i.act,d=i.data,u=d.requests,s=d.available_accounts,m=d.money,p=(0,a.useLocalState)(t,"selectedAccount"),h=p[0],f=p[1],C=(0,a.useLocalState)(t,"transferAmount"),N=C[0],b=C[1],V=(0,a.useLocalState)(t,"searchText",""),g=V[0],v=V[1],y=[];return s.map((function(e){return y[e.name]=e.UID})),(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Account",children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by account name",onInput:function(e,t){return v(t)}}),(0,o.createComponentVNode)(2,c.Dropdown,{mt:.6,width:"190px",options:s.filter((0,r.createSearch)(g,(function(e){return e.name}))).map((function(e){return e.name})),selected:null==(n=s.filter((function(e){return e.UID===h}))[0])?void 0:n.name,onSelected:function(e){return f(y[e])}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Amount",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Up to 5000",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,c.Button.Confirm,{bold:!0,icon:"paper-plane",width:"auto",disabled:m0&&m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Approved Orders",children:s>0&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(125);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.active,s=d.anchored,m=d.broken,p=d.emagged,h=d.fuel_type,f=d.fuel_usage,C=d.fuel_stored,N=d.fuel_cap,b=d.is_ai,V=d.tmp_current,g=d.tmp_max,v=d.tmp_overheat,y=d.output_max,_=d.power_gen,x=d.output_set,k=d.has_fuel,L=C/N,w=V/g,B=x*_,S=Math.round(C/f),I=Math.round(S/60),T=S>120?I+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(m||!s)&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:[!!m&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator is malfunctioning!"}),!m&&!s&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!m&&!!s&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:u,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,a.NumberInput,{value:x,minValue:1,maxValue:y*(p?2.5:1),step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,i.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:w,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[V," \u2103"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:[v>50&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,o.createComponentVNode)(2,a.Box,{color:"orange",children:"Temperature High"}),0===v&&(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||b||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:L,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(C/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel usage",children:[f/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(f?T:"N/A"),!k&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ParticleAccelerator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ParticleAccelerator=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.assembled,u=l.power,s=l.strength,m=l.max_strength;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Control Panel",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Connect",onClick:function(){return i("scan")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",mb:"5px",children:(0,o.createComponentVNode)(2,a.Box,{color:d?"good":"bad",children:d?"Operational":"Error: Verify Configuration"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!d,onClick:function(){return i("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Strength",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:!d||0===s,onClick:function(){return i("remove_strength")},mr:"4px"}),s,(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:!d||s===m,onClick:function(){return i("add_strength")},ml:"4px"})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PdaPainter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PdaPainter=function(e,t){var n=(0,r.useBackend)(t).data.has_pda;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:n?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Section,{height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"silver",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"download",size:5,mb:"10px"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.pda_colors;return(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"180px",mr:"3px",children:(0,o.createComponentVNode)(2,d)}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"65%",mr:"3px",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{className:"PdaPainter__list",children:Object.keys(i).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("choose_pda",{selectedPda:e})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+i[e][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e})]},e)}))})})})})]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.current_appearance,d=i.preview_appearance;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Current PDA",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+l,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return c("eject_pda")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return c("paint_pda")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Preview",children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.busy,m=u.category,p=u.display_craftable_only,h=u.display_compact,f=u.prev_cat,C=u.next_cat,N=u.subcategory,b=u.prev_subcat,V=u.next_subcat;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!s&&(0,o.createComponentVNode)(2,a.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Show Craftable Only",icon:p?"check-square-o":"square-o",selected:p,onClick:function(){return d("toggle_recipes")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return d("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:f,icon:"arrow-left",onClick:function(){return d("backwardCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:C,icon:"arrow-right",onClick:function(){return d("forwardCat")}})]}),N&&(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:b,icon:"arrow-left",onClick:function(){return d("backwardSubCat")}}),(0,o.createComponentVNode)(2,a.Button,{content:V,icon:"arrow-right",onClick:function(){return d("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,a.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.display_craftable_only,d=i.can_craft,u=i.cant_craft;return(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[d.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",onClick:function(){return c("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:"Photocopier",color:"silver",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Copies",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{width:"2em",bold:!0,children:u.copynumber}),(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"minus",textAlign:"center",content:"",onClick:function(){return d("minus")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"plus",textAlign:"center",content:"",onClick:function(){return d("add")}})],4)]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toner",children:(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:u.toner})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Document",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.copyitem&&!u.mob,content:u.copyitem?u.copyitem:u.mob?u.mob+"'s ass!":"document",onClick:function(){return d("removedocument")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted Folder",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,textAlign:"center",disabled:!u.folder,content:u.folder?u.folder:"folder",onClick:function(){return d("removefolder")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,i)}),(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.issilicon;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){return c("copy")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){return c("scandocument")}}),!!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){return c("ai_text")}}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){return c("ai_pic")}})],4)],0)},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Scanned Files",children:i.files.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print",disabled:i.toner<=0,onClick:function(){return c("filecopy",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return c("deletefile",{uid:e.uid})}})]})},e.name)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=["tempKey"];var l={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},d=function(e,t){var n=e.tempKey,c=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,i),d=l[n];if(!d)return null;var u=(0,r.useBackend)(t),s=u.data,m=u.act,p=s.currentTemp,h=d.label,f=d.icon,C=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({selected:C,onClick:function(){m("setTemp",{temp:n})}},c,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:f}),h]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,i=n.emagged,u=n.currentTemp,s=l[u]||l.normal,m=s.label,p=s.color,h=[],f=0,C=Object.entries(l);f0?"envelope-open-text":"envelope",onClick:function(){return i("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return i("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Request Supplies",icon:"box",onClick:function(){return i("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return i("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return i("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return i("setScreen",{setScreen:10})}})})]}),!!u&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return i("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,a.Box,{mt:2,children:(0,o.createComponentVNode)(2,a.Button,{content:s?"Speaker Off":"Speaker On",selected:!s,icon:s?"volume-mute":"volume-up",onClick:function(){return i("toggleSilent")}})})]})},l=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act,l=c.data,d=l.department,u=[];switch(e.purpose){case"ASSISTANCE":u=l.assist_dept,n="Request assistance from another department";break;case"SUPPLIES":u=l.supply_dept,n="Request supplies from another department";break;case"INFO":u=l.info_dept,n="Relay information to another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Message",icon:"envelope",onClick:function(){return i("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,a.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return i("writeInput",{write:e,priority:2})}})]},e)}))})})},d=function(e,t){var n,c=(0,r.useBackend)(t),i=c.act;c.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,a.Section,{title:n,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("setScreen",{setScreen:0})}})})},u=function(e,t){var n,c,i=(0,r.useBackend)(t),l=i.act,d=i.data;switch(e.type){case"MESSAGES":n=d.message_log,c="Message Log";break;case"SHIPPING":n=d.shipping_log,c="Shipping label print log"}return(0,o.createComponentVNode)(2,a.Section,{title:c,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[e.map((function(e,t){return(0,o.createVNode)(1,"div",null,e,0,null,t)})),(0,o.createVNode)(1,"hr")]},e)}))})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.recipient,d=i.message,u=i.msgVerified,s=i.msgStamped;return(0,o.createComponentVNode)(2,a.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",color:"green",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stamped by",color:"blue",children:s})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return c("department",{department:l})}})]})},m=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.message,d=i.announceAuth;return(0,o.createComponentVNode)(2,a.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return c("writeAnnouncement")}}),d?(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,a.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(d&&l),onClick:function(){return c("sendAnnouncement")}})]})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.shipDest,d=i.msgVerified,u=i.ship_dept;return(0,o.createComponentVNode)(2,a.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Validated by",children:d})]}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&d),onClick:function(){return c("printLabel")}}),(0,o.createComponentVNode)(2,a.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,a.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return c("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),a=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,c=e.desc;return(0,o.createComponentVNode)(2,a.Box,{children:[t>0?(0,o.createComponentVNode)(2,a.Divider):null,(0,o.createComponentVNode)(2,a.Box,{children:n}),(0,o.createComponentVNode)(2,a.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,a.Box,{children:["* Summary: ",c]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83),l=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;return l?(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_tech")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_tech")}}),(0,o.createComponentVNode)(2,s)]})]}):null},d=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_data;if(!l)return null;var d=l.name,u=l.lathe_types,m=l.materials,p=u.join(", ");return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Required Materials"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return i("updt_design")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return i("clear_design")}}),(0,o.createComponentVNode)(2,s)]})]})},u=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{submenu:i.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,s)]})]})},s=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type;return l?(0,o.createComponentVNode)(2,a.Button,{content:"Eject Disk",icon:"eject",onClick:function(){i("tech"===l?"eject_tech":"eject_design")}}):null},m=function(e,t){var n=(0,r.useBackend)(t).data,c=n.disk_data,i=n.disk_type;return(0,o.createComponentVNode)(2,a.Section,{title:"Data Disk Contents",children:function(){if(!c)return(0,o.createComponentVNode)(2,u);switch(i){case"design":return(0,o.createComponentVNode)(2,d);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.disk_type,d=c.to_copy;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){i("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,m)}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,p)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),a=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_item;return c.linked_destroy?l?(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,a.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,a.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){i("deconstruct")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject Item",icon:"eject",onClick:function(){i("eject_item")}})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,a.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.category,u=i.matching_designs,s=4===i.menu?"build":"imprint";return(0,o.createComponentVNode)(2,a.Section,{title:d,children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,a.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:u.map((function(e){var t=e.id,n=e.name,r=e.can_build,c=e.materials;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(s,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,a.Button,{content:"x5",onClick:function(){return l(s,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,a.Button,{content:"x10",onClick:function(){return l(s,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_chemicals,d=4===c.menu;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Purge All",icon:"trash",onClick:function(){i(d?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,a.Button,{content:"Purge",icon:"trash",onClick:function(){i(d?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.data,l=n.act,d=i.menu,u=i.categories,s=4===d?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,a.Section,{title:s+" Menu",children:[(0,o.createComponentVNode)(2,c.LatheMaterials),(0,o.createComponentVNode)(2,c.LatheSearch),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Flex,{wrap:"wrap",children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,c=n.total_materials,i=n.max_materials,l=n.max_chemicals,d=n.total_chemicals;return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,a.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:c}),i?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+i}):null]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:d}),l?(0,o.createComponentVNode)(2,a.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),a=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.data,i=n.act,l=c.loaded_materials;return(0,o.createComponentVNode)(2,a.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,a.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===c.menu?"lathe_ejectsheet":"imprinter_ejectsheet";i(n,{id:t,amount:e})},d=Math.floor(n/2e3),u=n<1,s=1===d?"":"s";return(0,o.createComponentVNode)(2,a.Table.Row,{className:u?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,a.Table.Cell,{minWidth:"110px",children:["(",d," sheet",s,")"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,a.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,a.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,a.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),a=n(232),c=n(63),i=n(2),l=n(83);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,d=n.menu,u=n.linked_lathe,s=n.linked_imprinter;return 4!==d||u?5!==d||s?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,c.LatheMainMenu)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,c.LatheCategory)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,c.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,i.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,i.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),a=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",onEnter:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,d=n.linked_destroy,u=n.linked_lathe,s=n.linked_imprinter,m=n.tech_levels;return(0,o.createComponentVNode)(2,a.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,a.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!l,menu:i.MENU.DISK,submenu:i.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!d,menu:i.MENU.DESTROY,submenu:i.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,menu:i.MENU.LATHE,submenu:i.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!s,menu:i.MENU.IMPRINTER,submenu:i.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,c.RndNavButton,{menu:i.MENU.SETTINGS,submenu:i.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,a.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(63),a=n(2),c=n(83);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,a.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==c.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:c.MENU.MAIN,submenu:c.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==c.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:c.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===c.MENU.LATHE||e===c.MENU.IMPRINTER},submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:c.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),a=n(2);t.RndNavButton=function(e,t){var n=e.icon,c=e.children,i=e.disabled,l=e.content,d=(0,r.useBackend)(t),u=d.data,s=d.act,m=u.menu,p=u.submenu,h=m,f=p;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,a.Button,{content:l,icon:n,disabled:i,onClick:function(){s("nav",{menu:h,submenu:f})},children:c})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(63),i=n(83);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,d=n.act,u=l.sync,s=l.admin,m=l.linked_destroy,p=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Sync Database with Network",icon:"sync",disabled:!u,onClick:function(){d("sync")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Connect to Research Network",icon:"plug",disabled:u,onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){d("togglesync")}}),(0,o.createComponentVNode)(2,c.RndNavButton,{disabled:!u,content:"Device Linkage Menu",icon:"link",menu:i.MENU.SETTINGS,submenu:i.SUBMENU.SETTINGS_DEVICES}),1===s?(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return d("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,c.RndRoute,{submenu:i.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return d("find_device")}}),(0,o.createComponentVNode)(2,a.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[m?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),p?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){d("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,a.Button,{icon:"unlink",content:"Unlink",onClick:function(){return d("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(21),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,a.Section,{title:(0,i.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,a.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.can_hack,s=d.safety,m=d.show_lock_all,p=d.cyborgs,h=void 0===p?[]:p;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!m&&(0,o.createComponentVNode)(2,a.Section,{title:"Emergency Lock Down",children:[(0,o.createComponentVNode)(2,a.Button,{icon:s?"lock":"unlock",content:s?"Disable Safety":"Enable Safety",selected:s,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"lock",disabled:s,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return l("masslock",{})}})]}),(0,o.createComponentVNode)(2,i,{cyborgs:h,can_hack:u})]})})};var i=function(e,t){var n=e.cyborgs,c=(e.can_hack,(0,r.useBackend)(t)),i=c.act,l=c.data,d="Detonate";return l.detonate_cooldown>0&&(d+=" ("+l.detonate_cooldown+"s)"),n.length?n.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,a.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return i("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return i("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"bomb",content:d,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){return i("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,a.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,a.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,a.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),s=u.dial,m=u.open;u.locked,u.contents;return(0,o.createComponentVNode)(2,c.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,a.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),m?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,a.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*s+"deg)","z-index":0}})]}),!m&&(0,o.createComponentVNode)(2,d)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.dial,d=i.open,u=i.locked,s=function(e,t){return(0,o.createComponentVNode)(2,a.Button,{disabled:d||t&&!u,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return c(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:u,icon:d?"lock":"lock-open",content:d?"Close":"Open",mb:"0.5rem",onClick:function(){return c("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",children:[s(50),s(10),s(1)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[s(1,!0),s(10,!0),s(50,!0)]}),(0,o.createComponentVNode)(2,a.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.contents;return(0,o.createComponentVNode)(2,a.Box,{className:"Safe--contents",overflow:"auto",children:i.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{mb:"0.5rem",onClick:function(){return c("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},d=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,a.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.satellites,u=l.notice,s=l.meteor_shield,m=l.meteor_shield_coverage,p=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[s&&(0,o.createComponentVNode)(2,a.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{color:h>=100?"good":"average",value:m,maxValue:p,children:[h," %"]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,a.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return i("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(10),a=n(1),c=n(2),i=n(3),l=n(68),d=n(99);t.SecureStorage=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"securestorage",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,u)})})};var u=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),u=i.locked,m=i.no_passcode,p=i.emagged,h=i.user_entered_code,f=m?"":u?"bad":"good";return(0,o.createComponentVNode)(2,c.Section,{height:"100%",stretchContents:!0,onKeyDown:function(e){return function(e,t){var n=(0,a.useBackend)(t).act,o=window.event?e.which:e.keyCode;return o===d.KEY_ENTER?(e.preventDefault(),void n("keypad",{digit:"E"})):o===d.KEY_ESCAPE?(e.preventDefault(),void n("keypad",{digit:"C"})):o===d.KEY_BACKSPACE?(e.preventDefault(),void n("backspace")):o>=d.KEY_0&&o<=d.KEY_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_0})):o>=d.KEY_NUMPAD_0&&o<=d.KEY_NUMPAD_9?(e.preventDefault(),void n("keypad",{digit:o-d.KEY_NUMPAD_0})):void 0}(e,t)},children:[(0,o.createComponentVNode)(2,c.Flex.Item,{height:"20%",mb:"5px",children:(0,o.createComponentVNode)(2,c.Box,{className:(0,r.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+f]),height:"100%",children:p?"ERROR":h})}),(0,o.createComponentVNode)(2,c.Table,{width:"1px",children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map((function(e){return(0,o.createComponentVNode)(2,l.TableRow,{children:e.map((function(e){return(0,o.createComponentVNode)(2,l.TableCell,{children:(0,o.createComponentVNode)(2,s,{number:e})},e)}))},e[0])}))})]})},s=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=(n.data,e.number);return(0,o.createComponentVNode)(2,c.Button,{fluid:!0,bold:!0,mb:"6px",content:l,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,r.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+l]),onClick:function(){return i("keypad",{digit:l})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(21),a=n(1),c=n(2),i=n(38),l=n(3),d=n(28),u=n(123),s=n(124),m=n(169),p={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,d.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,a.useBackend)(t),i=(r.act,r.data),p=i.loginState,h=i.currentPage;return p.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,d.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u.LoginInfo),(0,o.createComponentVNode)(2,m.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,c.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.currentPage,d=i.general;return(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"list"}),"List Records"]}),2===l&&d&&!d.empty&&(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,children:[(0,o.createComponentVNode)(2,c.Icon,{name:"file"}),"Record: ",d.fields[0].value]})]})},C=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.records,d=(0,a.useLocalState)(t,"searchText",""),u=d[0],s=(d[1],(0,a.useLocalState)(t,"sortId","name")),m=s[0],h=(s[1],(0,a.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,b),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,c.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,c.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,N,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,N,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,N,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,N,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,N,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(u,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[m].localeCompare(t[m])*n})).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{className:"SecurityRecords__listRow--"+p[e.status],onClick:function(){return i("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:e.status})]},e.id)}))]})})]})},N=function(e,t){var n=(0,a.useLocalState)(t,"sortId","name"),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"sortOrder",!0),d=l[0],u=l[1],s=e.id,m=e.children;return(0,o.createComponentVNode)(2,c.Table.Cell,{children:(0,o.createComponentVNode)(2,c.Button,{color:r!==s&&"transparent",width:"100%",onClick:function(){r===s?u(!d):(i(s),u(!0))},children:[m,r===s&&(0,o.createComponentVNode)(2,c.Icon,{name:d?"sort-up":"sort-down",ml:"0.25rem;"})]})})},b=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data.isPrinting,u=(0,a.useLocalState)(t,"searchText",""),s=(u[0],u[1]);return(0,o.createComponentVNode)(2,c.Flex,{children:[(0,o.createComponentVNode)(2,i.FlexItem,{children:[(0,o.createComponentVNode)(2,c.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,d.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,i.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return s(t)}})})]})},V=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.isPrinting,d=i.general,u=i.security;return d&&d.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,c.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,c.Button.Confirm,{icon:"trash",disabled:u.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,v)})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,a.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,c.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,a.useBackend)(t),i=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,c.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,c.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,c.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,d.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,c.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return i("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,c.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return i("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SeedExtractor=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.stored_seeds,s=d.vend_amount;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,a.Section,{title:"Stored Seeds",children:[(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createTextVNode)("Set Amount to be Vended:\xa0"),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:s,width:"40px",minValue:1,maxValue:25,stepPixelSize:3,onDrag:function(e,t){return l("set_vend_amount",{vend_amount:t})}})],4),null!=u&&u.length?(0,o.createComponentVNode)(2,i):"No Seeds"]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.stored_seeds;return(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Lifespan"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Endurance"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Maturation"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Production"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Yield"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Potency"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"middle",children:"Stock"})]}),i.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),e.name,e.variant?" ("+e.variant+")":""]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.lifespan}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.endurance}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.maturation}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.production}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.yield}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.potency}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Vend",icon:"arrow-circle-down",onClick:function(){return c("vend",{seedid:e.id,seedvariant:e.variant})}}),"\xa0(",e.amount," Left)"]})]},t)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(44);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Location",children:d.status?d.status:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!d.shuttle&&(!!d.docking_ports_len&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Send to ",children:d.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-right",content:e.name,onClick:function(){return l("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,a.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!d.admin_controlled&&(0,o.createComponentVNode)(2,i.LabeledListItem,{label:"Authorization",children:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!d.status,onClick:function(){return l("request")}})})],0))]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),u=n[0],s=n[1];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===u,onClick:function(){return s(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===u,onClick:function(){return s(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===u,onClick:function(){return s(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,i);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}(u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.shuttles;return(0,o.createComponentVNode)(2,a.Box,{children:i.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return c("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.templates_tabs,d=i.existing_shuttle,u=i.templates;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e===d.id,icon:"file",content:e,onClick:function(){return c("select_template_category",{cat:e})}},e)}))}),!!d&&u[d.id].templates.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Load Template",icon:"download",onClick:function(){return c("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.existing_shuttle,d=i.selected;return(0,o.createComponentVNode)(2,a.Box,{children:[l?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,a.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return c("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Shuttle: None"}),d?(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: "+d.name,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[d.description&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:d.description}),d.admin_notes&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Admin Notes",children:d.admin_notes}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Preview",icon:"eye",onClick:function(){return c("preview",{shuttle_id:d.shuttle_id})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Load",icon:"download",onClick:function(){return c("load",{shuttle_id:d.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,a.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],d=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,Infinity]},s=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,m):(0,o.createComponentVNode)(2,N));return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var m=function(e,t){var n=(0,a.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},p=function(e,t){var n=(0,a.useBackend)(t),i=n.act,d=n.data,u=d.occupant,m=d.auto_eject_dead;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,c.Button,{icon:m?"toggle-on":"toggle-off",selected:m,content:m?"On":"Off",onClick:function(){return i("auto_eject_dead_"+(m?"off":"on"))}}),(0,o.createComponentVNode)(2,c.Button,{icon:"user-slash",content:"Eject",onClick:function(){return i("ejectify")}})],4),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(u.health,0)})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.maxTemp,value:u.bodyTemperature/u.maxTemp,color:s[u.temperatureSuitability+3],children:[(0,r.round)(u.btCelsius,0),"\xb0C,",(0,r.round)(u.btFaren,0),"\xb0F"]})}),!!u.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u.bloodMax,value:u.bloodLevel/u.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[u.bloodPercent,"%, ",u.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[u.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,a.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:d.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:u,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.hasOccupant,d=i.isBeakerLoaded,u=i.beakerMaxSpace,s=i.beakerFreeSpace,m=i.dialysis&&s>0;return(0,o.createComponentVNode)(2,c.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Button,{disabled:!d||s<=0||!l,selected:m,icon:m?"toggle-on":"toggle-off",content:m?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:!d,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:d?(0,o.createComponentVNode)(2,c.LabeledList,{children:(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:s/u,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[s,"u"]})})}):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.occupant,d=i.chemicals,u=i.maxchem,s=i.amounts;return(0,o.createComponentVNode)(2,c.Section,{title:"Occupant Chemicals",flexGrow:"1",children:d.map((function(e,t){var n,a="";return e.overdosing?(a="bad",n=(0,o.createComponentVNode)(2,c.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(a="average",n=(0,o.createComponentVNode)(2,c.Box,{color:"average",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,c.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,c.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,c.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:u,value:e.occ_amount/u,color:a,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",u,"u"]}),s.map((function(t,n){return(0,o.createComponentVNode)(2,c.Button,{disabled:!e.injectable||e.occ_amount+t>u||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},N=function(e,t){return(0,o.createComponentVNode)(2,c.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SlotMachine=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return null===d.money?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,a.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===d.plays?d.plays+" player has tried their luck today!":d.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d.money})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"10 credits to spin",children:(0,o.createComponentVNode)(2,a.Button,{icon:"coins",disabled:d.working,content:d.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,lineHeight:2,color:d.resultlvl,children:d.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.secure,u=l.can_dry,s=l.drying,m=l.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!u&&(0,o.createComponentVNode)(2,a.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return i("drying")}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Contents",children:[!m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:" No products loaded. "}),!!m&&m.slice().sort((function(e,t){return e.display_name.localeCompare(t.display_name)})).map((function(e){return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return i("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return i("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return i("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),a=n(2),c=n(125),i=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.capacityPercent,s=(d.capacity,d.charge),m=d.inputAttempt,p=d.inputting,h=d.inputLevel,f=d.inputLevelMax,C=d.inputAvailable,N=d.outputAttempt,b=d.outputting,V=d.outputLevel,g=d.outputLevelMax,v=d.outputUsed,y=(u>=100?"good":p&&"average")||"bad",_=(b?"good":s>0&&"average")||"bad";return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:.01*u,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Input",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:m?"sync-alt":"times",selected:m,onClick:function(){return l("tryinput")},children:m?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:y,children:(u>=100?"Fully Charged":p&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Available",children:(0,c.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Output",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",selected:N,onClick:function(){return l("tryoutput")},children:N?"On":"Off"}),children:(0,o.createComponentVNode)(2,a.Box,{color:_,children:b?"Sending":s>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:0===V,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"backward",disabled:0===V,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,a.Slider,{value:V/1e3,minValue:0,maxValue:g/1e3,step:5,stepPixelSize:4,format:function(e){return(0,c.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"forward",disabled:V===g,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:V===g,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Outputting",children:(0,c.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.generated,u=l.generated_ratio,s=l.tracking_state,m=l.tracking_rate,p=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,N=l.rotating_direction;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return i("refresh")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Solar panels",color:p>0?"good":"bad",children:p})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,a.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:u,children:d+" W"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[2===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Automated "}),1===s&&(0,o.createComponentVNode)(2,a.Box,{children:[" ",m,"\xb0/h (",N,")"," "]}),0===s&&(0,o.createComponentVNode)(2,a.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Panel orientation",children:[2!==s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return i("cdir",{cdir:t})}}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Off",selected:0===s,onClick:function(){return i("track",{track:0})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"clock-o",content:"Timed",selected:1===s,onClick:function(){return i("track",{track:1})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Auto",selected:2===s,disabled:!h,onClick:function(){return i("track",{track:2})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tracker rotation",children:[1===s&&(0,o.createComponentVNode)(2,a.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:m,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return i("tdir",{tdir:t})}}),0===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Tracker offline "}),2===s&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return i("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return i("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,a.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpecMenu=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.SpecMenu=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Hemomancer",onClick:function(){return c("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16),(0,o.createComponentVNode)(2,a.Button,{content:"Umbrae",onClick:function(){return c("umbrae")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Desecrated Duel",16),(0,o.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Gargantua",onClick:function(){return c("gargantua")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,a.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,a.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4),(0,o.createComponentVNode)(2,a.Button,{content:"Dantalion",onClick:function(){return c("dantalion")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i)})})};var i=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],c=n.Fire||[],i=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===i.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),i.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.StationTraitsPanel=void 0;var o,r=n(0),a=n(699),c=n(700),i=n(1),l=n(2),d=n(3);!function(e){e[e.SetupFutureStationTraits=0]="SetupFutureStationTraits",e[e.ViewStationTraits=1]="ViewStationTraits"}(o||(o={}));var u=function(e,t){var n=(0,i.useBackend)(t),o=n.act,c=n.data,d=c.future_station_traits,u=(0,i.useLocalState)(t,"selectedFutureTrait",null),s=u[0],m=u[1],p=Object.fromEntries(c.valid_station_traits.map((function(e){return[e.name,e.path]}))),h=Object.keys(p);return h.sort(),(0,r.createComponentVNode)(2,l.Box,{children:[(0,r.createComponentVNode)(2,l.Flex,{fill:!0,children:[(0,r.createComponentVNode)(2,l.Flex.Item,{grow:!0,children:(0,r.createComponentVNode)(2,l.Dropdown,{displayText:!s&&"Select trait to add...",onSelected:m,options:h,selected:s,width:"190px"})}),(0,r.createComponentVNode)(2,l.Flex.Item,{children:(0,r.createComponentVNode)(2,l.Button,{color:"green",icon:"plus",onClick:function(){if(s){var e=p[s],t=[e];if(d){var n,r=d.map((function(e){return e.path}));if(-1!==r.indexOf(e))return;t=(n=t).concat.apply(n,r)}o("setup_future_traits",{station_traits:t})}},children:"Add"})})]}),(0,r.createComponentVNode)(2,l.Divider),Array.isArray(d)?d.length>0?(0,r.createComponentVNode)(2,l.Flex,{direction:"column",children:d.map((function(e){return(0,r.createVNode)(1,"div",null,(0,r.createComponentVNode)(2,l.Flex.Item,{children:(0,r.createComponentVNode)(2,l.Flex,{fill:!0,children:[(0,r.createComponentVNode)(2,l.Flex.Item,{grow:!0,children:e.name}),(0,r.createComponentVNode)(2,l.Flex.Item,{children:(0,r.createComponentVNode)(2,l.Button,{color:"red",icon:"times",onClick:function(){o("setup_future_traits",{station_traits:(0,a.filterMap)(d,(function(t){return t.path===e.path?undefined:t.path}))})},children:"Delete"})})]})}),2,null,e.path)}))}):(0,r.createFragment)([(0,r.createComponentVNode)(2,l.Box,{children:"No station traits will run next round."}),(0,r.createComponentVNode)(2,l.Box,{children:(0,r.createComponentVNode)(2,l.Button,{color:"red",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){return o("clear_future_traits")},children:"Run Station Traits Normally"})})],4):(0,r.createFragment)([(0,r.createComponentVNode)(2,l.Box,{children:"No future station traits are planned."}),(0,r.createComponentVNode)(2,l.Box,{children:(0,r.createComponentVNode)(2,l.Button,{color:"red",icon:"times",onClick:function(){return o("setup_future_traits",{station_traits:[]})},children:"Prevent station traits from running next round"})})],4)]})},s=function(e,t){var n=(0,i.useBackend)(t),o=n.act,a=n.data;return a.current_traits.length>0?(0,r.createComponentVNode)(2,l.Flex,{direction:"column",children:a.current_traits.map((function(e){return(0,r.createVNode)(1,"div",null,(0,r.createComponentVNode)(2,l.Flex.Item,{children:(0,r.createComponentVNode)(2,l.Flex,{fill:!0,children:[(0,r.createComponentVNode)(2,l.Flex.Item,{grow:!0,children:e.name}),(0,r.createComponentVNode)(2,l.Flex.Item,{children:(0,r.createComponentVNode)(2,l.Button.Confirm,{content:"Revert",color:"red",disabled:a.too_late_to_revert||!e.can_revert,tooltip:e.can_revert?a.too_late_to_revert&&"It's too late to revert station traits, the round has already started.":"This trait is not revertable.",icon:"times",onClick:function(){return o("revert",{ref:e.ref})}})})]})}),2,null,e.ref)}))}):(0,r.createComponentVNode)(2,l.Box,{children:"There are no active station traits."})};t.StationTraitsPanel=function(e,t){var n,a=(0,i.useLocalState)(t,"station_traits_tab",o.ViewStationTraits),m=a[0],p=a[1];switch(m){case o.SetupFutureStationTraits:n=(0,r.createComponentVNode)(2,u);break;case o.ViewStationTraits:n=(0,r.createComponentVNode)(2,s);break;default:(0,c.exhaustiveCheck)(m)}return(0,r.createComponentVNode)(2,d.Window,{title:"Modify Station Traits",height:500,width:500,children:(0,r.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:[(0,r.createComponentVNode)(2,l.Tabs,{children:[(0,r.createComponentVNode)(2,l.Tabs.Tab,{icon:"eye",selected:m===o.ViewStationTraits,onClick:function(){return p(o.ViewStationTraits)},children:"View"}),(0,r.createComponentVNode)(2,l.Tabs.Tab,{icon:"edit",selected:m===o.SetupFutureStationTraits,onClick:function(){return p(o.SetupFutureStationTraits)},children:"Edit"})]}),(0,r.createComponentVNode)(2,l.Divider),n]})})}},function(e,t,n){"use strict";function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ni)return 1}return 0},i=function(){for(var e=arguments.length,t=new Array(e),n=0;n>1]))r?l:l+1}(e,t,n),0,n),o}};t.paginate=function(e,t){for(var n,r=[],a=[],c=t,i=o(e);!(n=i()).done;){var l=n.value;a.push(l),--c||(c=t,r.push(a),a=[])}return a.length&&r.push(a),r};var p=function(e){return"object"==typeof e&&null!==e};t.deepMerge=function h(){for(var e={},t=arguments.length,n=new Array(t),o=0;o=.01}))},(0,r.sortBy)((function(e){return-e.amount}))])(p.gases||[]),V=Math.max.apply(Math,[1].concat(b.map((function(e){return e.amount}))));return(0,o.createComponentVNode)(2,u.Window,{children:(0,o.createComponentVNode)(2,u.Window.Content,{children:(0,o.createComponentVNode)(2,l.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,l.Flex.Item,{width:"270px",children:(0,o.createComponentVNode)(2,l.Section,{title:"Metrics",children:(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:h/100,ranges:{good:[.9,Infinity],average:[.5,.9],bad:[-Infinity,.5]}})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:f,minValue:0,maxValue:5e3,ranges:{good:[-Infinity,5e3],average:[5e3,7e3],bad:[7e3,Infinity]},children:(0,c.toFixed)(f)+" MeV/cm3"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(C),minValue:0,maxValue:s(1e4),ranges:{teal:[-Infinity,s(80)],good:[s(80),s(373)],average:[s(373),s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(C)+" K"})}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,l.ProgressBar,{value:s(N),minValue:0,maxValue:s(5e4),ranges:{good:[s(1),s(300)],average:[-Infinity,s(1e3)],bad:[s(1e3),Infinity]},children:(0,c.toFixed)(N)+" kPa"})})]})})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Gases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"arrow-left",content:"Back",onClick:function(){return m("back")}}),children:(0,o.createComponentVNode)(2,l.LabeledList,{children:b.map((function(e){return(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:(0,d.getGasLabel)(e.name),children:(0,o.createComponentVNode)(2,l.ProgressBar,{color:(0,d.getGasColor)(e.name),value:e.amount,minValue:0,maxValue:V,children:(0,c.toFixed)(e.amount,2)+"%"})},e.name)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),a=n(2),c=(n(44),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data;return(0,o.createComponentVNode)(2,c.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,a.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return i(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,a.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TEG=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")};t.TEG=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data;return d.error?(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[d.error,(0,o.createComponentVNode)(2,a.Button,{icon:"circle",content:"Recheck",onClick:function(){return l("check")}})]})})}):(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Cold Loop ("+d.cold_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Inlet",children:[i(d.cold_inlet_temp)," K,"," ",i(d.cold_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cold Outlet",children:[i(d.cold_outlet_temp)," K,"," ",i(d.cold_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Hot Loop ("+d.hot_dir+")",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Inlet",children:[i(d.hot_inlet_temp)," K,"," ",i(d.hot_inlet_pressure)," kPa"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hot Outlet",children:[i(d.hot_outlet_temp)," K,"," ",i(d.hot_outlet_pressure)," kPa"]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Power Output",children:[i(d.output_power)," W",!!d.warning_switched&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!d.warning_cold_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!d.warning_hot_pressure&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.records,s=void 0===u?[]:u,m=d.explosion_target,p=d.toxins_tech,h=d.printing;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shift's Target",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current Toxins Level",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print All Logs",disabled:!s.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!s.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),s.length?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Records"})]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.records,l=void 0===i?[]:i;return(0,o.createComponentVNode)(2,a.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,a.Flex,{children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return c("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=i},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Tank=function(e,t){var n,i=(0,r.useBackend)(t),l=i.act,d=i.data;return n=d.has_mask?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,a.Button,{icon:d.connected?"check":"times",content:d.connected?"Internals On":"Internals Off",selected:d.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:d.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"fast-backward",disabled:d.ReleasePressure===d.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,a.NumberInput,{animated:!0,value:parseFloat(d.releasePressure),width:"65px",unit:"kPa",minValue:d.minReleasePressure,maxValue:d.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"fast-forward",disabled:d.ReleasePressure===d.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:d.ReleasePressure===d.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.o_tanks,u=l.p_tanks;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Oxygen Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return i("oxygen")}})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Dispense Plasma Tank ("+u+")",disabled:0===u,icon:"arrow-circle-down",onClick:function(){return i("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),s=(n.act,n.data.ion),m=(0,r.useLocalState)(t,"tabIndex",0),p=m[0],h=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[1===s&&(0,o.createComponentVNode)(2,i),(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:0===p,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===p,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===p,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,d);case 2:return(0,o.createComponentVNode)(2,u);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(p)]})})};var i=function(){return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.active,d=i.sectors_available,u=i.nttc_toggle_jobs,s=i.nttc_toggle_job_color,m=i.nttc_toggle_name_color,p=i.nttc_toggle_command_bold,h=i.nttc_job_indicator_type,f=i.nttc_setting_language,C=i.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return c("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"On":"Off",selected:u,icon:"user-tag",onClick:function(){return c("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:s?"On":"Off",selected:s,icon:"clipboard-list",onClick:function(){return c("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"user-tag",onClick:function(){return c("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,a.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){return c("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,a.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return c("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,a.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return c("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return c("network_id")}})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return c("import")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return c("export")}})]})],4)},d=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.link_password,d=i.relay_entries;return(0,o.createComponentVNode)(2,a.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,a.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return c("change_password")}})})}),(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Unlink"})]}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",onClick:function(){return c("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},u=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.filtered_users;return(0,o.createComponentVNode)(2,a.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Add User",icon:"user-plus",onClick:function(){return c("add_filter")}}),children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,a.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Remove",icon:"user-times",onClick:function(){return c("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),d=n.act,u=n.data,s=u.linked,m=u.active,p=u.network_id;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,a.Button,{content:m?"On":"Off",selected:m,icon:"power-off",onClick:function(){return d("toggle_active")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,a.Button,{content:p||"Unset",selected:p,icon:"server",onClick:function(){return d("network_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Link Status",children:1===s?(0,o.createComponentVNode)(2,a.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"Unlinked"})})]})}),1===s?(0,o.createComponentVNode)(2,i):(0,o.createComponentVNode)(2,l)]})})};var i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=i.linked_core_id,d=i.linked_core_addr,u=i.hidden_link;return(0,o.createComponentVNode)(2,a.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Linked Core Address",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,a.Button,{content:u?"Yes":"No",icon:u?"eye-slash":"eye",selected:u,onClick:function(){return c("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,a.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return c("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data.cores;return(0,o.createComponentVNode)(2,a.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,a.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Link"})]}),i.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{content:"Link",icon:"link",onClick:function(){return c("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(223);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.targetsTeleport?d.targetsTeleport:{},s=d.calibrated,m=d.calibrating,p=d.powerstation,h=d.regime,f=d.teleporterhub,C=d.target,N=d.locked;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(!p||!f)&&(0,o.createComponentVNode)(2,a.Section,{title:"Error",children:[f,!p&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Powerstation not linked "}),p&&!f&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:" Teleporter hub not linked "})]}),p&&f&&(0,o.createComponentVNode)(2,a.Section,{title:"Status",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!N,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),1===h&&(0,o.createComponentVNode)(2,a.Dropdown,{width:"220px",selected:C,options:Object.keys(u),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:u[e].x,y:u[e].y,z:u[e].z})}}),2===h&&(0,o.createComponentVNode)(2,a.Box,{children:C})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,i.GridColumn,{size:"2",children:m&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"In Progress"})||s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,i.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,a.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,a.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!s&&!m),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,a.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(N&&p&&f&&2===h)&&(0,o.createComponentVNode)(2,a.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TempGun=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.TempGun=function(e,t){var n=(0,a.useBackend)(t),s=n.act,m=n.data,p=m.target_temperature,h=m.temperature,f=m.max_temp,C=m.min_temp;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,c.Section,{children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:[(0,o.createComponentVNode)(2,c.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:C,maxValue:f,value:p,format:function(e){return(0,r.toFixed)(e,2)},width:"50px",onDrag:function(e,t){return s("target_temperature",{target_temperature:t})}}),"\xb0C"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Current Temperature",children:(0,o.createComponentVNode)(2,c.Box,{color:l(h),bold:h>500-273.15,children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:(0,r.round)(h,2)}),"\xb0C"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Power Cost",children:(0,o.createComponentVNode)(2,c.Box,{color:u(h),children:d(h)})})]})})})})};var l=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},d=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},u=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},function(e,t,n){"use strict";t.__esModule=!0,t.ThermoMachine=void 0;var o=n(0),r=n(12),a=n(1),c=n(2),i=n(3);t.ThermoMachine=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.temperature,format:function(e){return(0,r.toFixed)(e,2)}})," K"]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pressure",children:[(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:d.pressure,format:function(e){return(0,r.toFixed)(e,2)}})," kPa"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Controls",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:d.on?"power-off":"times",content:d.on?"On":"Off",selected:d.on,onClick:function(){return l("power")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Setting",children:(0,o.createComponentVNode)(2,c.Button,{icon:d.cooling?"temperature-low":"temperature-high",content:d.cooling?"Cooling":"Heating",selected:d.cooling,onClick:function(){return l("cooling")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Target Temperature",children:(0,o.createComponentVNode)(2,c.NumberInput,{animated:!0,value:Math.round(d.target),unit:"K",width:"62px",minValue:Math.round(d.min),maxValue:Math.round(d.max),step:5,stepPixelSize:3,onDrag:function(e,t){return l("target",{target:t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Presets",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"fast-backward",disabled:d.target===d.min,title:"Minimum temperature",onClick:function(){return l("target",{target:d.min})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"sync",disabled:d.target===d.initial,title:"Room Temperature",onClick:function(){return l("target",{target:d.initial})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"fast-forward",disabled:d.target===d.max,title:"Maximum Temperature",onClick:function(){return l("target",{target:d.max})}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TransferValve=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.TransferValve=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.tank_one,u=l.tank_two,s=l.attached_device,m=l.valve;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Valve Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:m?"unlock":"lock",content:m?"Open":"Closed",disabled:!d||!u,onClick:function(){return i("toggle")}})})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Assembly",buttons:(0,o.createComponentVNode)(2,a.Button,{textAlign:"center",width:"150px",icon:"cog",content:"Configure Assembly",disabled:!s,onClick:function(){return i("device")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:s,disabled:!s,onClick:function(){return i("remove_device")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Assembly"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment One",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:d,disabled:!d,onClick:function(){return i("tankone")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})}),(0,o.createComponentVNode)(2,a.Section,{title:"Attachment Two",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:u?(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Attachment",children:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:u,disabled:!u,onClick:function(){return i("tanktwo")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Attach Tank"})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TurbineComputer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3),i=n(12);t.TurbineComputer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.compressor,m=u.compressor_broken,p=u.turbine,h=u.turbine_broken,f=u.online,C=Boolean(s&&!m&&p&&!h);return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:f?"power-off":"times",content:f?"Online":"Offline",selected:f,disabled:!C,onClick:function(){return i("toggle_power")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Disconnect",onClick:function(){return i("disconnect")}})],4),children:C?(0,o.createComponentVNode)(2,d):(0,o.createComponentVNode)(2,l)})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,c=n.compressor,i=n.compressor_broken,l=n.turbine,d=n.turbine_broken;n.online;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Compressor Status",color:!c||i?"bad":"good",children:i?c?"Offline":"Missing":"Online"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Status",color:!l||d?"bad":"good",children:d?l?"Offline":"Missing":"Online"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,c=n.rpm,l=n.temperature,d=n.power,u=n.bearing_heat;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Turbine Speed",children:[c," RPM"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Internal Temp",children:[l," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Generated Power",children:[d," W"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Bearing Heat",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u,minValue:0,maxValue:100,ranges:{good:[-Infinity,60],average:[60,90],bad:[90,Infinity]},children:(0,i.toFixed)(u)+"%"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Uplink=void 0;var o=n(0),r=n(30),a=n(48),c=n(21),i=n(1),l=n(2),d=n(38),u=n(3),s=n(28),m=function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,h);case 2:return(0,o.createComponentVNode)(2,V);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}};t.Uplink=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data.cart,c=(0,i.useLocalState)(t,"tabIndex",0),d=c[0],p=c[1],h=(0,i.useLocalState)(t,"searchText",""),f=(h[0],h[1]);return(0,o.createComponentVNode)(2,u.Window,{theme:"syndicate",children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l.Tabs,{children:[(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:0===d,onClick:function(){p(0),f("")},icon:"store",children:"View Market"},"PurchasePage"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:1===d,onClick:function(){p(1),f("")},icon:"shopping-cart",children:["View Shopping Cart"," ",a&&a.length?"("+a.length+")":""]},"Cart"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:2===d,onClick:function(){p(2),f("")},icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,o.createComponentVNode)(2,l.Tabs.Tab,{onClick:function(){return r("lock")},icon:"lock",children:"Lock Uplink"},"LockUplink")]}),m(d)]})]})};var p=function(e,t){var n=(0,i.useBackend)(t),u=n.act,s=n.data,m=s.crystals,p=s.cats,h=(0,i.useLocalState)(t,"uplinkItems",p[0].items),f=h[0],N=h[1],b=(0,i.useLocalState)(t,"searchText",""),V=b[0],g=b[1],v=function(e){if(g(e),""===e)return N(p[0].items);N(function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){var t=1===e.hijack_only?"|hijack":"";return e.name+"|"+e.desc+"|"+e.cost+"tc"+t}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return null==e?void 0:e.name}))])(e)}(p.map((function(e){return e.items})).flat(),e))},y=(0,i.useLocalState)(t,"showDesc",1),_=y[0],x=y[1];return(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+m+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:_,onClick:function(){return x(!_)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Random Item",icon:"question",onClick:function(){return u("buyRandom")}}),(0,o.createComponentVNode)(2,l.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return u("refund")}})],4),children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1.5,placeholder:"Search Equipment",onInput:function(e,t){v(t)},value:V}),(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{children:(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:p.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:""===V&&e.items===f,onClick:function(){N(e.items),g("")},children:e.cat},e)}))})}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:f.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:_},(0,c.decodeHtmlEntities)(e.name))}))})]})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,d=a.cart,u=a.crystals,s=a.cart_price,m=(0,i.useLocalState)(t,"showDesc",0),p=m[0],h=m[1];return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Section,{title:"Current Balance: "+u+"TC",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button.Checkbox,{content:"Show Descriptions",checked:p,onClick:function(){return h(!p)}}),(0,o.createComponentVNode)(2,l.Button,{content:"Empty Cart",icon:"trash",onClick:function(){return r("empty_cart")},disabled:!d}),(0,o.createComponentVNode)(2,l.Button,{content:"Purchase Cart ("+s+"TC)",icon:"shopping-cart",onClick:function(){return r("purchase_cart")},disabled:!d||s>u})],4),children:(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:d?d.map((function(e){return(0,o.createComponentVNode)(2,C,{i:e,showDecription:p,buttons:(0,o.createComponentVNode)(2,b,{i:e})},(0,c.decodeHtmlEntities)(e.name))})):(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})}),(0,o.createComponentVNode)(2,f)],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=a.cats,d=a.lucky_numbers;return(0,o.createComponentVNode)(2,l.Section,{title:"Suggested Purchases",buttons:(0,o.createComponentVNode)(2,l.Button,{icon:"dice",content:"See more suggestions",onClick:function(){return r("shuffle_lucky_numbers")}}),children:(0,o.createComponentVNode)(2,l.Box,{display:"flex",flexWrap:"wrap",mb:"5px",children:d.map((function(e){return c[e.cat].items[e.item]})).filter((function(e){return e!==undefined&&null!==e})).map((function(e,t){return(0,o.createComponentVNode)(2,l.Flex.Item,{flexShrink:0,p:"0.5%",width:"49%",children:(0,o.createComponentVNode)(2,C,{grow:!0,i:e})},t)}))})})},C=function(e,t){var n=e.i,r=e.showDecription,a=void 0===r?1:r,i=e.buttons,d=void 0===i?(0,o.createComponentVNode)(2,N,{i:n}):i;return(0,o.createComponentVNode)(2,l.Section,{title:(0,c.decodeHtmlEntities)(n.name),showBottom:a,borderRadius:"5px",buttons:d,stretchContents:!0,children:a?(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,c.decodeHtmlEntities)(n.desc)}):null})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i,d=a.crystals;return(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Button,{icon:"shopping-cart",color:1===c.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return r("add_to_cart",{item:c.obj_path})},disabled:c.cost>d}),(0,o.createComponentVNode)(2,l.Button,{content:"Buy ("+c.cost+"TC)"+(c.refundable?" [Refundable]":""),color:1===c.hijack_only&&"red",tooltip:1===c.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return r("buyItem",{item:c.obj_path})},disabled:c.cost>d})],4)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,c=e.i;a.exploitable;return(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,l.Button,{icon:"times",content:"("+c.cost*c.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return r("remove_from_cart",{item:c.obj_path})}}),(0,o.createComponentVNode)(2,l.Button,{icon:"minus",tooltip:0===c.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:--c.amount})},disabled:c.amount<=0}),(0,o.createComponentVNode)(2,l.Button.Input,{content:c.amount,width:"45px",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onCommit:function(e,t){return r("set_cart_item_quantity",{item:c.obj_path,quantity:t})},disabled:-1!==c.limit&&c.amount>=c.limit&&c.amount<=0}),(0,o.createComponentVNode)(2,l.Button,{icon:"plus",tooltipPosition:"bottom-left",tooltip:0===c.limit&&"Discount already redeemed!",onClick:function(){return r("set_cart_item_quantity",{item:c.obj_path,quantity:++c.amount})},disabled:-1!==c.limit&&c.amount>=c.limit})]})},V=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.exploitable),s=(0,i.useLocalState)(t,"selectedRecord",u[0]),m=s[0],p=s[1],h=(0,i.useLocalState)(t,"searchText",""),f=h[0],C=h[1],N=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,a.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(u,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:N.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===m,onClick:function(){return p(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+m.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",m.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",m.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",m.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",m.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",m.species]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Vending=void 0;var o=n(0),r=(n(10),n(1)),a=n(2),c=n(3),i=function(e,t){var n=(0,r.useBackend)(t),c=n.act,i=n.data,l=e.product,d=e.productStock,u=e.productImage,s=i.chargesMoney,m=(i.user,i.usermoney),p=i.inserted_cash,h=i.vend_ready,f=(i.inserted_item_name,!s||0===l.price),C="ERROR!",N="";f?(C="FREE",N="arrow-circle-down"):(C=l.price,N="shopping-cart");var b=!h||0===d||!f&&l.price>m&&l.price>p;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{color:(d<=0?"bad":d<=l.max_amount/2&&"average")||"good",children:[d," in stock"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,disabled:b,icon:N,content:C,textAlign:"left",onClick:function(){return c("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),d=l.act,u=l.data,s=u.user,m=u.usermoney,p=u.inserted_cash,h=u.chargesMoney,f=u.product_records,C=void 0===f?[]:f,N=u.hidden_records,b=void 0===N?[]:N,V=u.stock,g=(u.vend_ready,u.inserted_item_name),v=u.panel_open,y=u.speaker,_=u.imagelist;return n=[].concat(C),u.extended_inventory&&(n=[].concat(n,b)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,c.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"User",children:[s&&(0,o.createComponentVNode)(2,a.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,s.name,0),", ",(0,o.createVNode)(1,"b",null,s.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),".",(0,o.createVNode)(1,"br")]}),(0,o.createComponentVNode)(2,a.Box,{children:["There is ",(0,o.createVNode)(1,"b",null,[p,(0,o.createTextVNode)(" credits ")],0)," of space cash inserted.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return d("change")}})]})]}),!!g&&(0,o.createComponentVNode)(2,a.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return d("eject_item",{})}}),children:(0,o.createComponentVNode)(2,a.Box,{children:g})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,a.Button,{icon:y?"check":"volume-mute",selected:y,content:"Speaker",textAlign:"left",onClick:function(){return d("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,a.Section,{title:"Products",children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,i,{product:e,productStock:V[e.name],productImage:_[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return i("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,a.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return i("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.remaining,u=l.question,s=l.choices,m=l.user_vote,p=l.counts,h=l.show_counts;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:u,children:[(0,o.createComponentVNode)(2,a.Box,{mb:1,children:["Time remaining: ",Math.round(d/10),"s"]}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{multiLine:e,content:e+(h?" ("+(p[e]||0)+")":""),onClick:function(){return i("vote",{target:e})},selected:e===m})},e)}))]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data,d=l.wires||[],u=l.status||[];return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return i("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Pulse",onClick:function(){return i("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,a.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return i("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!u.length&&(0,o.createComponentVNode)(2,a.Section,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.WizardApprenticeContract=void 0;var o=n(0),r=n(1),a=n(2),c=n(3);t.WizardApprenticeContract=function(e,t){var n=(0,r.useBackend)(t),i=n.act,l=n.data.used;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,o.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),l?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,o.createComponentVNode)(2,a.Section,{title:"Which school of magic is your apprentice studying?",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,o.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("fire")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,o.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("translocation")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,o.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("restoration")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,o.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Instant Summons, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("stealth")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,o.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping. ",(0,o.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{content:"Select",disabled:l,onClick:function(){return i("honk")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider)]})})]})})}}]); \ No newline at end of file