diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index 63f3ee55020..d4b23d57980 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -45581,6 +45581,7 @@ /obj/structure/chair/office/dark{ dir = 8 }, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server) "ecJ" = ( @@ -48979,6 +48980,7 @@ c_tag = "Telecommunications Core"; dir = 4 }, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/telecomms/chamber) "fAH" = ( @@ -55356,6 +55358,7 @@ /obj/effect/turf_decal/delivery/white/hollow, /obj/effect/turf_decal/tiles/department/command, /obj/machinery/ai_node/processing_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server/coldroom) "iqM" = ( @@ -82024,6 +82027,7 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 6 }, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/command/server) "uhl" = ( @@ -85136,6 +85140,7 @@ /obj/effect/turf_decal/delivery/white/hollow, /obj/effect/turf_decal/tiles/department/command, /obj/machinery/ai_node/network_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server/coldroom) "vJm" = ( diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index 7f29f062e33..fab56cf76fc 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -34,6 +34,7 @@ dir = 6 }, /obj/machinery/ai_node/network_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark/telecomms{ icon_state = "bcircuit" }, @@ -3422,6 +3423,7 @@ /obj/machinery/camera/autoname{ dir = 4 }, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel{ icon_state = "bcircuit" }, @@ -30308,6 +30310,7 @@ icon_state = "4-8" }, /obj/machinery/hologram/holopad, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server) "fmI" = ( @@ -66815,6 +66818,7 @@ dir = 5 }, /obj/machinery/ai_node/processing_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark/telecomms{ icon_state = "bcircuit" }, diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index e843c0fc2f7..0d40760649a 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -27566,6 +27566,7 @@ /obj/structure/cable{ icon_state = "1-2" }, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid, /area/station/telecomms/chamber) "cgw" = ( @@ -44022,6 +44023,7 @@ /area/station/science/server) "dwk" = ( /obj/machinery/atmospherics/unary/vent_pump/on, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server) "dwl" = ( @@ -44634,6 +44636,7 @@ }, /obj/machinery/light/small, /obj/machinery/ai_node/network_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid{ icon_state = "gcircuit"; name = "Mainframe Floor"; @@ -44655,6 +44658,7 @@ dir = 9 }, /obj/machinery/ai_node/processing_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid{ icon_state = "gcircuit"; name = "Mainframe Floor"; diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm index 61eb3ce4239..c5989e00171 100644 --- a/_maps/map_files/stations/emeraldstation.dmm +++ b/_maps/map_files/stations/emeraldstation.dmm @@ -28608,6 +28608,7 @@ dir = 5 }, /obj/machinery/ai_node/processing_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server/coldroom) "fHd" = ( @@ -38914,6 +38915,7 @@ "hJb" = ( /obj/structure/sign/poster/official/random/directional/east, /obj/machinery/tcomms/core/station, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid{ icon_state = "gcircuit" }, @@ -78818,6 +78820,7 @@ dir = 4 }, /obj/machinery/hologram/holopad, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server) "pGM" = ( @@ -113511,6 +113514,7 @@ dir = 6 }, /obj/machinery/ai_node/network_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/plasteel/dark, /area/station/science/server/coldroom) "wAw" = ( diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index 2e085478b87..742cccfc18e 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -36903,6 +36903,7 @@ icon_state = "1-2" }, /obj/machinery/tcomms/core/station, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid, /area/station/telecomms/chamber) "gam" = ( @@ -38425,23 +38426,6 @@ /obj/effect/spawner/random/fungus/frequent, /turf/simulated/wall, /area/station/maintenance/fore2) -"gBa" = ( -/obj/machinery/atmospherics/pipe/manifold/hidden{ - dir = 8 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/atmospherics/pipe/manifold/hidden/supply{ - dir = 4 - }, -/obj/structure/cable{ - icon_state = "2-8" - }, -/obj/structure/cable{ - icon_state = "1-2" - }, -/obj/machinery/light/floor, -/turf/simulated/floor/plasteel/dark, -/area/station/science/server) "gBj" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 @@ -40308,20 +40292,6 @@ }, /turf/simulated/floor/plating, /area/station/maintenance/aft) -"hdR" = ( -/obj/machinery/atmospherics/pipe/simple/heat_exchanging{ - dir = 10 - }, -/obj/machinery/firealarm/directional/east, -/obj/effect/turf_decal/siding{ - dir = 8 - }, -/obj/machinery/ai_node/processing_node, -/obj/machinery/light{ - dir = 1 - }, -/turf/simulated/floor/bluegrid/telecomms/server, -/area/station/science/server/coldroom) "hdX" = ( /obj/structure/cable{ icon_state = "4-8" @@ -58367,6 +58337,24 @@ /obj/effect/turf_decal/tiles/dark/checker, /turf/simulated/floor/plasteel, /area/station/medical/break_room) +"mXX" = ( +/obj/machinery/atmospherics/pipe/manifold/hidden{ + dir = 8 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, +/obj/machinery/atmospherics/pipe/manifold/hidden/supply{ + dir = 4 + }, +/obj/structure/cable{ + icon_state = "2-8" + }, +/obj/structure/cable{ + icon_state = "1-2" + }, +/obj/effect/landmark/spawner/flock, +/obj/machinery/light/floor, +/turf/simulated/floor/plasteel/dark, +/area/station/science/server) "mYa" = ( /obj/structure/grille/broken, /obj/effect/mapping_helpers/turfs/damage, @@ -68606,6 +68594,7 @@ dir = 4 }, /obj/machinery/ai_node/network_node, +/obj/effect/landmark/spawner/flock, /turf/simulated/floor/bluegrid/telecomms/server, /area/station/science/server/coldroom) "quh" = ( @@ -68908,6 +68897,21 @@ /obj/effect/spawner/random/barrier/grille_maybe, /turf/simulated/floor/plating, /area/station/maintenance/fore) +"qyJ" = ( +/obj/machinery/firealarm/directional/east, +/obj/machinery/ai_node/processing_node, +/obj/effect/landmark/spawner/flock, +/obj/machinery/atmospherics/pipe/simple/heat_exchanging{ + dir = 10 + }, +/obj/effect/turf_decal/siding{ + dir = 8 + }, +/obj/machinery/light{ + dir = 1 + }, +/turf/simulated/floor/bluegrid/telecomms/server, +/area/station/science/server/coldroom) "qyM" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/spawner/random/barrier/grille_often, @@ -128405,7 +128409,7 @@ cmB cbf cyS mHT -gBa +mXX mdH apS kDU @@ -128659,7 +128663,7 @@ cte cte cte cmB -hdR +qyJ xcw cyP dcs diff --git a/code/__DEFINES/ai/ai_defines.dm b/code/__DEFINES/ai/ai_defines.dm index 17553cb0f92..fcce754ebc6 100644 --- a/code/__DEFINES/ai/ai_defines.dm +++ b/code/__DEFINES/ai/ai_defines.dm @@ -3,6 +3,13 @@ #define HAS_AI_CONTROLLER_TYPE(thing, type) istype(thing?.ai_controller, type) //AI controller flags + +#ifdef DEBUG_AI +#define DEBUG_AI_LOG(controller, message) if(controller.debug_focus) { to_chat(world, span_debug("AI DBG: [message]")) } +#else +#define DEBUG_AI_LOG(...) +#endif + //If you add a new status, be sure to add it to the ai_controllers subsystem's ai_controllers_by_status list. /// The AI is currently active. #define AI_STATUS_ON "ai_on" @@ -51,6 +58,9 @@ /// Does this behavior NOT block planning? #define AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION (1<<4) +/// Magic value to tell the G.O.A.P selector to ignore a behavior. +#define AI_GOAP_SKIP_BEHAVIOR (-1000001) + // AI flags /// Don't move if being pulled diff --git a/code/__DEFINES/ai/blackboard_defines.dm b/code/__DEFINES/ai/blackboard_defines.dm index 1ce03481c1e..49023ce6419 100644 --- a/code/__DEFINES/ai/blackboard_defines.dm +++ b/code/__DEFINES/ai/blackboard_defines.dm @@ -22,6 +22,10 @@ #define BB_BASIC_MOB_FLEE_DISTANCE "BB_BASIC_FLEE_DISTANCE" #define DEFAULT_BASIC_FLEE_DISTANCE 9 +/// Path we should use next time we use the JPS movement datum +#define BB_PATH_TO_USE "BB_path_to_use" +/// Max path length we should use next time we use the JPS movement datum +#define BB_PATH_MAX_LENGTH "BB_path_max_length" // Searching /// key holding a range to look for stuff in diff --git a/code/__DEFINES/ai/flockmind_ai_defines.dm b/code/__DEFINES/ai/flockmind_ai_defines.dm new file mode 100644 index 00000000000..3c1b059603f --- /dev/null +++ b/code/__DEFINES/ai/flockmind_ai_defines.dm @@ -0,0 +1,22 @@ +// Flockmind Keys] +#define BB_FLOCK_STARE_TARGET "BB_flock_stare_target" +#define BB_FLOCK_WANDERING "BB_flock_wandering" +#define BB_FLOCK_STARE_CD "BB_flock_stare_cooldown" +#define BB_FLOCK_CONVERT_TARGET "BB_flock_convert_target" +#define BB_FLOCK_DECON_TARGET "BB_flock_decon_target" +#define BB_FLOCK_HARVEST_TARGET "BB_flock_harvest_target" +#define BB_FLOCK_WANDER_FRUSTRATION "BB_flock_wander_frustration" +#define BB_FLOCK_HEAL_TARGET "BB_flock_heal_target" +#define BB_FLOCK_HEAL_FRUSTRATION "BB_flock_heal_frustation" +#define BB_FLOCK_REPLICATE_TARGET "BB_flock_replicate_target" +#define BB_FLOCK_NEST_TARGET "BB_flock_nest_target" +#define BB_FLOCK_OVERMIND_CONTROL "BB_flock_overmind_control" +#define BB_FLOCK_CONTAINER_TARGET "BB_flock_container_target" +#define BB_FLOCK_RUMMAGE_TARGET "BB_flock_rummage_target" +#define BB_FLOCK_CAPTURE_TARGET "BB_flock_capture_target" +#define BB_FLOCK_ATTACK_TARGET "BB_flock_attack_target" +#define BB_FLOCK_ATTACK_COOLDOWN "BB_flock_attack_cooldown" +#define BB_FLOCK_ATTACK_RUN_COOLDOWN "BB_flock_attack_run_cooldown" +#define BB_FLOCK_ATTACK_STRAFE_COOLDOWN "BB_flock_attack_strafe_cooldown" +#define BB_FLOCK_ATTACK_FRUSTRATION "BB_flock_attack_frustration" +#define BB_FLOCK_DEPOSIT_TARGET "BB_flock_deposit_target" diff --git a/code/__DEFINES/color_defines.dm b/code/__DEFINES/color_defines.dm index 59509bfc8c7..6bfff8c65da 100644 --- a/code/__DEFINES/color_defines.dm +++ b/code/__DEFINES/color_defines.dm @@ -120,6 +120,7 @@ #define COLOR_BLOOD_BASE "#A10808" #define COLOR_BLOOD_MACHINE "#1F181F" +#define COLOR_BLOOD_FLOCK "#4d736d" #define COLOR_BLOOD_XENO "#05EE05" // Pipe colours diff --git a/code/__DEFINES/construction_defines.dm b/code/__DEFINES/construction_defines.dm index a1bac1272dc..7c899bc12b5 100644 --- a/code/__DEFINES/construction_defines.dm +++ b/code/__DEFINES/construction_defines.dm @@ -85,6 +85,8 @@ #define MAT_IRIDIUM "iridium" #define MAT_SILK "silk" #define MAT_CARDBOARD "cardboard" +#define MAT_GNESIS "gnesis" +#define MAT_GNESIS_GLASS "gnesisglass" /// The amount of materials you get from a sheet of mineral like iron/diamond/glass etc #define MINERAL_MATERIAL_AMOUNT 2000 diff --git a/code/__DEFINES/dcs/ai_signals.dm b/code/__DEFINES/dcs/ai_signals.dm index 66e44037e3d..5e8d5f47768 100644 --- a/code/__DEFINES/dcs/ai_signals.dm +++ b/code/__DEFINES/dcs/ai_signals.dm @@ -20,3 +20,6 @@ #define COMSIG_AI_CONTROLLER_PICKED_BEHAVIORS "ai_controller_picked_behaviors" ///sent from ai controllers when they stop possessing a pawn: (datum/ai_controller/source_controller) #define COMSIG_AI_CONTROLLER_UNPOSSESSED_PAWN "ai_controller_unpossessed_pawn" + +/// Signal sent when a mob's AI turns on or off. +#define COMSIG_AI_STATUS_CHANGE "ai_status_change" diff --git a/code/__DEFINES/dcs/moveloop_signals.dm b/code/__DEFINES/dcs/moveloop_signals.dm index c93d9325183..e2b69d1d12b 100644 --- a/code/__DEFINES/dcs/moveloop_signals.dm +++ b/code/__DEFINES/dcs/moveloop_signals.dm @@ -9,6 +9,8 @@ #define COMSIG_MOVELOOP_POSTPROCESS "moveloop_postprocess" //from [/datum/move_loop/has_target/jps/recalculate_path] (): #define COMSIG_MOVELOOP_JPS_REPATH "moveloop_jps_repath" +//from [/datum/move_loop/has_target/astar/recalculate_path] (): +#define COMSIG_MOVELOOP_ASTAR_REPATH "moveloop_astar_repath" ///From base of /datum/move_loop/process() after attempting to move a movable: (datum/move_loop/loop, old_dir) #define COMSIG_MOVABLE_MOVED_FROM_LOOP "movable_moved_from_loop" ///from [/datum/move_loop/has_target/jps/on_finish_pathing] diff --git a/code/__DEFINES/dcs/signals_flock.dm b/code/__DEFINES/dcs/signals_flock.dm new file mode 100644 index 00000000000..b87ec81ba5c --- /dev/null +++ b/code/__DEFINES/dcs/signals_flock.dm @@ -0,0 +1,4 @@ +#define COMSIG_FLOCK_PROTECTION_TRIGGER "comsig_flock_protection_trigger" + #define COMPONENT_FLOCK_DENY_ATTACK (1<<0) + +#define COMSIG_TURF_CLAIMED_BY_FLOCK "comsig_turf_claimed_by_flock" diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 5e203d399e1..a2328aaa4fd 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -148,6 +148,8 @@ #define PASSGIRDER (1<<8) #define PASSTAKE (1<<9) #define PASSBARRICADE (1<<10) +/// Pass through flock objects and mobs +#define PASSFLOCK (1<<11) //turf-only flags, under the flags variable #define BLESSED_TILE (1<<0) @@ -185,8 +187,9 @@ #define ZAP_MOB_DAMAGE (1<<3) #define ZAP_MOB_STUN (1<<4) #define ZAP_GENERATES_POWER (1<<5) +#define ZAP_NO_COOLDOWN (1<<6) -#define ZAP_DEFAULT_FLAGS (ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE) +#define ZAP_DEFAULT_FLAGS (ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_NO_COOLDOWN) #define ZAP_FUSION_FLAGS (ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN) #define ZAP_SUPERMATTER_FLAGS (ZAP_GENERATES_POWER) diff --git a/code/__DEFINES/flockmind_defines.dm b/code/__DEFINES/flockmind_defines.dm new file mode 100644 index 00000000000..823757e62cb --- /dev/null +++ b/code/__DEFINES/flockmind_defines.dm @@ -0,0 +1,70 @@ +#define FLOCK_TYPE_OVERMIND "overmind" +#define FLOCK_TYPE_TRACE "trace" +#define FLOCK_TYPE_DRONE "drone" +#define FLOCK_TYPE_BIT "bit" + +// Turf reserved by a flockdrone +#define FLOCK_NOTICE_RESERVED "reserved" +// Turf marked for conversion +#define FLOCK_NOTICE_PRIORITY "priority" +// Mob marked as enemy +#define FLOCK_NOTICE_ENEMY "enemy" +// Mob marked as ignored +#define FLOCK_NOTICE_IGNORE "ignore" +// Flockdrone under flocktrace control +#define FLOCK_NOTICE_FLOCKTRACE_CONTROL "flocktrace_control" +// Flockdrone under overmind control +#define FLOCK_NOTICE_FLOCKMIND_CONTROL "flockmind_control" +// Flockdrone health bars +#define FLOCK_NOTICE_HEALTH "flock_health" +// Atom marked for deconstruction +#define FLOCK_NOTICE_DECONSTRUCT "flock_deconstruct" + +#define FLOCK_UI_DRONES "drones" +#define FLOCK_UI_TRACES "traces" +#define FLOCK_UI_ENEMIES "enemies" +#define FLOCK_UI_STRUCTURES "structures" + +#define FLOCK_COMPUTE_COST_FLOCKTRACE 100 +#define FLOCK_COMPUTE_COST_DRONE 10 +#define FLOCK_COMPUTE_COST_RELAY 750 + +#define FLOCK_TURFS_FOR_RELAY 250 + +/// Amount of substrate to add to a tealprint. +#define FLOCK_SUBSTRATE_COST_DEPOST_TEALPRINT 10 +/// Amount to convert a turf and it's contents. +#define FLOCK_SUBSTRATE_COST_CONVERT 20 +/// Amount to repair a flock construct. +#define FLOCK_SUBSTRATE_COST_REPAIR 10 +/// BASE amount to lay an egg. +#define FLOCK_SUBSTRATE_COST_LAY_EGG 100 + +/// Egg cost does not start scaling until there are this many drones. +#define FLOCK_MIN_DESIRED_POP 10 +/// Each drone above the min desired pop adds this much to the substrate required to be able to lay an egg. +#define FLOCK_ADDITIONAL_RESOURCE_RESERVATION_PER_DRONE 8 +#define FLOCK_DRONE_LIMIT 50 + +#define FLOCK_ENDGAME_LOST 1 +#define FLOCK_ENDGAME_RELAY_BUILT 2 +#define FLOCK_ENDGAME_RELAY_ACTIVATING 3 +#define FLOCK_ENDGAME_VICTORY 4 + +/// The list of behaviors for the planners to select from. THIS IS ACTUALLY A SUBKEY! +#define BB_PLANNER_BEHAVIORS "BB_planner_behaviors" + +// G.O.A.P weights for flock behaviors, for easy comparison/adjustment. +#define FLOCK_BEHAVIOR_WEIGHT_WANDER 1 +#define FLOCK_BEHAVIOR_WEIGHT_STARE 1 +#define FLOCK_BEHAVIOR_WEIGHT_CONVERT 1 +#define FLOCK_BEHAVIOR_WEIGHT_HARVEST 2 +#define FLOCK_BEHAVIOR_WEIGHT_OPEN_CONTAINER 3 +#define FLOCK_BEHAVIOR_WEIGHT_RUMMAGE 3 +#define FLOCK_BEHAVIOR_WEIGHT_REPAIR 4 +#define FLOCK_BEHAVIOR_WEIGHT_NEST 6 +#define FLOCK_BEHAVIOR_WEIGHT_REPLICATE 7 +#define FLOCK_BEHAVIOR_WEIGHT_DECONSTRUCT 8 +#define FLOCK_BEHAVIOR_WEIGHT_DEPOSIT 8 +#define FLOCK_BEHAVIOR_WEIGHT_SHOOT 10 +#define FLOCK_BEHAVIOR_WEIGHT_CAPTURE 15 diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm index f5b94829d6a..8d58e72aec6 100644 --- a/code/__DEFINES/gamemode.dm +++ b/code/__DEFINES/gamemode.dm @@ -67,6 +67,7 @@ #define SPECIAL_ROLE_HERETIC "Heretic" #define SPECIAL_ROLE_EVENTMISC "Event Role" #define SPECIAL_ROLE_NINJA "Space Ninja" +#define SPECIAL_ROLE_FLOCK "Divine Flock" #define SPECIAL_ROLE_IRRADIATED_MOUSE "Irradiated Mouse" // Constants used by code which checks the status of nuclear blasts during a diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index a650d6fd978..b47118223d3 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -31,6 +31,22 @@ #define isalienqueen(A) (istype(A, /mob/living/carbon/alien/humanoid/queen)) +#define isaicamera(A) (istype(A, /mob/camera/ai_eye)) + +#define isflockmob(A) (istype(A, /mob/camera/flock) || istype(A, /mob/living/basic/flock)) + +#define isflockdrone(A) (istype(A, /mob/living/basic/flock/drone)) + +#define isflockbit(A) (istype(A, /mob/living/basic/flock/bit)) + +#define isflocktrace(A) (istype(A, /mob/camera/flock/trace)) + +#define isflockmind(A) (istype(A, /mob/camera/flock/overmind)) + +#define isflockcontroller(A) (isflockmind(A) || isflocktrace(A)) + +#define isflockworker(A) (isflockdrone(A) || isflockbit(A)) + // Simple animals #define isanimal(A) (istype(A, /mob/living/simple_animal)) @@ -134,6 +150,8 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list( #define is_ancient_rock(A) (istype(A, /turf/simulated/mineral/ancient)) +#define isflockturf(A) (istype(A, /turf/simulated/floor/flock) || istype(A, /turf/simulated/wall/flock)) + // Areas //#define isarea(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are areas diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 6ffdcaa0bd8..1b9896f6496 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -133,6 +133,8 @@ #define FLOOR_OPENSPACE_PLANE 22 #define OPENSPACE_LAYER 22 +#define INFO_TAG_PLANE 23 + #define BYOND_LIGHTING_PLANE 24 #define BYOND_LIGHTING_LAYER 24 diff --git a/code/__DEFINES/mob_defines.dm b/code/__DEFINES/mob_defines.dm index 1fbb07ce255..a7e2513ad5b 100644 --- a/code/__DEFINES/mob_defines.dm +++ b/code/__DEFINES/mob_defines.dm @@ -190,6 +190,8 @@ #define SHOCK_ILLUSION (1<<2) ///The shock doesn't stun. #define SHOCK_NOSTUN (1<<3) +/// Shock damage is reduced by the average siemen's coeff +#define SHOCK_USE_AVG_SIEMENS (1 << 4) #define POCKET_STRIP_DELAY 4 SECONDS //time taken to search somebody's pockets @@ -233,6 +235,9 @@ #define DIRECTION_LOCK_SLOWDOWN 3 +// Helpers +#define DOING_INTERACTION(user, interaction_key) (LAZYACCESS(user.do_afters, interaction_key)) + //Human sub-species #define isabductor(A) (is_species(A, /datum/species/abductor)) #define isgolem(A) (is_species(A, /datum/species/golem)) diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 7c178907bd8..4ae5be6858d 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -46,6 +46,7 @@ #define ROLE_GHOST "ghost role" #define ROLE_ELITE "lavaland elite" #define ROLE_NINJA "ninja" +#define ROLE_FLOCK "flockmind" #define ROLE_IRRADIATED_MOUSE "irradiated mouse" #define ROLE_UPLIFTED_PRIMITIVE "uplifted primitive" @@ -78,6 +79,7 @@ GLOBAL_LIST_INIT(special_roles_antags, list( ROLE_IRRADIATED_MOUSE, ROLE_UPLIFTED_PRIMITIVE, + ROLE_FLOCK, // UNUSED/BROKEN ANTAGS // ROLE_HOG_GOD = /datum/game_mode/hand_of_god, // ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god, diff --git a/code/__DEFINES/rolebans.dm b/code/__DEFINES/rolebans.dm index 62f6b39b497..287b2d8c5e5 100644 --- a/code/__DEFINES/rolebans.dm +++ b/code/__DEFINES/rolebans.dm @@ -15,6 +15,7 @@ GLOBAL_LIST_INIT(antag_roles, list( ROLE_MORPH, ROLE_TSPIDER, ROLE_NINJA, + ROLE_FLOCK, )) // Bannable other roles diff --git a/code/__DEFINES/sight.dm b/code/__DEFINES/sight.dm index 2c65397f364..b1d45bf917d 100644 --- a/code/__DEFINES/sight.dm +++ b/code/__DEFINES/sight.dm @@ -15,6 +15,9 @@ #define INVISIBILITY_HIDDEN_RUNES 30 #define SEE_INVISIBLE_HIDDEN_RUNES 30 +#define INVISIBILITY_FLOCK 30 +#define SEE_INVISIBLE_FLOCK 30 + #define SEE_INVISIBLE_LEVEL_ONE 35 //Used by some stuff in code. It's really poorly organized. #define SEE_INVISIBLE_LEVEL_TWO 45 //Used by some other stuff in code. It's really poorly organized. diff --git a/code/__DEFINES/span_defines.dm b/code/__DEFINES/span_defines.dm index 8f0a23b3e52..ebda57b116b 100644 --- a/code/__DEFINES/span_defines.dm +++ b/code/__DEFINES/span_defines.dm @@ -130,3 +130,5 @@ #define SPAN_WHISPER(str) ("" + str + "") #define SPAN_ZOMBIE(str) ("" + str + "") #define SPAN_ZOMBIELARGE(str) ("" + str + "") +#define SPAN_FLOCKSAY(str) ("" + str + "") +#define SPAN_FLOCKSAY_GRADIENT(str) ("[gradient_text(str, "#3cb5a3", "#1e806e")]") diff --git a/code/__HELPERS/flock_helpers.dm b/code/__HELPERS/flock_helpers.dm new file mode 100644 index 00000000000..1e9c0c46c22 --- /dev/null +++ b/code/__HELPERS/flock_helpers.dm @@ -0,0 +1,118 @@ +/// A copy of is_blocked_turf(), ignoring flock mobs +/turf/proc/can_flock_occupy(atom/source_atom) + if(density) + return FALSE + + for(var/atom/movable/movable_content as anything in contents) + // We don't want to block ourselves or consider any ignored atoms. + if((movable_content == source_atom) || isflockmob(movable_content)) + continue + // If the thing is dense AND we're including mobs or the thing isn't a mob AND if there's a source atom and + // it cannot pass through the thing on the turf, we consider the turf blocked. + if(movable_content.density) + if(source_atom && movable_content.CanPass(source_atom, get_dir(src, source_atom))) + continue + return FALSE + + return TRUE + +/proc/pointer_image_to(atom/from, atom/towards, color = "#00ff9dff") + var/image/pointer = image(icon = 'icons/mob/screen_gen.dmi', icon_state = "arrow_greyscale", loc = from) + + pointer.plane = HUD_PLANE + pointer.appearance_flags |= RESET_COLOR + pointer.color = color + + var/angle = 180 + get_angle(from, towards) + var/matrix/final_matrix = pointer.transform.Scale(2,2) + final_matrix = final_matrix.Turn(angle) + pointer.transform = final_matrix + + pointer.pixel_x = sin(angle) * -48 + pointer.pixel_y = cos(angle) * -48 + return pointer + +/proc/flock_realname(flock_type) + var/attempts = 0 + var/name = "" + do + attempts++ + + switch(flock_type) + if(FLOCK_TYPE_OVERMIND) + name = "\proper[pick(GLOB.consonants_lower)][pick(GLOB.vowels_lower)].[pick(GLOB.consonants_lower)][pick(GLOB.vowels_lower)]" + if(FLOCK_TYPE_TRACE) + name = "[pick(GLOB.consonants_upper)][pick(GLOB.vowels_lower)].[pick(GLOB.vowels_lower)]" + if(FLOCK_TYPE_DRONE) + name = "\proper[pick(GLOB.consonants_lower)][pick(GLOB.vowels_lower)].[pick(GLOB.consonants_lower)][pick(GLOB.vowels_lower)].[pick(GLOB.consonants_lower)][pick(GLOB.vowels_lower)]" + if(FLOCK_TYPE_BIT) + name = "[pick(GLOB.consonants_upper)].[rand(10,99)].[rand(10,99)]" + + while(attempts <= 10 && findname(name)) + + return name + +/proc/flock_name(flock_type) + var/attempts = 0 + var/name = "" + do + attempts++ + + switch(flock_type) + if(FLOCK_TYPE_DRONE) + name = "[pick(GLOB.flockdrone_name_adjectives)] [pick(GLOB.flockdrone_name_nouns)]" + if(FLOCK_TYPE_BIT) + name = "[pick(GLOB.consonants_upper)].[rand(10,99)].[rand(10,99)]" + + while(attempts <= 10 && findname(name)) + + return name + +/proc/animate_flockpass(atom/thing) + var/list/color_matrix = list(1,0,0, 0,1,0, 0,0,1, 0.15,0.77,0.66) + var/matrix/shrink = thing.transform.Scale(0.4) + var/old_transform = thing.transform + + animate(thing, color = color_matrix, transform = shrink, time = 3, easing=BOUNCE_EASING) + animate(color = null, transform = old_transform, time = 3, easing=BOUNCE_EASING) + +/// Make a color a repeating gradient between two colors. Note: This is inaccurate because its a linear transformation, but human eyes do not perceive color this way. +/proc/gradient_text(message, color_1, color_2) + var/list/color_list_1 = rgb2num(color_1) + var/list/color_list_2 = rgb2num(color_2) + + var/r1 = color_list_1[1] + var/g1 = color_list_1[2] + var/b1 = color_list_1[3] + + // The difference in value between each color part + var/delta_r = color_list_2[1] - r1 + var/delta_g = color_list_2[2] - g1 + var/delta_b = color_list_2[3] - b1 + + var/list/result = list() + + // Start at a random point between the two, in increments of 0.1 + var/coeff = rand(0,10) / 10.0 + var/dir = prob(50) ? -1 : 1 + + for(var/i in 1 to length(message) step 3) + coeff += dir * 0.2 + // 20% chance to start going in the opposite direction + if(prob(20)) + dir = -dir + + // Wrap back around + if(coeff < 0) + coeff = 0 + dir = 1 + + else if(coeff > 1) + coeff = 1 + dir = -1 + + var/col = rgb(r1 + delta_r*coeff, g1 + delta_g*coeff, b1 + delta_b*coeff) + var/chars = copytext(message, i, i + 3) + result += "[chars]" + + . = jointext(result, "") diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index f942c0d87e9..20b72108441 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -49,6 +49,33 @@ };\ } while(FALSE) +/// The above but the tree is sorted in reverse. +#define BINARY_INSERT_REVERSE(INPUT, LIST, TYPECONT, COMPARE, COMPARISON, COMPTYPE) \ + do {\ + var/list/__BIN_LIST = LIST;\ + var/__BIN_CTTL = length(__BIN_LIST);\ + if(!__BIN_CTTL) {\ + __BIN_LIST += INPUT;\ + } else {\ + var/__BIN_LEFT = 1;\ + var/__BIN_RIGHT = __BIN_CTTL;\ + var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\ + var ##TYPECONT/__BIN_ITEM;\ + while(__BIN_LEFT < __BIN_RIGHT) {\ + __BIN_ITEM = COMPTYPE;\ + if(__BIN_ITEM.##COMPARISON >= COMPARE.##COMPARISON) {\ + __BIN_LEFT = __BIN_MID + 1;\ + } else {\ + __BIN_RIGHT = __BIN_MID;\ + };\ + __BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\ + };\ + __BIN_ITEM = COMPTYPE;\ + __BIN_MID = __BIN_ITEM.##COMPARISON < COMPARE.##COMPARISON ? __BIN_MID : __BIN_MID + 1;\ + __BIN_LIST.Insert(__BIN_MID, INPUT);\ + };\ + } while(FALSE) + #define SORT_FIRST_INDEX(list) (list[1]) #define SORT_COMPARE_DIRECTLY(thing) (thing) #define SORT_VAR_NO_TYPE(varname) var/varname diff --git a/code/__HELPERS/paths/astar.dm b/code/__HELPERS/paths/astar.dm new file mode 100644 index 00000000000..6b215c58cb5 --- /dev/null +++ b/code/__HELPERS/paths/astar.dm @@ -0,0 +1,276 @@ +#define ASTAR_NODE(turf, dist_from_start, heuristic, prev_node) list(turf, dist_from_start + heuristic, dist_from_start, heuristic, prev_node) +#define ASTAR_CLOSE_ENOUGH_TO_END(end, checking_turf) (end == checking_turf || (mintargetdist && (get_dist(checking_turf, end) <= mintargetdist))) + +/datum/astar_node + var/turf/turf + var/total_cost_f + var/dist_from_start_g + /// Distance_g is affected by bias to smooth out diagonals, this tracks the raw number of steps required. + var/real_dist_from_start + var/heuristic_h + + var/datum/astar_node/prev_node + +/datum/pathfind/astar + /// The thing that we're actually trying to path for + var/atom/movable/invoker + /// The turf we're trying to path to (note that this won't track a moving target) + var/turf/end + /// The list we compile at the end if successful to pass back + var/list/path + + /// A k:v list of turf -> directions. The directions are directions the pathfinder attempted to step into the turf but failed. + var/list/closed + /// A binary search tree containing the discovered nodes. + var/list/open_binary_tree + /// A k:V list of turf -> astar node + var/list/open_turf_to_node + + /// How far away we have to get to the end target before we can call it quits + var/mintargetdist = 0 + /// If we should delete the first step in the path or not. Used often because it is just the starting tile + var/skip_first = FALSE + /// Defines how we handle diagonal moves. See __DEFINES/path.dm + var/use_diagonals = TRUE + /// An optional callback to invoke to return a positive value to add to the path's distance. + var/datum/callback/heuristic + +#ifdef DEBUG_PATHFINDING + /// List of all nodes we've parsed, used for debug spew. + var/list/all_nodes_ever = list() +#endif + + +/datum/pathfind/astar/New( + atom/movable/invoker, + atom/goal, + access, + max_steps, + mintargetdist, + simulated_only, + avoid, + skip_first, + use_diagonals, + datum/callback/on_finish, + datum/callback/heuristic, +) + src.invoker = invoker + src.pass_info = new(invoker, access) + + end = get_turf(goal) + open_binary_tree = new() + open_turf_to_node = new() + closed = new() + + src.max_distance = max_steps + src.mintargetdist = mintargetdist + src.simulated_only = simulated_only + src.avoid = avoid + src.skip_first = skip_first + src.use_diagonals = use_diagonals + src.on_finish = on_finish + src.heuristic = heuristic || CALLBACK(src, PROC_REF(generic_heuristic)) + +/datum/pathfind/astar/Destroy(force, ...) + . = ..() + invoker = null + end = null + open_binary_tree = null + open_turf_to_node = null + closed = null + heuristic = null // hard del generator if using generic_heuristic + +/** + * "starts" off the pathfinding, by storing the values this datum will need to work later on + * returns FALSE if it fails to setup properly, TRUE otherwise + */ +/datum/pathfind/astar/start() + start ||= get_turf(invoker) + . = ..() + if(!.) + return . + + if(!get_turf(end)) + stack_trace("Invalid A* destination") + return FALSE + + if(start.z != end.z || start == end) //no pathfinding between z levels + return FALSE + + // If the turf is out of the step range we already know it's too far. + if(max_distance && (max_distance < get_dist_manhattan(start, end))) + return FALSE + + var/datum/astar_node/start_node = new /datum/astar_node() + start_node.turf = start + start_node.total_cost_f = 0 + start_node.dist_from_start_g = 0 + start_node.heuristic_h = 0 + start_node.real_dist_from_start = 0 + + open_turf_to_node[start] = start_node + binary_insert_node(start_node) + return TRUE + +/** + * Cleanup pass for the pathfinder. This tidies up the path, and fufills the pathfind's obligations + */ +/datum/pathfind/astar/finished() + var/list/path = src.path || list() + if(length(path) > 0 && skip_first) + path.Cut(1,2) + + hand_back(path) + #ifdef DEBUG_PATHFINDING + /// If the global flag is set, replace the current global node spew. + if(GLOB.__pathfinding_debug_generate) + GLOB.__pathfinding_debug_info = all_nodes_ever + #endif + return ..() + +/** + * search_step() is the workhorse of pathfinding. It'll do the searching logic, and will slowly build up a path + * returns TRUE if everything is stable, FALSE if the pathfinding logic has failed, and we need to abort + */ +/datum/pathfind/astar/search_step(tick_check = TRUE) + . = ..() + if(!.) + return . + + if(QDELETED(invoker)) + return FALSE + + var/static/list/lateral_search_dirs = list(EAST, WEST, NORTH, SOUTH) + var/static/list/all_search_dirs = list(EAST, WEST, NORTH, SOUTH, NORTHEAST, SOUTHWEST, NORTHWEST, SOUTHEAST) + + while(length(open_binary_tree) && !path) + var/datum/astar_node/current_node = open_binary_tree[length(open_binary_tree)] + open_binary_tree.len-- + + var/turf/current_node_turf = current_node.turf + closed[current_node_turf] = ALL + + if(max_distance && current_node.real_dist_from_start > max_distance) + continue + + // Check to see if we're close enough to the end destination. + if(ASTAR_CLOSE_ENOUGH_TO_END(end, current_node_turf)) + unwind_path(current_node) + return TRUE + + // Scan cardinal turfs for valid movements. + for(var/scan_direction in use_diagonals ? all_search_dirs : lateral_search_dirs) + var/turf/searching_turf = get_step(current_node_turf, scan_direction) + var/IS_DIR_DIAGONAL = IS_DIR_DIAGONAL(scan_direction) + if(closed[searching_turf] & scan_direction) + continue // Turf is known to be blocked from this direction, skip! + + if(!(IS_DIR_DIAGONAL ? can_step_diagonal(current_node_turf, searching_turf) : CAN_STEP(current_node_turf, searching_turf, simulated_only, pass_info, avoid))) + closed[searching_turf] |= scan_direction + continue // Turf cannot be entered, atleast from this direction. Skip! + + // At this point we consider this turf a valid node. + + var/datum/astar_node/existing_node = open_turf_to_node[searching_turf] + + // Prefer straighter lines for more visual appeal. Penalize changing from cardinal to diagonal, but if you're already diagonal, it's okay. + var/distance_g = current_node.dist_from_start_g + var/real_distance = current_node.real_dist_from_start + if(IS_DIR_DIAGONAL) + // Diagonal is not continuing from previous node + if(!current_node.prev_node || !IS_DIR_DIAGONAL(get_dir(current_node.prev_node.turf, current_node_turf))) + distance_g += 2 + real_distance += 2 + + // Diagonal is continuing from previous node + else + distance_g += sqrt(2) // It const folds dont cry + real_distance += 2 + else + distance_g += 1 + real_distance += 1 + + // If the node already exists, update it to reflect new information. Maybe we found a shorter path to it, or similar. + if(existing_node) + if(distance_g < existing_node.dist_from_start_g) + existing_node.prev_node = current_node + existing_node.dist_from_start_g = distance_g + existing_node.real_dist_from_start = real_distance + existing_node.total_cost_f = distance_g + existing_node.heuristic_h + open_binary_tree -= existing_node + binary_insert_node(existing_node) + continue + + // The node isn't known to us so we need to check the heuristic. + var/heuristic_h = heuristic.Invoke(searching_turf, end) + if(heuristic_h == 0) + closed[searching_turf] |= scan_direction + continue + + // Node is not known, create it. + var/datum/astar_node/new_node = new /datum/astar_node() + new_node.turf = searching_turf + new_node.total_cost_f = distance_g + heuristic_h + new_node.dist_from_start_g = distance_g + new_node.real_dist_from_start = real_distance + new_node.heuristic_h = heuristic_h + new_node.prev_node = current_node + + binary_insert_node(new_node) + + open_turf_to_node[searching_turf] = new_node + #ifdef DEBUG_PATHFINDING + all_nodes_ever[++all_nodes_ever.len] = new_node + #endif + + // Check to see if we're close enough to the end destination. + if(ASTAR_CLOSE_ENOUGH_TO_END(end, new_node)) + unwind_path(new_node) + return TRUE + + // Stable, we'll just be back later + if(tick_check && TICK_CHECK) + return TRUE + + return TRUE + +/datum/pathfind/astar/proc/binary_insert_node(datum/astar_node/node) + BINARY_INSERT_REVERSE(node, open_binary_tree, /datum/astar_node, node, total_cost_f, COMPARE_KEY) + +/datum/pathfind/astar/proc/can_step_diagonal(turf/from_turf, turf/to_turf) + var/in_dir = get_dir(from_turf, to_turf) // eg. northwest (1+8) = 9 (00001001) + var/first_step_direction_a = in_dir & 3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001) + var/first_step_direction_b = in_dir & 12 // eg. west (1+8)&12 (0000 1100) = 8 (0000 1000) + + for(var/direction in list(first_step_direction_a, first_step_direction_b)) + var/turf/midpoint = get_step(from_turf, direction) + // If the midpoint is known to be inaccessible from the starting direction, no need to check it again. + if(closed[midpoint] & direction) + continue + + if(CAN_STEP(midpoint, to_turf, simulated_only, pass_info, avoid)) + return TRUE + + return FALSE + + +/// The generic heuristic, euclidean distance. +/datum/pathfind/astar/proc/generic_heuristic(turf/searching_turf, turf/end) + return get_dist_euclidean(searching_turf, end) + +/// Called when we've hit the goal with the node that represents the last tile, then sets the path var to that path so it can be returned by [datum/pathfind/proc/search] +/datum/pathfind/astar/proc/unwind_path(datum/astar_node/unwind_node) + path = new() + var/turf/iter_turf = unwind_node.turf + path += iter_turf + + var/datum/astar_node/iter_node = unwind_node.prev_node + while(iter_node) + path.Insert(1, iter_node.turf) + iter_node = iter_node.prev_node + + return path + +#undef ASTAR_NODE +#undef ASTAR_CLOSE_ENOUGH_TO_END + diff --git a/code/__HELPERS/paths/jps.dm b/code/__HELPERS/paths/jps.dm index c816fc969e0..7d0158ed198 100644 --- a/code/__HELPERS/paths/jps.dm +++ b/code/__HELPERS/paths/jps.dm @@ -111,7 +111,7 @@ found_turfs[start] = TRUE // i'm sure this is fine return TRUE -/datum/pathfind/jps/search_step() +/datum/pathfind/jps/search_step(tick_check = TRUE) . = ..() if(!.) return . @@ -131,7 +131,7 @@ diag_scan_spec(current_turf, scan_direction, current_processed_node) // Stable, we'll just be back later - if(TICK_CHECK) + if(tick_check && TICK_CHECK) return TRUE return TRUE diff --git a/code/__HELPERS/paths/path.dm b/code/__HELPERS/paths/path.dm index 33a6b1a730e..5fc8bf86920 100644 --- a/code/__HELPERS/paths/path.dm +++ b/code/__HELPERS/paths/path.dm @@ -229,9 +229,9 @@ /// These are generally cheaper than looping contents so they go first switch(destination_turf.pathing_pass_method) // This is already assumed to be true - //if(TURF_PATHING_PASS_DENSITY) - // if(destination_turf.density) - // return TRUE + if(TURF_PATHING_PASS_DENSITY) + if(destination_turf.density) + return TRUE if(TURF_PATHING_PASS_PROC) if(!destination_turf.CanPathfindPass(actual_dir, pass_info)) return TRUE @@ -309,6 +309,8 @@ var/datum/can_pass_info/rider_info = null /// If our mob is buckled to something, what's it like var/datum/can_pass_info/buckled_info = null + /// If our mob is flock phasing or can flock phase. + var/able_to_flockphase = FALSE var/list/factions = list() @@ -363,6 +365,10 @@ if(iscameramob(construct_from)) src.camera_type = construct_from.type src.is_bot = isbot(construct_from) + if(isflockdrone(construct_from)) + var/mob/living/basic/flock/drone/bird = construct_from + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE) || bird.substrate.has_points(10)) + able_to_flockphase = TRUE if(construct_from.pulling) src.pulling_info = new(construct_from.pulling, access, no_id, call_depth + 1) diff --git a/code/__HELPERS/spatial_info.dm b/code/__HELPERS/spatial_info.dm index 9c75bc07621..959f504ddb8 100644 --- a/code/__HELPERS/spatial_info.dm +++ b/code/__HELPERS/spatial_info.dm @@ -383,3 +383,14 @@ if(!test_turf.is_blocked_turf(exclude_mobs = TRUE)) return FALSE return TRUE + +/// Returns the manhattan distance between two atoms. Returns INFINITY if either are not on a turf, for BYOND get_dist() parity. +/proc/get_dist_manhattan(atom/A, atom/B) + if(!A.z || !B.z) + return INFINITY + + if(A == B) + return -1 + + return abs(A.x - B.x) + abs(A.y - B.y) + abs(A.z - B.z) + diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm index 651fa6c3665..5a3d89a4017 100644 --- a/code/__HELPERS/trait_helpers.dm +++ b/code/__HELPERS/trait_helpers.dm @@ -162,6 +162,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy. #define TRAIT_SHOCKIMMUNE "shock_immunity" #define TRAIT_TESLA_SHOCKIMMUNE "tesla_shock_immunity" +/// Are we being shocked by a flock sentinel? +#define TRAIT_SHOCKED_BY_SENTINEL "shocked_by_flock_sentinel" #define TRAIT_TELEKINESIS "telekinesis" #define TRAIT_RESISTHEAT "resist_heat" #define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue. @@ -295,7 +297,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Trait that prevents AI controllers from planning detached from ai_status to prevent weird state stuff. #define TRAIT_AI_PAUSED "trait_ai_paused" +/// trait that prevents AI controllers from making new plans, but not executing plans +#define TRAIT_AI_DISABLE_PLANNING "TRAIT_AI_DISABLE_PLANNING" +/// This mob's speech is heard through walls by dead players/observers even if it has no client. Idk a better name +#define TRAIT_IMPORTANT_SPEAKER "important_speaker" +/// Ignores line of sight for the purposes of send_speech() +#define TRAIT_HEAR_THROUGH_WALLS "hear_through_walls" //***** MIND TRAITS *****/ #define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion @@ -621,6 +629,21 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai ///every object that is currently the active storage of some client mob has this trait #define TRAIT_ACTIVE_STORAGE "active_storage" +// Flock trait sources +/// Under control +#define FLOCK_CONTROLLED_BY_OVERMIND_SOURCE "FLOCK_CONTROLLED_BY_OVERMIND_SOURCE" + +#define TRAIT_FLOCKPHASE "TRAIT_FLOCKPHASE" +/// Is a flock object. Because of type fuckery. +#define TRAIT_FLOCK_THING "TRAIT_FLOCK_THING" +/// Flockdrones cannot deconstruct this object. +#define TRAIT_FLOCK_NODECON "TRAIT_FLOCK_NODECON" +/// Implements flock_examine() proc. +#define TRAIT_FLOCK_EXAMINE "TRAIT_FLOCK_EXAMINE" + +/// Trait from mob/living/update_transform() +#define UPDATE_TRANSFORM_TRAIT "update_transform" + //***** PROC WRAPPERS *****// /// Proc wrapper of add_trait. You should only use this for callback. Otherwise, use the macro. /proc/callback_add_trait(datum/target, trait, source) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 1498687c925..e58fff9cd1a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -404,6 +404,8 @@ moblist.Add(M) for(var/mob/camera/blob/M in sortmob) moblist.Add(M) + for(var/mob/camera/flock/M in sortmob) + moblist.Add(M) return moblist // Format a power value in W, kW, MW, or GW. @@ -558,6 +560,35 @@ Returns 1 if the chain up to the area contains the given typepath return starting_turf +/// returns a turf at the outer edge of a given radius +/proc/get_random_perimeter_turf(atom/origin, radius) + var/turf/origin_turf = get_turf(origin) + if(isnull(origin_turf)) + return null + + if(radius == 0) + return origin_turf + + var/upper_x = clamp(origin_turf.x + radius, 1, world.maxx) + var/lower_x = clamp(origin_turf.x - radius, 1, world.maxx) + + var/upper_y = clamp(origin_turf.y + radius, 1, world.maxy) + var/lower_y = clamp(origin_turf.y - radius, 1, world.maxy) + + + var/x + var/y + var/z = origin_turf.z + + if(prob(50)) + x = pick(lower_x, upper_x) + y = rand(lower_y, upper_y) + else + x = rand(lower_x, upper_x) + y = pick(lower_y, upper_y) + + return locate(x, y ,z) + // returns turf relative to A for a given clockwise angle at set range // result is bounded to map size /proc/get_angle_target_turf(atom/A, angle, range) diff --git a/code/_globalvars/lists/misc_lists.dm b/code/_globalvars/lists/misc_lists.dm index 85e7add442d..3d2b9351151 100644 --- a/code/_globalvars/lists/misc_lists.dm +++ b/code/_globalvars/lists/misc_lists.dm @@ -1,5 +1,9 @@ GLOBAL_LIST_INIT(alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")) GLOBAL_LIST_INIT(alphabet_uppercase, list("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z")) +GLOBAL_LIST_INIT(vowels_lower, list("a","e","i","o","u")) +GLOBAL_LIST_INIT(vowels_upper, list("A","E","I","O","U")) +GLOBAL_LIST_INIT(consonants_lower, list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")) +GLOBAL_LIST_INIT(consonants_upper, list("B","C","D","F","G","H","J","K","L","M","N","P","Q","R","S","T","V","W","X","Y","Z")) GLOBAL_LIST_INIT(html_colors, list("Alice Blue","Antique White","Aqua","Aquamarine","Azure","Beige","Bisque","Black","Blanched Almond","Blue","Blue Violet", "Brown","Burly Wood","Cadet Blue","Chartreuse","Chocolate","Coral","Cornflower Blue","Cornsilk","Crimson","Cyan", "Dark Blue","Dark Cyan","Dark Golden Rod","Dark Gray","Dark Green","Dark Khaki","Dark Magenta","Dark Olive Green", diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index a6d2005483c..6317cb9772f 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -111,7 +111,7 @@ var/obj/tgvehicle/sealed/car/clowncar/cc = loc return cc.fire_cannon_at(A, src, params) - if(restrained()) + if(restrained() | istype(loc, /obj/structure/flock/cage)) RestrainedClickOn(A) return diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 0ac270493fd..3f36e4b7380 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -658,6 +658,18 @@ so as to remain in compliance with the most up-to-date laws." return infected_user.ghostize() +/atom/movable/screen/alert/ghost/flock + desc = "Would you like to ghost? You will be notified when your body is removed from the cage." + +/atom/movable/screen/alert/ghost/flock/Click() + if(!..()) + return + var/mob/living/carbon/human/caged_user = usr + if(!istype(caged_user) || caged_user.stat == DEAD) + caged_user.clear_alert("ghost_cage") + return + caged_user.ghostize() + /atom/movable/screen/alert/notify_action name = "Body created" desc = "A body was created. You can enter it." diff --git a/code/_onclick/hud/flock_hud.dm b/code/_onclick/hud/flock_hud.dm new file mode 100644 index 00000000000..8ae71e6b112 --- /dev/null +++ b/code/_onclick/hud/flock_hud.dm @@ -0,0 +1,187 @@ +/datum/hud/flockdrone/New(mob/owner) + . = ..() + var/atom/movable/screen/using + + using = new /atom/movable/screen/flockdrone_part/converter(null, src) + static_inventory += using + + using = new /atom/movable/screen/flockdrone_part/incapacitator(null, src) + static_inventory += using + + using = new /atom/movable/screen/flockdrone_part/absorber(null, src) + static_inventory += using + + using = new /atom/movable/screen/flockphasing() + using.icon_state = (HAS_TRAIT(mymob, TRAIT_FLOCKPHASE) ? "running" : "walking") + infodisplay += using + + using = new /atom/movable/screen/act_intent/flock() + using.icon_state = mymob.a_intent + static_inventory += using + action_intent = using + + mymob.healths = new /atom/movable/screen/healths/flockdrone_health(null, src) + infodisplay += mymob.healths + + mymob.pullin = new /atom/movable/screen/pull/flock() + mymob.pullin.hud = src + mymob.pullin.update_icon(UPDATE_ICON_STATE) + hotkeybuttons += mymob.pullin + + zone_select = new /atom/movable/screen/zone_sel/flock() + zone_select.hud = src + zone_select.update_icon(UPDATE_OVERLAYS) + static_inventory += zone_select + +// Used for flock traces and the overmind +/datum/hud/flockghost + +/atom/movable/screen/healths/flockdrone_health + icon = 'icons/goonstation/hud/flock_ui.dmi' + icon_state = "health1" + screen_loc = UI_BORG_HEALTH + +/atom/movable/screen/pull/flock + icon = 'icons/goonstation/hud/flock_ui.dmi' + icon_state = "pull0" + screen_loc = UI_MOVI + +/atom/movable/screen/act_intent/flock + icon = 'icons/goonstation/hud/flock_ui.dmi' + +/atom/movable/screen/act_intent/flock/Click(location, control, params) + var/_x = text2num(params2list(params)["icon-x"]) + var/_y = text2num(params2list(params)["icon-y"]) + if(_x<=16 && _y<=16) + usr.a_intent_change(INTENT_GRAB) + else if(_x<=16 && _y>=17) + usr.a_intent_change(INTENT_HELP) + else if(_x>=17 && _y<=16) + usr.a_intent_change(INTENT_HARM) + else if(_x>=17 && _y>=17) + usr.a_intent_change(INTENT_DISARM) + +/atom/movable/screen/flockphasing + + icon = 'icons/goonstation/hud/flock_ui.dmi' + name = "flockphase toggle" + icon_state = "walking" + screen_loc = UI_MOVI + +/atom/movable/screen/flockphasing/Click(location, control, params) + var/mob/living/basic/flock/drone/M = usr + if(!istype(M)) + return + if(HAS_TRAIT(M, TRAIT_FLOCKPHASE)) + M.stop_flockphase() + else + if(M.can_flockphase() && M.flockphase_tax()) + M.start_flockphase() + +/atom/movable/screen/zone_sel/flock + icon = 'icons/goonstation/hud/flock_ui.dmi' + overlay_file = 'icons/goonstation/hud/flock_ui.dmi' + +/atom/movable/screen/flockdrone_part + icon = 'icons/goonstation/hud/flock_ui.dmi' + var/active_state = "" + var/inactive_state = "" + + var/part_type + var/datum/flockdrone_part/part_ref + +/atom/movable/screen/flockdrone_part/Initialize(mapload, datum/hud/hud_owner) + . = ..() + var/mob/living/basic/flock/drone/drone = usr + for(var/datum/flockdrone_part/part in drone.parts) + if(istype(part, part_type)) + part_ref = part + break + part_ref?.screen_obj = src + + update_appearance(UPDATE_ICON_STATE) + +/atom/movable/screen/flockdrone_part/Destroy() + part_ref?.screen_obj = null + part_ref = null + return ..() + +/atom/movable/screen/flockdrone_part/update_icon_state() + if(part_ref?.is_active()) + icon_state = active_state + else + icon_state = inactive_state + return ..() + +/atom/movable/screen/flockdrone_part/Click(location, control, params) + . = ..() + if(.) + return + + var/mob/living/basic/flock/drone/drone = usr + drone.set_active_part(part_ref) + +/atom/movable/screen/flockdrone_part/converter + name = "converter" + active_state = "converter1" + inactive_state = "converter0" + desc = "Converters are an integrated multitool in every flockdrone's arsenal. On help and disarm intent, it will build structures, open lockers, and convert turfs. On harm or grab intent, it will deconstruct or cage things." + + screen_loc = "CENTER-1:16,SOUTH:5" + + part_type = /datum/flockdrone_part/converter + +/atom/movable/screen/flockdrone_part/incapacitator + name = "incapacitator" + active_state = "incapacitor1" + inactive_state = "incapacitor0" + desc = "Incapacitators are the primary weapon system of every flockdrone. They fire enhanced stunning rounds capable of disrupting electronics. They will recharge slowly on their own." + maptext_x = 6 + maptext_y = 6 + screen_loc = "CENTER:16,SOUTH:5" + + part_type = /datum/flockdrone_part/incapacitator + + var/icon/overlay_mask + var/obj/effect/abstract/charge_overlay + +/atom/movable/screen/flockdrone_part/incapacitator/Initialize(mapload, datum/hud/hud_owner) + charge_overlay = new() + . = ..() + charge_overlay.vis_flags = VIS_INHERIT_ID | VIS_INHERIT_LAYER | VIS_INHERIT_PLANE | VIS_INHERIT_ICON + charge_overlay.icon_state = "charge_overlay" + managed_vis_overlays += charge_overlay + + overlay_mask = icon('icons/goonstation/hud/flock_ui.dmi', "darkener") + charge_overlay.add_filter("mask", 1, alpha_mask_filter(0, 0, overlay_mask)) + +/atom/movable/screen/flockdrone_part/incapacitator/Destroy() + managed_vis_overlays -= charge_overlay + QDEL_NULL(charge_overlay) + return ..() + +/atom/movable/screen/flockdrone_part/incapacitator/update_appearance(updates) + . = ..() + var/datum/flockdrone_part/incapacitator/part = part_ref + maptext = MAPTEXT("[part?.shot_count || "0"]") + + var/datum/flockdrone_part/incapacitator/weapon = part_ref + charge_overlay.transition_filter( + "mask", + 0.5 SECONDS, + list( + "y" = -24 * (1 - round(weapon.shot_count / weapon.max_shots, 0.1)) + ), + SINE_EASING, + FALSE + ) + +/atom/movable/screen/flockdrone_part/absorber + name = "material decompiler" + active_state = "absorber" + inactive_state = "absorber" + desc = "Absorbers are a key piece of any flockdrone's toolkit. They will pickup items and deconstruct them for substrate - the primary building material of any flock device." + + screen_loc = "CENTER+1:16,SOUTH:5" + + part_type = /datum/flockdrone_part/absorber diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 7827eb8e416..5b75216179f 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -260,6 +260,11 @@ icon_state = "agentbox" alpha = 128 +/atom/movable/screen/fullscreen/flock_convert + icon = 'icons/goonstation/hud/flockmindcircuit.dmi' + icon_state = "flockmindcircuit" + layer = BLIND_LAYER + #undef FULLSCREEN_LAYER #undef BLIND_LAYER #undef CRIT_LAYER diff --git a/code/controllers/subsystem/SSmobs.dm b/code/controllers/subsystem/SSmobs.dm index 1a3683937b3..5c2e83bbe1d 100644 --- a/code/controllers/subsystem/SSmobs.dm +++ b/code/controllers/subsystem/SSmobs.dm @@ -10,6 +10,7 @@ SUBSYSTEM_DEF(mobs) var/list/currentrun = list() var/static/list/clients_by_zlevel[][] var/static/list/dead_players_by_zlevel[][] = list(list()) // Needs to support zlevel 1 here, MaxZChanged only happens when CC is created and new_players can login before that. + var/static/list/flock_cameras_by_zlevel[][]= list(list()) var/static/list/cubemonkeys = list() /// The amount of Xenobiology mobs (and their offspring) that exist in the world. Used for mob capping. Excludes Slimes var/xenobiology_mobs = 0 @@ -26,6 +27,7 @@ SUBSYSTEM_DEF(mobs) /datum/controller/subsystem/mobs/Initialize() clients_by_zlevel = new /list(world.maxz, 0) dead_players_by_zlevel = new /list(world.maxz, 0) + flock_cameras_by_zlevel = new /list(world.maxz, 0) /datum/controller/subsystem/mobs/fire(resumed = 0) var/seconds = wait * 0.1 diff --git a/code/controllers/subsystem/movement/movement_types.dm b/code/controllers/subsystem/movement/movement_types.dm index 21dfe80ac90..14aca127a81 100644 --- a/code/controllers/subsystem/movement/movement_types.dm +++ b/code/controllers/subsystem/movement/movement_types.dm @@ -407,6 +407,219 @@ return MOVELOOP_FAILURE +/** + * Used for following A* defined paths. + * + * Returns TRUE if the loop sucessfully started, or FALSE if it failed + * + * Arguments: + * moving - The atom we want to move + * chasing - The atom we want to move towards + * delay - How many deci-seconds to wait between fires. Defaults to the lowest value, 0.1 + * repath_delay - How often we're allowed to recalculate our path + * max_path_length - The maximum number of steps we can take in a given path to search (default: 30, 0 = infinite) + * miminum_distance - Minimum distance to the target before path returns, could be used to get near a target, but not right to it - for an AI mob with a gun, for example + * id - An ID card representing what access we have and what doors we can open + * simulated_only - Whether we consider turfs without atmos simulation (AKA do we want to ignore space) + * avoid - If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf + * skip_first - Whether or not to delete the first item in the path. This would be done because the first item is the starting tile, which can break things + * timeout - Time in deci-seconds until the moveloop self expires. Defaults to infinity + * subsystem - The movement subsystem to use. Defaults to SSmovement. Only one loop can exist for any one subsystem + * priority - Defines how different move loops override each other. Lower numbers beat higher numbers, equal defaults to what currently exists. Defaults to MOVEMENT_DEFAULT_PRIORITY + * flags - Set of bitflags that effect move loop behavior in some way. Check _DEFINES/movement.dm + * +**/ +/datum/move_manager/proc/astar_move( + moving, + chasing, + delay, + timeout, + repath_delay, + max_path_length, + minimum_distance, + list/access, + simulated_only, + turf/avoid, + skip_first, + subsystem, + priority, + flags, + datum/extra_info, + initial_path, + use_diagonals, + datum/callback/heuristic, +) + + return add_to_loop( + moving, + subsystem, + /datum/move_loop/has_target/astar, + priority, + flags, + extra_info, + delay, + timeout, + chasing, + repath_delay, + max_path_length, + minimum_distance, + access, + simulated_only, + avoid, + skip_first, + initial_path, + use_diagonals, + heuristic, +) + +/datum/move_loop/has_target/astar + ///How often we're allowed to recalculate our path + var/repath_delay + ///Max amount of steps to search + var/max_path_length + ///Minimum distance to the target before path returns + var/minimum_distance + ///A list representing what access we have and what doors we can open. + var/list/access + ///Whether we consider turfs without atmos simulation (AKA do we want to ignore space) + var/simulated_only + ///A perticular turf to avoid + var/turf/avoid + ///Should we skip the first step? This is the tile we're currently on, which breaks some things + var/skip_first + ///A list for the path we're currently following + var/list/movement_path + /// Should we use diagonals, or use only cardinals? + var/use_diagonals + ///Cooldown for repathing, prevents spam + COOLDOWN_DECLARE(repath_cooldown) + ///Bool used to determine if we're already making a path in AStar. this prevents us from re-pathing while we're already busy. + var/is_pathing = FALSE + ///Callback to invoke once we make a path + var/datum/callback/on_finish_callback + + ///AStar heuristic function + var/datum/callback/heuristic + +/datum/move_loop/has_target/astar/New(datum/movement_packet/owner, datum/controller/subsystem/movement/controller, atom/moving, priority, flags, datum/extra_info) + . = ..() + on_finish_callback = CALLBACK(src, PROC_REF(on_finish_pathing)) + +/datum/move_loop/has_target/astar/setup(delay, timeout, atom/chasing, repath_delay, max_path_length, minimum_distance, list/access, simulated_only, turf/avoid, skip_first, list/initial_path, use_diagonals, datum/callback/heuristic) + . = ..() + if(!.) + return + + src.repath_delay = repath_delay + src.max_path_length = max_path_length + src.minimum_distance = minimum_distance + src.access = access + src.simulated_only = simulated_only + src.avoid = avoid + src.skip_first = skip_first + src.use_diagonals = use_diagonals + src.heuristic = heuristic + movement_path = initial_path?.Copy() + +/datum/move_loop/has_target/astar/compare_loops( + datum/move_loop/loop_type, + priority, + flags, + extra_info, + delay, + timeout, + atom/chasing, + repath_delay, + max_path_length, + minimum_distance, + obj/item/card/id/id, + simulated_only, + turf/avoid, + skip_first, + initial_path, + use_diagonals, + datum/callback/heuristic, +) + if(..() && \ + repath_delay == src.repath_delay && \ + max_path_length == src.max_path_length && \ + minimum_distance == src.minimum_distance && \ + access ~= src.access && \ + simulated_only == src.simulated_only && \ + avoid == src.avoid && \ + use_diagonals == src.use_diagonals && \ + heuristic == src.heuristic) + return TRUE + return FALSE + +/datum/move_loop/has_target/astar/loop_started() + . = ..() + if(!movement_path) + INVOKE_ASYNC(src, PROC_REF(recalculate_path)) + +/datum/move_loop/has_target/astar/loop_stopped() + . = ..() + movement_path = null + +/datum/move_loop/has_target/astar/Destroy() + avoid = null + return ..() + +///Tries to calculate a new path for this moveloop. +/datum/move_loop/has_target/astar/proc/recalculate_path() + if(!COOLDOWN_FINISHED(src, repath_cooldown)) + return + + COOLDOWN_START(src, repath_cooldown, repath_delay) + + var/path_ok = SSpathfinder.astar_pathfind( + moving, + target, + max_path_length, + minimum_distance, + access, + simulated_only, + avoid, + skip_first, + use_diagonals = use_diagonals, + on_finish = on_finish_callback, + heuristic = heuristic + ) + + if(path_ok) + is_pathing = TRUE + SEND_SIGNAL(src, COMSIG_MOVELOOP_ASTAR_REPATH) + +///Called when a path has finished being created +/datum/move_loop/has_target/astar/proc/on_finish_pathing(list/path) + movement_path = path + is_pathing = FALSE + +/datum/move_loop/has_target/astar/move() + if(!length(movement_path)) + if(is_pathing) + return MOVELOOP_NOT_READY + else + INVOKE_ASYNC(src, PROC_REF(recalculate_path)) + return MOVELOOP_FAILURE + + var/turf/next_step = movement_path[1] + var/atom/old_loc = moving.loc + //KAPU NOTE: WE DO NOT HAVE THIS + //moving.Move(next_step, get_dir(moving, next_step), FALSE, !(flags & MOVEMENT_LOOP_NO_DIR_UPDATE)) + var/movement_dir = get_dir(moving, next_step) + moving.Move(next_step, movement_dir) + . = (old_loc != moving?.loc) ? MOVELOOP_SUCCESS : MOVELOOP_FAILURE + + // this check if we're on exactly the next tile may be overly brittle for dense objects who may get bumped slightly + // to the side while moving but could maybe still follow their path without needing a whole new path + if(get_turf(moving) == next_step) + if(length(movement_path)) + movement_path.Cut(1,2) + else + INVOKE_ASYNC(src, PROC_REF(recalculate_path)) + return MOVELOOP_FAILURE + ///Base class of move_to and move_away, deals with the distance and target aspect of things /datum/move_loop/has_target/dist_bound var/distance = 0 diff --git a/code/controllers/subsystem/non_firing/SSpathfinder.dm b/code/controllers/subsystem/non_firing/SSpathfinder.dm index 0896e4c580b..cd2446fb3e6 100644 --- a/code/controllers/subsystem/non_firing/SSpathfinder.dm +++ b/code/controllers/subsystem/non_firing/SSpathfinder.dm @@ -213,3 +213,74 @@ SUBSYSTEM_DEF(pathfinder) active_pathing += path return TRUE return FALSE + +/datum/controller/subsystem/pathfinder/proc/astar_pathfind( + atom/movable/invoker, + atom/end, + max_steps = 30, + mintargetdist, + list/access, + simulated_only = TRUE, + turf/exclude, + skip_first = TRUE, + use_diagonals = TRUE, + datum/callback/on_finish, + datum/callback/heuristic, +) + + var/datum/pathfind/astar/path = new( + invoker, + end, + access, + max_steps, + mintargetdist, + simulated_only, + exclude, + skip_first, + use_diagonals, + on_finish, + heuristic, + ) + + if(path.start()) + active_pathing += path + return TRUE + return FALSE + +/datum/controller/subsystem/pathfinder/proc/astar_pathfind_now( + atom/movable/invoker, + atom/end, + max_steps = 14, + mintargetdist, + list/access, + simulated_only = TRUE, + turf/exclude, + skip_first = TRUE, + use_diagonals = TRUE, + datum/callback/heuristic, +) + + var/datum/pathfind/astar/path = new( + invoker, + end, + access, + max_steps, + mintargetdist, + simulated_only, + exclude, + skip_first, + use_diagonals, + null, + heuristic, + ) + + if(!path.start()) + return FALSE + + if(!path.search_step(FALSE)) + path.early_exit() + return FALSE + + path.finished() + return path.path + diff --git a/code/datums/actions/cooldown_action.dm b/code/datums/actions/cooldown_action.dm index 715fe1fc096..f3be39b6b03 100644 --- a/code/datums/actions/cooldown_action.dm +++ b/code/datums/actions/cooldown_action.dm @@ -269,6 +269,9 @@ /datum/action/cooldown/proc/PreActivate(atom/target) if(SEND_SIGNAL(owner, COMSIG_MOB_ABILITY_STARTED, src, target) & COMPONENT_BLOCK_ABILITY_START) return + + if(!is_valid_target(target)) + return // Note, that PreActivate handles no cooldowns at all by default. // Be sure to call StartCooldown() in Activate() where necessary. . = Activate(target) @@ -361,4 +364,14 @@ return stat_panel_data +/** + * Check if the target we're casting on is a valid target. + * For no-target (self cast) actions, the target being checked (cast_on) is the caster. + * For click_to_activate actions, the target being checked is the clicked atom. + * + * Return TRUE if cast_on is valid, FALSE otherwise + */ +/datum/action/cooldown/proc/is_valid_target(atom/cast_on) + return TRUE + #undef COOLDOWN_NO_DISPLAY_TIME diff --git a/code/datums/ai/ai_behavior.dm b/code/datums/ai/ai_behavior.dm index 32245a5c60d..01eb28886da 100644 --- a/code/datums/ai/ai_behavior.dm +++ b/code/datums/ai/ai_behavior.dm @@ -2,12 +2,19 @@ /datum/ai_behavior /// What distance you need to be from the target to perform the action. var/required_distance = 1 + /// If >0, overrides controller.target_search_radius + var/search_radius_override = null /// Flags for extra behavior var/behavior_flags = NONE /// Cooldown between actions performances, defaults to the value of /// CLICK_CD_MELEE because that seemed like a nice standard for the speed of /// AI behavior var/action_cooldown = CLICK_CD_MELEE + /// A multiplier applied to the behavior's goap_score(). + var/goap_weight = 1 + + /// Behaviors to add upon a successful setup + var/list/sub_behaviors /// Called by the AI controller when first being added. Additional arguments /// depend on the behavior type. For example, if the behavior involves attacking @@ -48,6 +55,7 @@ controller.behavior_args -= type // If this was a movement task, reset our movement target if necessary if(!(behavior_flags & AI_BEHAVIOR_REQUIRE_MOVEMENT)) + next_behavior(controller, succeeded) return if(behavior_flags & AI_BEHAVIOR_KEEP_MOVE_TARGET_ON_FINISH) return @@ -63,3 +71,130 @@ if(controller.movement_target_source != type) return controller.set_movement_target(type, null) + +/// Returns a behavior to perform after this one, or null if continuing this one +/datum/ai_behavior/proc/next_behavior(datum/ai_controller/controller, success) + return null + +/// Executed before goap_score(), to see if the behavior should even be considered. +/datum/ai_behavior/proc/goap_precondition(datum/ai_controller/controller) + return TRUE + +/// Returns a numerical value that is essentially a priority for planner behaviors. +/datum/ai_behavior/proc/goap_score(datum/ai_controller/controller) + return score_distance(controller, goap_get_ideal_target(controller)) + +/// Returns the ideal target for this behavior. +/datum/ai_behavior/proc/goap_get_ideal_target(datum/ai_controller/controller, set_path = FALSE) + var/list/options = goap_filter_targets(controller) + return get_best_target_by_distance_score(controller, options, set_path) + +/// Filter through potential targets to find real targets. +/datum/ai_behavior/proc/goap_filter_targets(datum/ai_controller/controller) + var/list/options = list() + for(var/atom/potential_target as anything in goap_get_potential_targets(controller)) + if(goap_is_valid_target(controller, potential_target)) + options += potential_target + return options + +/// Returns a list of potential targets to filter through. +/datum/ai_behavior/proc/goap_get_potential_targets(datum/ai_controller/controller) + return list() + +/// Returns TRUE if the given atom is a valid target for this behavior. +/datum/ai_behavior/proc/goap_is_valid_target(datum/ai_controller/controller, atom/target) + return TRUE + +#define BINARY_INSERT_TARGET(target_list, target, score) \ + do { \ + var/length = length(target_list); \ + if(!length) { \ + target_list[target] = score; \ + } else { \ + var/left = 1; \ + var/right = length; \ + var/middle = (left + right) >> 1; \ + while(left < right) { \ + if(target_list[target_list[middle]] <= score) { \ + left = middle + 1; \ + } else { \ + right = middle; \ + }; \ + middle = (left + right) >> 1; \ + }; \ + middle = target_list[target_list[middle]] > score ? middle : middle + 1; \ + target_list.Insert(middle, target); \ + target_list[target] = score; \ + }; \ + } while(FALSE) + + +/// Returns the best target by scoring the distance of each possible target. +/// Takes a list to insert the path into, so it can be handed back and re-used. +/datum/ai_behavior/proc/get_best_target_by_distance_score(datum/ai_controller/controller, list/targets, set_path = FALSE) + if(!length(targets)) + return null + + var/atom/movable/pawn = controller.pawn + var/list/access = controller.get_access() + + var/list/targets_by_score = list() + var/list/reachable_targets = list() + + // Sort targets by their estimated score. The last element in the lists has the highest score. + while(length(targets)) + var/index = rand(1, length(targets)) + var/atom/A = targets[index] + targets.Cut(index, index + 1) + + var/score = score_distance(controller, A) + + BINARY_INSERT_TARGET(targets_by_score, A, score) + + // WEE WOO WEE WOO BEHAVIOR-CHANGING MICRO-OPT: we assume turfs further than 1 tile aren't reachable + // Because this is true in 99.9999999999999999% of cases + if(get_dist(pawn, A) <= 1 && A.Adjacent(pawn)) + BINARY_INSERT_TARGET(reachable_targets, A, score) + + // Go through our sorted target list until we find a path to one. + // Note: This does mean that the found target might not be the ideal one, as it's operating on the estimate + // This is a performance thing. We cannot actually use the true best target. + var/atom/ideal_atom + var/list/ideal_path + if(length(reachable_targets)) + ideal_atom = reachable_targets[length(reachable_targets)] + else + while(length(targets_by_score)) + var/atom/candidate = targets_by_score[length(targets_by_score)] + targets_by_score.len-- + + var/list/path = SSpathfinder.astar_pathfind_now( + controller.pawn, + candidate, + controller.max_target_distance, + required_distance, + access, + HAS_TRAIT(controller.pawn, TRAIT_FLYING), + ) + + if(path) + ideal_atom = candidate + ideal_path = path + break + + if(set_path && length(ideal_path)) + controller.clear_blackboard_key(BB_PATH_TO_USE) + controller.set_blackboard_key(BB_PATH_TO_USE, ideal_path) + return ideal_atom + +#undef BINARY_INSERT_TARGET + +/// Helper for scoring something based on the distance between it and the pawn. +/// By default, returns a value between 100 and -INFINITY, where 100 is a distance of 0 steps. +/// A distance equal to target_search_radius is zero. +/// A distance greater than target_search_radius is negative. +/datum/ai_behavior/proc/score_distance(datum/ai_controller/controller, atom/target) + var/search_radius = search_radius_override || controller.target_search_radius + if(isnull(target)) + return -INFINITY + return 100 * (search_radius - get_dist_manhattan(get_turf(controller.pawn), get_turf(target))) / search_radius diff --git a/code/datums/ai/ai_controller.dm b/code/datums/ai/ai_controller.dm index 8933fcc5c47..f572e52bb03 100644 --- a/code/datums/ai/ai_controller.dm +++ b/code/datums/ai/ai_controller.dm @@ -45,6 +45,8 @@ RESTRICT_TYPE(/datum/ai_controller) var/continue_processing_when_client = FALSE /// Distance to give up on target. var/max_target_distance = 14 + /// The search radius when looking for interesting things. + var/target_search_radius = 5 /// Cooldown for new plans, to prevent AI from going nuts if it can't think of new plans and looping on end COOLDOWN_DECLARE(failed_planning_cooldown) /// All subtrees this AI has available. Will run them in order, so make sure @@ -142,8 +144,9 @@ RESTRICT_TYPE(/datum/ai_controller) return var/list/temp_subtree_list = list() for(var/subtree in planning_subtrees) - var/subtree_instance = GLOB.ai_subtrees[subtree] + var/datum/ai_planning_subtree/subtree_instance = GLOB.ai_subtrees[subtree] temp_subtree_list += subtree_instance + subtree_instance.setup(src) planning_subtrees = temp_subtree_list /// Proc to move from one pawn to another. This will destroy the target's existing controller. @@ -344,7 +347,7 @@ RESTRICT_TYPE(/datum/ai_controller) qdel(src) /datum/ai_controller/proc/setup_able_to_run() - // paused_until is handled by PauseAi() manually + // paused_until is handled by pause_ai() manually RegisterSignals(pawn, list(SIGNAL_ADDTRAIT(TRAIT_AI_PAUSED), SIGNAL_REMOVETRAIT(TRAIT_AI_PAUSED)), PROC_REF(update_able_to_run)) /datum/ai_controller/proc/clear_able_to_run() @@ -521,6 +524,9 @@ RESTRICT_TYPE(/datum/ai_controller) var/list/arguments = args.Copy() arguments[1] = src + if(!behavior.setup(arglist(arguments))) + return FALSE + // It's still in the plan, don't add it again to current_behaviors // but do keep it in the planned behavior list so its not cancelled if(current_behaviors[behavior]) diff --git a/code/datums/ai/ai_planning_subtree.dm b/code/datums/ai/ai_planning_subtree.dm index 10e45a49257..65ef5549d38 100644 --- a/code/datums/ai/ai_planning_subtree.dm +++ b/code/datums/ai/ai_planning_subtree.dm @@ -18,3 +18,9 @@ /// the other subtrees should multiple exist in the controller. /datum/ai_planning_subtree/proc/select_behaviors(datum/ai_controller/controller, seconds_per_tick) return + +/datum/ai_planning_subtree/proc/setup(datum/ai_controller/controller) + return + +/datum/ai_planning_subtree/proc/process_behavior_selection(datum/ai_controller/controller, seconds_per_tick) + select_behaviors(controller, seconds_per_tick) diff --git a/code/datums/ai/basic_mobs/basic_ai_behaviors/frustration.dm b/code/datums/ai/basic_mobs/basic_ai_behaviors/frustration.dm new file mode 100644 index 00000000000..16af43ecb2b --- /dev/null +++ b/code/datums/ai/basic_mobs/basic_ai_behaviors/frustration.dm @@ -0,0 +1,24 @@ +/// A simple frustration behavior to be queued in addition to another behavior. If the given duration ellapses and the frustration key is still +/// present, the ai will cancel all of it's actions. +/datum/ai_behavior/frustration + action_cooldown = 0.1 SECONDS + +/datum/ai_behavior/frustration/setup(datum/ai_controller/controller, frustration_key, duration) + . = ..() + controller.set_blackboard_key(frustration_key, world.time) + +/datum/ai_behavior/frustration/perform(delta_time, datum/ai_controller/controller, frustration_key, duration) + ..() + if(isnull(controller.blackboard[frustration_key])) + return AI_BEHAVIOR_SUCCEEDED + + if(world.time >= duration + controller.blackboard[frustration_key]) + controller.cancel_actions() + DEBUG_AI_LOG(controller, "AI got frustrated and cancelled current actions.") + return AI_BEHAVIOR_FAILED + + return AI_BEHAVIOR_DELAY + +/datum/ai_behavior/frustration/finish_action(datum/ai_controller/controller, succeeded, frustration_key, duration) + . = ..() + controller.clear_blackboard_key(frustration_key) diff --git a/code/datums/ai/goap_subtree.dm b/code/datums/ai/goap_subtree.dm new file mode 100644 index 00000000000..cdc8cc2431d --- /dev/null +++ b/code/datums/ai/goap_subtree.dm @@ -0,0 +1,47 @@ +/datum/ai_planning_subtree/goap + var/list/possible_behaviors = list() + +/datum/ai_planning_subtree/goap/setup(datum/ai_controller/controller, ...) + . = ..() + controller.set_blackboard_key(BB_PLANNER_BEHAVIORS, list()) + for(var/behavior_type in possible_behaviors) + var/datum/ai_behavior/behavior = GET_AI_BEHAVIOR(behavior_type) + if(isnull(behavior)) + stack_trace("Bad AI behavior: [behavior_type]") + continue + controller.set_blackboard_key_assoc(BB_PLANNER_BEHAVIORS, behavior, 0) + +/datum/ai_planning_subtree/goap/select_behaviors(datum/ai_controller/controller, seconds_per_tick) + . = ..() + var/list/behavior_cache = controller.blackboard[BB_PLANNER_BEHAVIORS] + var/datum/ai_behavior/candidate = behavior_cache[1] + var/score_to_beat = behavior_cache[candidate] + + for(var/behavior in behavior_cache) + var/behavior_score = behavior_cache[behavior] + if(behavior_score == AI_GOAP_SKIP_BEHAVIOR) + continue + + // Filter out lower scoring behaviors + if(score_to_beat > behavior_score) + continue + + // If there's a tie, pick either. + if((behavior_score == score_to_beat) && prob(50)) + continue + + candidate = behavior + score_to_beat = behavior_cache[candidate] + + if(candidate) + controller.queue_behavior(candidate.type) + return SUBTREE_RETURN_FINISH_PLANNING + +/datum/ai_planning_subtree/goap/process_behavior_selection(datum/ai_controller/controller, seconds_per_tick) + for(var/datum/ai_behavior/behavior in controller.blackboard[BB_PLANNER_BEHAVIORS]) + if(behavior.goap_precondition(controller)) + controller.set_blackboard_key_assoc(BB_PLANNER_BEHAVIORS, behavior, behavior.goap_weight * behavior.goap_score(controller)) + else + controller.set_blackboard_key_assoc(BB_PLANNER_BEHAVIORS, behavior, AI_GOAP_SKIP_BEHAVIOR) + + return ..() diff --git a/code/datums/ai/movement/ai_movement_astar.dm b/code/datums/ai/movement/ai_movement_astar.dm new file mode 100644 index 00000000000..f01d3d0ff3c --- /dev/null +++ b/code/datums/ai/movement/ai_movement_astar.dm @@ -0,0 +1,44 @@ +/** + * This movement datum represents smart-pathing + */ +/datum/ai_movement/astar + max_pathing_attempts = 20 + + /// If FALSE, diagonals will be split into 2 cardinal moves. + var/use_diagonals = TRUE + +/datum/ai_movement/astar/start_moving_towards(datum/ai_controller/controller, atom/current_movement_target, min_distance) + . = ..() + var/atom/movable/moving = controller.pawn + var/delay = controller.movement_delay + var/max_path_length_override = controller.blackboard[BB_PATH_MAX_LENGTH] + + var/datum/move_loop/has_target/astar/loop = GLOB.move_manager.astar_move( + moving, + current_movement_target, + delay, + repath_delay = 0.5 SECONDS, + max_path_length = isnull(max_path_length_override) ? AI_MAX_PATH_LENGTH : max_path_length_override, + minimum_distance = controller.get_minimum_distance(), + access = controller.get_access(), + simulated_only = !HAS_TRAIT(controller.pawn, TRAIT_FLYING), + subsystem = SSai_movement, + extra_info = controller, + initial_path = controller.blackboard[BB_PATH_TO_USE], + use_diagonals = use_diagonals, + ) + + controller.clear_blackboard_key(BB_PATH_TO_USE) + RegisterSignal(loop, COMSIG_MOVELOOP_PREPROCESS_CHECK, PROC_REF(pre_move)) + RegisterSignal(loop, COMSIG_MOVELOOP_POSTPROCESS, PROC_REF(post_move)) + RegisterSignal(loop, COMSIG_MOVELOOP_ASTAR_REPATH, PROC_REF(repath_incoming)) + + return loop + +/datum/ai_movement/astar/proc/repath_incoming(datum/move_loop/has_target/astar/source) + SIGNAL_HANDLER + var/datum/ai_controller/controller = source.extra_info + + source.access = controller.get_access() + source.minimum_distance = controller.get_minimum_distance() + diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 45d94901398..e294c94c304 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -450,6 +450,16 @@ sheet_type = /obj/item/stack/sheet/mineral/iridium ore_type = /obj/item/stack/ore/iridium +/datum/material/gnesis + name = "gnesis" + id = MAT_GNESIS + sheet_type = /obj/item/stack/sheet/gnesis + +/datum/material/gnesis_glass + name = "translucent gnesis" + id = MAT_GNESIS_GLASS + sheet_type = /obj/item/stack/sheet/gnesis_glass + /datum/material/bananium name = "Bananium" id = MAT_BANANIUM diff --git a/code/datums/keybindings/flock_keybinds.dm b/code/datums/keybindings/flock_keybinds.dm new file mode 100644 index 00000000000..c209b13807c --- /dev/null +++ b/code/datums/keybindings/flock_keybinds.dm @@ -0,0 +1,64 @@ +/datum/keybinding/flock/can_use(client/C, mob/M) + return isflockmob(M) && ..() + +/datum/keybinding/flock/intent + /// The intent to switch to. + var/intent + +/datum/keybinding/flock/intent/down(client/C) + . = ..() + var/mob/living/basic/flock/M = C.mob + M.a_intent_change(intent) + +/datum/keybinding/flock/intent/help + name = "Help Intent (Tap)" + intent = INTENT_HELP + keys = list("1") + +/datum/keybinding/flock/intent/disarm + name = "Disarm Intent (Tap)" + intent = INTENT_DISARM + keys = list("2") + +/datum/keybinding/flock/intent/grab + name = "Grab Intent (Tap)" + intent = INTENT_GRAB + keys = list("3") + +/datum/keybinding/flock/intent/harm + name = "Harm Intent (Tap)" + intent = INTENT_HARM + keys = list("4") + +/datum/keybinding/flock/cycle_part + name = "Cycle Part" + keys = list("X") + +/datum/keybinding/flock/cycle_part/can_use(client/C, mob/M) + return isflockdrone(M) + +/datum/keybinding/flock/cycle_part/down(client/C) + . = ..() + var/mob/living/basic/flock/drone/M = C.mob + if(M.active_part == M.parts[1]) + M.set_active_part(M.parts[2]) + else if(M.active_part == M.parts[2]) + M.set_active_part(M.parts[3]) + else if(M.active_part == M.parts[3]) + M.set_active_part(M.parts[1]) + +/datum/keybinding/flock/flockphase + name = "Toggle Flockphase" + keys = list("C") + +/datum/keybinding/flock/flockphase/can_use(client/C, mob/M) + return isflockdrone(M) + +/datum/keybinding/flock/flockphase/down(client/C) + . = ..() + var/mob/living/basic/flock/drone/M = C.mob + if(HAS_TRAIT(M, TRAIT_FLOCKPHASE)) + M.stop_flockphase() + else + if(M.can_flockphase() && M.flockphase_tax()) + M.start_flockphase() diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm index 38350a6483e..7b061737d87 100644 --- a/code/datums/looping_sounds/machinery_sounds.dm +++ b/code/datums/looping_sounds/machinery_sounds.dm @@ -6,6 +6,15 @@ end_sound = 'sound/machines/shower/shower_end.ogg' volume = 20 +/datum/looping_sound/flock_relay + mid_sounds = list('sound/goonstation/flockmind/Flock_Reactor.ogg' = 1) + mid_length = 33 SECONDS + volume = 40 + extra_range = 10 + falloff_exponent = 10 + falloff_distance = 5 + channel = CHANNEL_ENGINE + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /datum/looping_sound/supermatter diff --git a/code/datums/point_holder.dm b/code/datums/point_holder.dm new file mode 100644 index 00000000000..4b7fcf2c073 --- /dev/null +++ b/code/datums/point_holder.dm @@ -0,0 +1,72 @@ +/// Completely generic resource handler +/datum/point_holder + VAR_PRIVATE/max_points = INFINITY + VAR_PRIVATE/points = 0 + +/datum/point_holder/proc/has_points(atleast) + if(points >= atleast) + return points + +/datum/point_holder/proc/is_full() + return points == max_points + +/// Returns the number of points needed to fill the holder. +/datum/point_holder/proc/how_empty() + return max_points - points + +/// Returns the % (0-100) of how full the holder is. +/datum/point_holder/proc/percent(step = 1) + if(max_points == INFINITY) + return 0 + return round((points / max_points) * 100, step) + +/datum/point_holder/proc/adjust_points(num, check_enough) + if(num > 0) + return add_points(num) + + else if(num < 0) + return remove_points(num, check_enough) + + return 0 + +/// Add points. Returns the number of points added. +/datum/point_holder/proc/add_points(num) + if(points == max_points) + return 0 + + var/old = points + points = min(max_points, points + num) + return points - old + +/// Removes points. Returns the number of points removed. +/datum/point_holder/proc/remove_points(num, check_enough) + if(check_enough && (points < num)) + return 0 + + if(points == 0) + return 0 + + var/old = points + points = max(0, points - num) + return old - points + +/datum/point_holder/proc/set_max_points(new_max) + max_points = new_max + points = min(max_points, points) + +/datum/point_holder/proc/get_max_points() + return max_points + +/datum/point_holder/infinite + +/datum/point_holder/infinite/add_points(num) + return 0 + +/datum/point_holder/infinite/has_points(atleast) + return INFINITY + +/datum/point_holder/infinite/remove_points(num, check_enough) + return 0 + +/datum/point_holder/infinite/set_max_points(new_max) + max_points = new_max diff --git a/code/datums/proximity/advanced_proximity_monitor.dm b/code/datums/proximity/advanced_proximity_monitor.dm index 94889a6dd21..54b3620cad9 100644 --- a/code/datums/proximity/advanced_proximity_monitor.dm +++ b/code/datums/proximity/advanced_proximity_monitor.dm @@ -15,6 +15,10 @@ /// Can be used in certain situations where you may have effects that trigger only at the edge, /// while also wanting the field effect to trigger at edge turfs as well var/edge_is_a_field = FALSE + + /// If TRUE, view() will be used over range(). If this is used, edge turfs will not exist! + var/use_view = FALSE + /// All turfs on the inside of the proximity monitor - range - 1 turfs var/list/turf/field_turfs = list() /// All turfs on the very last tile of the proximity monitor's radius @@ -131,6 +135,13 @@ /datum/proximity_monitor/advanced/proc/update_new_turfs() if(ignore_if_not_on_turf && !isturf(host.loc)) return list(FIELD_TURFS_KEY = list(), EDGE_TURFS_KEY = list()) + + if(use_view) + var/list/turfs = list() + for(var/turf/T as turf in view(current_range, host)) + turfs += T + return list(FIELD_TURFS_KEY = turfs, EDGE_TURFS_KEY = list()) + var/list/local_field_turfs = list() var/list/local_edge_turfs = list() var/turf/center = get_turf(host) diff --git a/code/datums/proximity/interceptor_field.dm b/code/datums/proximity/interceptor_field.dm new file mode 100644 index 00000000000..d0f9950a85d --- /dev/null +++ b/code/datums/proximity/interceptor_field.dm @@ -0,0 +1,14 @@ +/datum/proximity_monitor/advanced/interceptor + use_view = TRUE + +/datum/proximity_monitor/advanced/interceptor/New(atom/_host, range, _ignore_if_not_on_turf) + ..() + recalculate_field(TRUE) + +/datum/proximity_monitor/advanced/interceptor/Destroy() + return ..() + +/datum/proximity_monitor/advanced/interceptor/field_turf_crossed(atom/movable/movable, turf/old_location, turf/new_location) + . = ..() + if(isprojectile(movable)) + astype(host, /obj/structure/flock/interceptor).try_intercept_projectile(movable) diff --git a/code/game/alternate_appearance.dm b/code/game/alternate_appearance.dm index b7cdb4f8d55..bf27f23a286 100644 --- a/code/game/alternate_appearance.dm +++ b/code/game/alternate_appearance.dm @@ -98,6 +98,13 @@ display_alt_appearance(key, displayTo) +/* + Gets an alternate appearance for the provided key + key - the key to the assoc list of key = /datum/alternate_appearances +*/ +/atom/proc/get_alt_appearance(key) + return alternate_appearances?[key] + ////////////// // WRAPPERS // ////////////// diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 66f05b70858..1932504a9bc 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -19,6 +19,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list( ROLE_MORPH = 5, ROLE_DEMON = 5, ROLE_ELITE = 5, + ROLE_FLOCK = 20, // DUO ANTAGS ROLE_GUARDIAN = 20, diff --git a/code/game/objects/effects/decals/Cleanable/alien_blood.dm b/code/game/objects/effects/decals/Cleanable/alien_blood.dm index c8d6f5d3085..7eef3033eeb 100644 --- a/code/game/objects/effects/decals/Cleanable/alien_blood.dm +++ b/code/game/objects/effects/decals/Cleanable/alien_blood.dm @@ -68,3 +68,9 @@ /obj/effect/decal/cleanable/blood/gibs/down/vox basecolor = "#2299FC" fleshcolor = "#808D11" + +/obj/effect/decal/cleanable/blood/gibs/flock + basecolor = COLOR_BLOOD_FLOCK + +/obj/effect/decal/cleanable/blood/gibs/core/flock + basecolor = COLOR_BLOOD_FLOCK diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index f97b15c1112..d07250f91a9 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -7,6 +7,9 @@ /proc/xgibs(atom/location) new /obj/effect/gibspawner/xeno(get_turf(location)) +/proc/flockgibs(atom/location) + new /obj/effect/gibspawner/flock(get_turf(location)) + /proc/robogibs(atom/location) new /obj/effect/gibspawner/robot(get_turf(location)) diff --git a/code/game/objects/effects/info_tags.dm b/code/game/objects/effects/info_tags.dm new file mode 100644 index 00000000000..c70ff686740 --- /dev/null +++ b/code/game/objects/effects/info_tags.dm @@ -0,0 +1,63 @@ +/obj/effect/abstract/info_tag + plane = INFO_TAG_PLANE + layer = 1 + alpha = 180 + + appearance_flags = APPEARANCE_UI_IGNORE_ALPHA + vis_flags = VIS_INHERIT_ID + + /// Atom we're displaying over. + var/atom/parent + + /// Mobs that see us rn. + var/list/mob/viewing_mobs + + /// Images we're inserting into client.images + VAR_PRIVATE/image/vis_holder + + +/obj/effect/abstract/info_tag/Initialize(mapload) + . = ..() + vis_holder = new() + vis_holder.plane = INFO_TAG_PLANE + vis_holder.vis_contents += src + +/obj/effect/abstract/info_tag/Destroy(force) + set_parent(null) + vis_holder = null + + for(var/mob/M in viewing_mobs) + hide_from(M.client) + + viewing_mobs = null + return ..() + +/obj/effect/abstract/info_tag/proc/set_parent(atom/new_parent) + parent = new_parent + vis_holder.loc = parent + +/// Update the text. +/obj/effect/abstract/info_tag/proc/set_text(text) + maptext = "[text]" + +/// Should the given mob be able to see this tag? +/obj/effect/abstract/info_tag/proc/mob_should_see(mob/M) + return TRUE + +/obj/effect/abstract/info_tag/proc/show_to(client/C) + C?.images |= vis_holder + +/obj/effect/abstract/info_tag/proc/hide_from(client/C) + C?.images -= vis_holder + +/obj/effect/abstract/info_tag/flock + maptext_x = -64 + maptext_y = -6 + maptext_width = 160 + maptext_height = 48 + +/obj/effect/abstract/info_tag/flock/mob_should_see(mob/M) + return (M != parent) && isflockmob(M) + +/obj/effect/abstract/info_tag/flock/info + maptext_y = -14 diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 05fc1c8e89f..b69c2923ff3 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -104,6 +104,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp name = "revenantspawn" icon_state = "Rev" +/obj/effect/landmark/spawner/flock + name = "flockspawn" + icon_state = "flockmind" + /obj/effect/landmark/spawner/ninja name = "ninjaspawn" diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm index f1d1c92bb18..b04c6702607 100644 --- a/code/game/objects/effects/spawners/gibspawner.dm +++ b/code/game/objects/effects/spawners/gibspawner.dm @@ -54,3 +54,15 @@ /obj/effect/gibspawner/vox/gib_dna(obj/effect/decal/cleanable/blood/gibs/gib, datum/dna/mob_dna) if(!..()) // Probably admin spawned gib.blood_DNA["Unknown Vox DNA"] = "A+" + +/obj/effect/gibspawner/flock + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/flock, /obj/effect/decal/cleanable/blood/gibs/flock, /obj/effect/decal/cleanable/blood/gibs/core/flock) + gibamounts = list(2,2,1) + +/obj/effect/gibspawner/flock/New() + gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH), list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list()) + ..() + +/obj/effect/gibspawner/flock/gib_dna(obj/effect/decal/cleanable/blood/gibs/gib, datum/dna/mob_dna) + if(!..()) + gib.blood_DNA["UNKNOWN DNA"] = "&#^*@!" diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 624eb2953a0..990c882ae6b 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -5,6 +5,7 @@ * 4. REINFORCED PLASMA GLASS * 5. TITANIUM GLASS * 6. PLASTITANIUM GLASS + * 7. GNESIS GLASS Todo: Create a unified construct_window(sheet, user, created_window, full_window) @@ -26,6 +27,13 @@ GLOBAL_LIST_INIT(glass_recipes, list ( new /datum/stack_recipe("dropper", /obj/item/reagent_containers/dropper, 1, time = 1 SECONDS), )) +GLOBAL_LIST_INIT(gnesis_glass_recipes, list ( + new /datum/stack_recipe("bright shard", /obj/item/shard/gnesis_glass, time = 0 SECONDS), + new /datum/stack_recipe/window("directional gnesis window", /obj/structure/window/flock, time = 1 SECONDS, on_floor = TRUE, window_checks = TRUE), + new /datum/stack_recipe/window("fulltile gnesis window", /obj/structure/window/flock/fulltile, 2, time = 2 SECONDS, on_floor = TRUE, window_checks = TRUE), + new /datum/stack_recipe("gnesis cache", /obj/item/reagent_containers/glass/gnesis, 5, time = 2 SECONDS), +)) + /obj/item/stack/sheet/glass name = "glass" desc = "HOLY SHEET! That is a lot of glass." @@ -312,3 +320,21 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list( . = ..() recipes = GLOB.plastitaniumglass_recipes +////////////////////////////// +// MARK: GNESIS GLASS +////////////////////////////// +/obj/item/stack/sheet/gnesis_glass + name = "transculent wafers" + singular_name = "transculent wafer" + desc = "A rare, complex crystalline matrix with a lazily shifting internal structure. The layers are arranged to let light through." + icon_state = "gnesisglass" + materials = list(MAT_GNESIS_GLASS = MINERAL_MATERIAL_AMOUNT) + merge_type = /obj/item/stack/sheet/gnesis_glass + armor = list(MELEE = 20, BULLET = 20, LASER = 0, ENERGY = 100, BOMB = 0, RAD = 50, FIRE = 100, ACID = 20) + resistance_flags = FIRE_PROOF + point_value = 5 + dynamic_icon_state = FALSE + +/obj/item/stack/sheet/gnesis_glass/Initialize(mapload, new_amount, merge) + . = ..() + recipes = GLOB.gnesis_glass_recipes diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 948689a3955..0ab1b79ed5a 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -13,6 +13,7 @@ Mineral Sheets - Platinum - Alien Alloy - Adamantine + - Gnesis */ GLOBAL_LIST_INIT(sandstone_recipes, list ( @@ -138,6 +139,13 @@ GLOBAL_LIST_INIT(adamantine_recipes, list( new /datum/stack_recipe("incomplete servant golem shell", /obj/item/golem_shell/servant, req_amount = 1, res_amount = 1), )) +GLOBAL_LIST_INIT(gnesis_recipes, list ( + new /datum/stack_recipe("flock chair", /obj/structure/chair/comfy/flock, 2, time = 1 SECONDS, one_per_turf = TRUE, on_floor = TRUE), + new /datum/stack_recipe("flock closet", /obj/structure/closet/flock, 2, time = 10 SECONDS, one_per_turf = TRUE, on_floor = TRUE), + new /datum/stack_recipe("flock grille", /obj/structure/grille/flock, 1, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), + new /datum/stack_recipe("flock door", /obj/machinery/door/flock, 10, time = 10 SECONDS, one_per_turf = TRUE, on_floor = TRUE), + )) + GLOBAL_LIST_INIT(snow_recipes, list( new /datum/stack_recipe("snowman", /obj/structure/snowman, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("Snowball", /obj/item/snowball, 1) @@ -600,6 +608,23 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list( /obj/item/stack/sheet/mineral/adamantine/fifty amount = 50 +/* + * Gnesis + */ + +/obj/item/stack/sheet/gnesis + name = "wafers" + desc = "A rare, complex crystalline matrix with a lazily shifting internal structure. Not to be confused with gneiss, a metamorphic rock." + singular_name = "wafer" + icon_state = "gnesis" + materials = list(MAT_GNESIS = MINERAL_MATERIAL_AMOUNT) + merge_type = /obj/item/stack/sheet/gnesis + dynamic_icon_state = FALSE + +/obj/item/stack/sheet/gnesis/Initialize(mapload, new_amount, merge) + . = ..() + recipes = GLOB.gnesis_recipes + /* * Snow */ diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index d8239b0f146..56f5e03ffb4 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -105,3 +105,12 @@ materials = list(MAT_TITANIUM = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT) icon_prefix = "plastitanium" welded_type = /obj/item/stack/sheet/plastitaniumglass + +/obj/item/shard/gnesis_glass + name = "bright shard" + desc = "A jagged shard of weird alien computer crystal stuff." + color = "#1bdebd" + force = 7 + throwforce = 12 + materials = list(MAT_GNESIS_GLASS = MINERAL_MATERIAL_AMOUNT * 0.5) + welded_type = /obj/item/stack/sheet/gnesis_glass diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 56f75059e65..59a5cd9a76f 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -19,6 +19,15 @@ if(obj_integrity <= 0) obj_destruction(damage_flag) +/** + * Retrieves the objects's current damage as a percentage where `100%` is `100`. + */ +/obj/proc/get_integrity_percentage() + return ceil(obj_integrity / max_integrity * 100) + +/obj/proc/get_integrity_lost() + return max_integrity - obj_integrity + ///returns the damage value of the attack after processing the obj's various armor protections /obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armor_penetration_flat = 0, armor_penetration_percentage = 0) if(damage_flag == MELEE && damage_amount < damage_deflection) diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm index 7f7108637d0..b9b63d1cc5c 100644 --- a/code/game/turfs/simulated/walls_misc.dm +++ b/code/game/turfs/simulated/walls_misc.dm @@ -107,3 +107,10 @@ sheet_type = /obj/item/stack/sheet/runed_metal sheet_amount = 1 girder_type = /obj/structure/girder/cult + +/turf/simulated/wall/gnesis + name = "gnesis wall" + desc = "A thick metal wall, it look very old." + icon = 'icons/goonstation/turf/flock.dmi' + color = "#1bdebd" + sheet_type = /obj/item/stack/sheet/gnesis diff --git a/code/modules/antagonists/flockmind/actions/cage_mob.dm b/code/modules/antagonists/flockmind/actions/cage_mob.dm new file mode 100644 index 00000000000..eceb478d082 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/cage_mob.dm @@ -0,0 +1,42 @@ +/datum/action/cooldown/flock/cage_mob + name = "Cage" + cooldown_time = 5 SECONDS + click_to_activate = TRUE + +/datum/action/cooldown/flock/cage_mob/is_valid_target(atom/cast_on) + return isliving(cast_on) && !isflockmob(cast_on) && isturf(cast_on.loc) + +/datum/action/cooldown/flock/cage_mob/Activate(atom/target) + if(DOING_INTERACTION(owner, "flock_cage")) + return FALSE + + var/mob/living/basic/flock/drone/bird = owner + bird.stop_flockphase(TRUE) + var/turf/T = get_turf(target) + + owner.visible_message( + SPAN_NOTICE("[owner] begins forming a cuboid structure around [target]."), + blind_message = SPAN_HEAR("You hear a strange synthetic whirring."), + ) + + var/obj/effect/temp_visual/flock_effect + if(iswallturf(T)) + flock_effect = new /obj/effect/temp_visual/flock/wall_convert(T) + + log_attack(owner, target, "attempted to cage") + + . = TRUE + playsound(owner, 'sound/goonstation/flockmind/flockdrone_build.ogg', 30, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE) + if(!do_after(owner, 4.5 SECONDS, target = target, interaction_key = "flock_cage")) + . = FALSE + + qdel(flock_effect) + if(!.) + return + + log_attack(owner, target, "caged") + + playsound(owner, 'sound/goonstation/flockmind/flockdrone_build_complete.ogg', 70, TRUE) + var/obj/structure/flock/cage/cage = new(T, bird.flock) + cage.cage_mob(target) + ..() diff --git a/code/modules/antagonists/flockmind/actions/control_drone.dm b/code/modules/antagonists/flockmind/actions/control_drone.dm new file mode 100644 index 00000000000..802faf92d93 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/control_drone.dm @@ -0,0 +1,148 @@ +/datum/action/cooldown/flock/control_drone + name = "Control Drone" + desc = "Direct a drone to perform an action." + button_icon_state = "ping" + click_to_activate = TRUE + unset_after_click = FALSE + click_cd_override = 0 + + var/mob/living/basic/flock/drone/selected_bird + +/datum/action/cooldown/flock/control_drone/Remove(mob/removed_from) + . = ..() + free_drone() + +/datum/action/cooldown/flock/control_drone/is_valid_target(atom/cast_on) + . = ..() + if(selected_bird) + return get_turf(cast_on) + + if(!isflockdrone(cast_on)) + return FALSE + + var/mob/living/basic/flock/drone/bird = cast_on + if(HAS_TRAIT_FROM(bird, TRAIT_AI_DISABLE_PLANNING, FLOCK_CONTROLLED_BY_OVERMIND_SOURCE)) + return FALSE + + if(bird.controlled_by) + return FALSE + return TRUE + +/datum/action/cooldown/flock/control_drone/Activate(atom/target) + . = ..() + if(isnull(selected_bird)) + bind_drone(target) + return TRUE + + selected_bird.ai_controller.cancel_actions() + + // Move to turf/structure, or convert turf. + if(isturf(target) || istype(target, /obj/structure/flock)) + if(istype(target, /obj/structure/flock/tealprint)) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/find_deposit_target, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + var/turf/T = get_turf(target) + if(isflockturf(T)) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/rally, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + if(T.can_flock_convert()) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/find_conversion_target, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + + // Harvest items + else if(isitem(target)) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/find_harvest_target, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + // Attack or convert enemies. + else if(ismob(target) && selected_bird.flock.is_mob_enemy(target)) + var/mob/living/L = target + if(L.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE) || L.IsKnockedDown()) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/find_capture_target, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + else if(selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/attack_target, target)) + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + return FALSE + + else if(isflockmob(target)) + if(istype(target, /mob/living/basic/flock/bit)) + to_chat(owner, SPAN_WARNING("Flockbits are too simple to be remotely controlled.")) + return FALSE + + var/mob/living/basic/flock/other_bird = target + if(other_bird.flock == selected_bird.flock) + if(!selected_bird.ai_controller.queue_behavior(/datum/ai_behavior/flock/find_heal_target, target)) + return FALSE + + pointer_helper(selected_bird, target, 2 SECONDS) + unset_click_ability(owner, performing_task = TRUE) + return TRUE + + +/datum/action/cooldown/flock/control_drone/unset_click_ability(mob/on_who, refund_cooldown, performing_task = TRUE) + . = ..() + free_drone(performing_task) + +/datum/action/cooldown/flock/control_drone/proc/pointer_helper(atom/from, atom/towards, duration) + var/mob/camera/flock/overmind/ghost_bird = owner + var/image/pointer = pointer_image_to(from, towards) + + animate(pointer, time = 2 SECONDS, alpha = 0) + ghost_bird.flock.add_ping_image(ghost_bird.client, pointer, 2 SECONDS) + +/datum/action/cooldown/flock/control_drone/proc/bind_drone(mob/living/basic/flock/drone/bird) + selected_bird = bird + RegisterSignal(bird, COMSIG_PARENT_QDELETING, PROC_REF(drone_gone)) + ADD_TRAIT(bird, TRAIT_AI_DISABLE_PLANNING, FLOCK_CONTROLLED_BY_OVERMIND_SOURCE) + bird.ai_controller.cancel_actions() + bird.say("suspending automated subroutines pending sentient-level instruction", forced = TRUE) + bird.AddComponent(/datum/component/flock_ping/selected) + +/datum/action/cooldown/flock/control_drone/proc/free_drone(performing_task = TRUE) + if(!selected_bird) + return + + if(!QDELETED(selected_bird) && !performing_task) + spawn(-1) + selected_bird.say("Sentient-level instruction suspended, resuming automated subroutines.", forced = TRUE) + + UnregisterSignal(selected_bird, COMSIG_PARENT_QDELETING) + REMOVE_TRAIT(selected_bird, TRAIT_AI_DISABLE_PLANNING, FLOCK_CONTROLLED_BY_OVERMIND_SOURCE) + + qdel(selected_bird.GetComponent(/datum/component/flock_ping/selected)) + selected_bird = null + unset_click_ability(owner) + +/datum/action/cooldown/flock/control_drone/proc/drone_gone(datum/source) + SIGNAL_HANDLER + + free_drone() + + diff --git a/code/modules/antagonists/flockmind/actions/create_rift.dm b/code/modules/antagonists/flockmind/actions/create_rift.dm new file mode 100644 index 00000000000..4d2b018fe43 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/create_rift.dm @@ -0,0 +1,27 @@ +/datum/action/cooldown/flock/create_rift + name = "Spawn Rift" + desc = "Spawn an rift where you are, and from there, begin." + button_icon_state = "spawn_egg" + +/datum/action/cooldown/flock/create_rift/is_valid_target(atom/cast_on) + var/turf/T = get_turf(owner) + if(!T.is_safe()) + to_chat(owner, SPAN_WARNING("This place is not safe enough for a rift.")) + return FALSE + + if(T.is_blocked_turf()) + to_chat(owner, SPAN_WARNING("There is not enough room for a rift here.")) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/create_rift/Activate(atom/target) + . = ..() + + var/turf/T = get_turf(owner) + if(tgui_alert(owner, "Would you like to create the rift on [T]?", "Spawn Rift", list("Yes", "No")) != "Yes") + return + + var/mob/camera/flock/overmind/ghost_bird = owner + ghost_bird.spawn_rift(T) + diff --git a/code/modules/antagonists/flockmind/actions/create_structure.dm b/code/modules/antagonists/flockmind/actions/create_structure.dm new file mode 100644 index 00000000000..566fe9ec0da --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/create_structure.dm @@ -0,0 +1,49 @@ +/datum/action/cooldown/flock/create_structure + name = "Place Tealprint" + desc = "Create a structure tealprint for your drones to construct onto." + button_icon_state = "fabstructure" + +/datum/action/cooldown/flock/create_structure/is_valid_target(atom/cast_on) + var/turf/simulated/floor/flock/T = get_turf(owner) + if(!istype(T)) + to_chat(owner, SPAN_WARNING("We are unable to perform complex substrate manipulation outside of our tiles.")) + return FALSE + + if(T.broken) + to_chat(owner, SPAN_WARNING("The tile we are above is broken.")) + return FALSE + + if(locate(/obj/structure/flock/tealprint) in T) + to_chat(owner, SPAN_WARNING("We are currently building something there.")) + return FALSE + + if(locate(/obj/structure/flock) in T) + to_chat(owner, SPAN_WARNING("An existing structure is occupying that tile.")) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/create_structure/Activate(atom/target) + var/mob/camera/flock/overmind/ghost_bird = owner + var/datum/flock/F = ghost_bird.flock + var/turf/loc = get_turf(ghost_bird) + + var/options = list() + for(var/datum/flock_unlockable/unlockable as anything in F.unlockables) + if(!unlockable.unlocked) + continue + options[unlockable.name] = unlockable + + var/datum/flock_unlockable/desired = tgui_input_list(ghost_bird, "Select a structure to create. Bandwidth upkeep costs are provided in parenthesis.", "Tealprint Selection", options) + desired = options[desired] + + if(isnull(desired)) + return + + F.refresh_unlockables() + if(!desired.unlocked) + return + + F.create_structure(loc, desired.structure_type) + + return ..() diff --git a/code/modules/antagonists/flockmind/actions/deconstruct.dm b/code/modules/antagonists/flockmind/actions/deconstruct.dm new file mode 100644 index 00000000000..cff7dfbe171 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/deconstruct.dm @@ -0,0 +1,43 @@ +/datum/action/cooldown/flock/deconstruct + name = "Deconstruct" + click_to_activate = TRUE + check_flags = AB_CHECK_CONSCIOUS + +/datum/action/cooldown/flock/deconstruct/is_valid_target(atom/cast_on) + var/turf/clicked_atom_turf = get_turf(cast_on) + if(!clicked_atom_turf) + return FALSE + + if(get_dist(owner, clicked_atom_turf) > 1) + return FALSE + + if(ismob(cast_on) || !HAS_TRAIT(cast_on, TRAIT_FLOCK_THING) || HAS_TRAIT(cast_on, TRAIT_FLOCK_NODECON)) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/deconstruct/Activate(atom/target) + . = ..() + var/mob/living/basic/flock/bird = owner + astype(bird, /mob/living/basic/flock/drone)?.stop_flockphase(TRUE) + bird.face_atom(target) + + bird.visible_message(SPAN_NOTICE("[bird] begins to deconstruct [target]."), blind_message = SPAN_HEAR("You hear an otherwordly whirring.")) + if(!do_after(bird, 6 SECONDS, target = target, interaction_key = "flock_deconstruct")) + return FALSE + + if(!is_valid_target(target)) + return FALSE + + // Structures + if(isobj(target)) + var/obj/obj_target = target + obj_target.deconstruct(TRUE) + return TRUE + + else if(isflockturf(target)) + var/turf/turf = target + turf.ChangeTurf(/turf/simulated/floor/flock, ignore_air = TRUE) + else + CRASH("Tried to flock deconstruct incompatible object of type: [target.type]") + return TRUE diff --git a/code/modules/antagonists/flockmind/actions/deposit.dm b/code/modules/antagonists/flockmind/actions/deposit.dm new file mode 100644 index 00000000000..b44f67968a7 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/deposit.dm @@ -0,0 +1,23 @@ +/datum/action/cooldown/flock/deposit + name = "Deposit" + click_to_activate = TRUE + check_flags = AB_CHECK_CONSCIOUS + +/datum/action/cooldown/flock/deposit/is_valid_target(atom/cast_on) + return istype(cast_on, /obj/structure/flock/tealprint) + +/datum/action/cooldown/flock/deposit/Activate(atom/target) + . = ..() + var/mob/living/basic/flock/bird = owner + astype(bird, /mob/living/basic/flock/drone)?.stop_flockphase(TRUE) + bird.face_atom(target) + + playsound(target, 'sound/goonstation/flockmind/flockdrone_quickbuild.ogg', 50, TRUE) + + while(do_after(bird, 1 SECONDS, target = target, interaction_key = "flock_deposit")) + var/obj/structure/flock/tealprint/tealprint = target + var/deposit = min(bird.substrate.has_points(), tealprint.substrate.how_empty(), FLOCK_SUBSTRATE_COST_DEPOST_TEALPRINT) + bird.substrate.remove_points(deposit) + tealprint.substrate.add_points(deposit) + return TRUE + diff --git a/code/modules/antagonists/flockmind/actions/designate_deconstruct.dm b/code/modules/antagonists/flockmind/actions/designate_deconstruct.dm new file mode 100644 index 00000000000..1a89120830d --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/designate_deconstruct.dm @@ -0,0 +1,18 @@ +/datum/action/cooldown/flock/designate_deconstruct + name = "Mark for Deconstruction" + desc = "Mark an existing flock structure for deconstruction, refunding some resources." + button_icon_state = "destroystructure" + + click_to_activate = TRUE + unset_after_click = FALSE + click_cd_override = 0 + +/datum/action/cooldown/flock/designate_deconstruct/Activate(atom/target) + . = ..() + + if(istype(target, /obj/structure/flock/tealprint)) + var/obj/structure/flock/tealprint/tealprint = target + return tealprint.try_cancel_structure() + + var/mob/camera/flock/ghost_bird = owner + return ghost_bird.flock.toggle_deconstruction_mark(target) diff --git a/code/modules/antagonists/flockmind/actions/designate_enemy.dm b/code/modules/antagonists/flockmind/actions/designate_enemy.dm new file mode 100644 index 00000000000..b38a6ad78ff --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/designate_enemy.dm @@ -0,0 +1,65 @@ +/datum/action/cooldown/flock/designate_enemy + name = "Designate Enemy" + desc = "Mark or unmark someone as an enemy." + button_icon_state = "designate_enemy" + + click_to_activate = TRUE + unset_after_click = FALSE + click_cd_override = 0 + +/datum/action/cooldown/flock/designate_enemy/is_valid_target(atom/cast_on) + var/atom/movable/target_movable = cast_on + if(!istype(target_movable)) + return FALSE + return !isflockmob(cast_on) && isliving(cast_on) || target_movable.has_buckled_mobs() + +/datum/action/cooldown/flock/designate_enemy/Activate(atom/target) + var/mob/camera/flock/ghost_bird = owner + var/datum/flock/flock = ghost_bird.flock + if(!flock) + return FALSE + + . = ..() + + if(flock.is_mob_ignored(target)) + flock.remove_ignore(target) + + else if(flock.is_mob_enemy(target)) + flock.remove_enemy(target) + return TRUE + + flock.update_enemy(target) + return TRUE + +/datum/action/cooldown/flock/designate_ignore + name = "Designate Ignore" + desc = "Designate someone to be ignored by your Flock." + button_icon_state = "designate_ignore" + + click_to_activate = TRUE + unset_after_click = FALSE + +/datum/action/cooldown/flock/designate_ignore/is_valid_target(atom/cast_on) + var/atom/movable/target_movable = cast_on + if(!istype(target_movable)) + return FALSE + return !isflockmob(cast_on) && isliving(cast_on) || target_movable.has_buckled_mobs() + +/datum/action/cooldown/flock/designate_ignore/Activate(atom/target) + var/mob/camera/flock/ghost_bird = owner + var/datum/flock/flock = ghost_bird.flock + if(!flock) + return FALSE + + . = ..() + + if(flock.is_mob_ignored(target)) + flock.remove_ignore(target) + + else if(flock.is_mob_enemy(target)) + flock.remove_enemy(target) + return TRUE + + flock.add_ignore(target) + return TRUE + diff --git a/code/modules/antagonists/flockmind/actions/designate_turf.dm b/code/modules/antagonists/flockmind/actions/designate_turf.dm new file mode 100644 index 00000000000..29f1541de06 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/designate_turf.dm @@ -0,0 +1,37 @@ +/datum/action/cooldown/flock/designate_tile + name = "Designate Priority Tile" + desc = "Add or remove a tile to the urgent tiles the Flock should claim." + button_icon_state = "designate_tile" + + click_to_activate = TRUE + unset_after_click = FALSE + click_cd_override = 0 + +/datum/action/cooldown/flock/designate_tile/is_valid_target(atom/cast_on) + var/turf/T = get_turf(cast_on) + return T?.can_flock_convert() + +/datum/action/cooldown/flock/designate_tile/Activate(atom/target) + var/turf/turf_target = get_turf(target) + if(isflockturf(target)) + to_chat(owner, SPAN_ALERT("That tile has already been converted by the flock.")) + return FALSE + + if(!turf_target.can_flock_convert()) + to_chat(owner, SPAN_ALERT("The flock is unable to convert that.")) + return FALSE + + var/mob/camera/flock/ghost_bird = owner + if(!ghost_bird.flock.marked_for_conversion[turf_target]) + if(ghost_bird.flock.turf_reservations[turf_target]) + to_chat(ghost_bird, SPAN_ALERT("That tile is already scheduled for conversion.")) + return FALSE + + ghost_bird.flock.marked_for_conversion[turf_target] = TRUE + ghost_bird.flock.add_notice(turf_target, FLOCK_NOTICE_PRIORITY) + return TRUE + + else + ghost_bird.flock.marked_for_conversion -= turf_target + ghost_bird.flock.remove_notice(turf_target, FLOCK_NOTICE_PRIORITY) + return TRUE diff --git a/code/modules/antagonists/flockmind/actions/diffract_drone.dm b/code/modules/antagonists/flockmind/actions/diffract_drone.dm new file mode 100644 index 00000000000..97a4d779d89 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/diffract_drone.dm @@ -0,0 +1,23 @@ +/datum/action/cooldown/flock/diffract_drone + name = "Diffract Drone" + desc = "Split a drone into flockbits, mindless automata that only convert whatever they find." + button_icon_state = "diffract" + click_to_activate = TRUE + +/datum/action/cooldown/flock/diffract_drone/is_valid_target(atom/cast_on) + if(!isflockdrone(cast_on)) + return FALSE + + var/mob/living/basic/flock/drone/bird = cast_on + if(bird.stat == DEAD) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/diffract_drone/PreActivate(atom/target) + . = ..() + +/datum/action/cooldown/flock/diffract_drone/Activate(atom/target) + . = ..() + var/mob/living/basic/flock/drone/bird = target + bird.split_into_bits() diff --git a/code/modules/antagonists/flockmind/actions/flock_action.dm b/code/modules/antagonists/flockmind/actions/flock_action.dm new file mode 100644 index 00000000000..0d00ad68411 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_action.dm @@ -0,0 +1,3 @@ +/datum/action/cooldown/flock + button_icon = 'icons/goonstation/hud/flock_ui.dmi' + background_icon = null diff --git a/code/modules/antagonists/flockmind/actions/flock_control_panel.dm b/code/modules/antagonists/flockmind/actions/flock_control_panel.dm new file mode 100644 index 00000000000..1c7b77fbe3c --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_control_panel.dm @@ -0,0 +1,9 @@ +/datum/action/cooldown/flock/control_panel + name = "Flock Control Panel" + desc = "Open the Flock control panel." + button_icon_state = "radio_stun" + +/datum/action/cooldown/flock/control_panel/Activate(atom/target) + . = ..() + var/mob/camera/flock/ghost_bird = owner + ghost_bird.flock.ui_interact(ghost_bird) diff --git a/code/modules/antagonists/flockmind/actions/flock_convert_action.dm b/code/modules/antagonists/flockmind/actions/flock_convert_action.dm new file mode 100644 index 00000000000..0060082cc32 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_convert_action.dm @@ -0,0 +1,67 @@ +/datum/action/cooldown/flock/convert + name = "Convert" + click_to_activate = TRUE + check_flags = AB_CHECK_CONSCIOUS + +/datum/action/cooldown/flock/convert/New(Target) + . = ..() + +/datum/action/cooldown/flock/convert/Destroy() + return ..() + +/datum/action/cooldown/flock/convert/is_valid_target(atom/cast_on) + var/turf/clicked_atom_turf = get_turf(cast_on) + if(!clicked_atom_turf) + return FALSE + + // This breaks pathfinding :( + // if(!owner.CanReach(clicked_atom_turf)) + // return FALSE + + // So instead: + if(get_dist(owner, clicked_atom_turf) > 1) + return FALSE + + if(!clicked_atom_turf.can_flock_convert()) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/convert/Activate(atom/target) + . = ..() + playsound(owner, 'sound/goonstation/flockmind/flockdrone_convert.ogg', 30, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE) + + var/turf/clicked_atom_turf = get_turf(target) + + if(isfloorturf(clicked_atom_turf) || iswallturf(clicked_atom_turf)) + return convert_turf(clicked_atom_turf) + + return FALSE + +/datum/action/cooldown/flock/convert/proc/convert_turf(turf/T) + + if(!is_valid_target(T)) + return FALSE + + var/mob/living/basic/flock/bird = owner + + var/obj/effect/temp_visual/flock_effect + + if(iswallturf(T)) + flock_effect = new /obj/effect/temp_visual/flock/wall_convert(T) + else + flock_effect = new /obj/effect/temp_visual/flock/floor_convert(T) + + owner.face_atom(T) + + bird.flock?.reserve_turf(bird, T) + if(!do_after(owner, 4.5 SECONDS, target = T, interaction_key = "flock_convert")) + qdel(flock_effect) + bird.flock?.free_turf(bird) + return FALSE + + bird.flock?.free_turf(bird) + qdel(flock_effect) + + bird.flock?.claim_turf(T) + return TRUE diff --git a/code/modules/antagonists/flockmind/actions/flock_heal_action.dm b/code/modules/antagonists/flockmind/actions/flock_heal_action.dm new file mode 100644 index 00000000000..6dd822f22f9 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_heal_action.dm @@ -0,0 +1,24 @@ +/datum/action/cooldown/flock/flock_heal + name = "Repair" + click_to_activate = TRUE + +/datum/action/cooldown/flock/flock_heal/Activate(atom/target) + var/mob/living/basic/flock/drone/this_bird = owner + if(!this_bird.substrate.has_points(FLOCK_SUBSTRATE_COST_REPAIR)) + return FALSE + + astype(this_bird, /mob/living/basic/flock/drone)?.stop_flockphase(TRUE) + + if(isflockmob(target)) + var/mob/living/basic/flock/bird = target + ADD_TRAIT(bird, TRAIT_AI_PAUSED, ref(src)) + + if(!do_after(owner, 1 SECONDS, target = target, interaction_key = "flock_repair")) + REMOVE_TRAIT(bird, TRAIT_AI_PAUSED, ref(src)) + return FALSE + + REMOVE_TRAIT(bird, TRAIT_AI_PAUSED, ref(src)) + bird.heal_overall_damage(10, 10) + this_bird.substrate.remove_points(FLOCK_SUBSTRATE_COST_REPAIR) + ..() + return TRUE diff --git a/code/modules/antagonists/flockmind/actions/flock_heal_surge.dm b/code/modules/antagonists/flockmind/actions/flock_heal_surge.dm new file mode 100644 index 00000000000..5b3a1f91f6f --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_heal_surge.dm @@ -0,0 +1,30 @@ +/datum/action/cooldown/flock/repair_burst + name = "Concentrated Repair Burst" + desc = "Transmit large amounts of energy into up to four drones in a small area, healing them up to half of their hitpoints. Does not work on dead drones." + button_icon_state = "heal_drone" + cooldown_time = 30 SECONDS + click_to_activate = TRUE + +/datum/action/cooldown/flock/repair_burst/Activate(atom/target) + var/list/targets = list() + for(var/mob/living/basic/flock/drone/bird in range(3, get_turf(target))) + if(bird.stat == DEAD) + continue + + targets += bird + if(length(targets) >= 4) + break + + if(!length(targets)) + to_chat(owner, SPAN_ALERT("No repairable drones in range.")) + return FALSE + + . = ..() + + to_chat(owner, SPAN_NOTICE("You transmit energy into your drones!")) + playsound(owner, 'sound/goonstation/flockmind/flockmind_cast.ogg', 50) + + for(var/mob/living/basic/flock/drone/bird as anything in targets) + playsound(bird, "sound/effects/radio_sweep[rand(1,5)].ogg", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + new /obj/effect/temp_visual/flock/flock_heal_burst(get_turf(bird)) + bird.adjustHealth(-50) diff --git a/code/modules/antagonists/flockmind/actions/flock_nest_action.dm b/code/modules/antagonists/flockmind/actions/flock_nest_action.dm new file mode 100644 index 00000000000..43dce4c61b6 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_nest_action.dm @@ -0,0 +1,44 @@ +/datum/action/cooldown/flock/nest + name = "Lay Egg" + button_icon_state = "spawn_egg" + check_flags = AB_CHECK_CONSCIOUS + +/datum/action/cooldown/flock/nest/is_valid_target(atom/cast_on) + var/mob/living/basic/flock/drone/bird = owner + var/turf/simulated/floor/flock/flockfloor = get_turf(cast_on) + if(!istype(flockfloor) || flockfloor.is_blocked_turf(source_atom = owner)) + to_chat(owner, SPAN_WARNING("The egg must be placed on an open flock tile.")) + return FALSE + + if(!bird.flock) + to_chat(owner, SPAN_WARNING("Our prime directives prohibit us from synthesizing an egg.")) + return FALSE + + if(!bird.substrate.has_points(bird.flock.current_egg_cost)) + to_chat(owner, SPAN_WARNING("Error: Not enough resources. (We need [bird.flock.current_egg_cost])")) + return FALSE + + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + to_chat(owner, SPAN_WARNING("We can not synthesize eggs while flockrunning.")) + return FALSE + + return TRUE + +/datum/action/cooldown/flock/nest/Activate(atom/target) + . = ..() + var/mob/living/basic/flock/drone/bird = owner + if(!bird.substrate.has_points(bird.flock?.current_egg_cost || FLOCK_SUBSTRATE_COST_LAY_EGG)) + return FALSE + var/turf/simulated/floor/flock/flockfloor = get_turf(target) + bird.stop_flockphase(TRUE) + + to_chat(bird, SPAN_NOTICE("Our internal fabricators spring into action, we must hold still.")) + + if(!do_after_once(bird, 8 SECONDS, needhand = FALSE, target = bird.loc, interaction_key = "flock_lay_egg")) + return FALSE + + bird.substrate.remove_points(bird.flock.current_egg_cost) + bird.visible_message(SPAN_NOTICE("[bird] deploys some sort of device.")) + + new /obj/structure/flock/egg(flockfloor) + return TRUE diff --git a/code/modules/antagonists/flockmind/actions/flock_ping_action.dm b/code/modules/antagonists/flockmind/actions/flock_ping_action.dm new file mode 100644 index 00000000000..1be06a6e1f2 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/flock_ping_action.dm @@ -0,0 +1,14 @@ +/datum/action/cooldown/flock/ping + name = "Ping" + desc = "Request attention from other partitions of the Flock." + button_icon_state = "ping" + cooldown_time = 0.3 SECONDS + click_to_activate = TRUE + +/datum/action/cooldown/flock/ping/is_valid_target(atom/cast_on) + return get_turf(cast_on) + +/datum/action/cooldown/flock/ping/Activate(atom/target) + . = ..() + var/mob/camera/flock/ghost_bird = owner + ghost_bird.flock.ping(target, ghost_bird) diff --git a/code/modules/antagonists/flockmind/actions/gatecrash.dm b/code/modules/antagonists/flockmind/actions/gatecrash.dm new file mode 100644 index 00000000000..ca3e1aff811 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/gatecrash.dm @@ -0,0 +1,44 @@ +/datum/action/cooldown/flock/gatecrash + name = "Gatecrash" + desc = "Transmit an override signal to open every door within range." + button_icon_state = "open_door" + + cooldown_time = 40 SECONDS + +/datum/action/cooldown/flock/gatecrash/Activate(atom/target) + var/list/targets = list() + for(var/obj/machinery/door/airlock/airlock in range(10, get_turf(owner))) + if(airlock.canAIControl()) + targets += airlock + + for(var/obj/mecha/mech in range(10, get_turf(owner))) + if(mech.occupant) + targets += mech + + if(!length(targets)) + to_chat(owner, SPAN_NOTICE("No targets in range that can be opened via radio.")) + return FALSE + + ..() + + to_chat(owner, SPAN_NOTICE("You force open all powered doors around you.")) + playsound(owner, 'sound/goonstation/flockmind/flockmind_cast.ogg', 50) + + addtimer(CALLBACK(src, PROC_REF(async_open_doors), targets), 1.5 SECONDS) + return TRUE + +/datum/action/cooldown/flock/gatecrash/proc/async_open_doors(list/doors) + for(var/obj/target in doors) + if(QDELETED(target)) + continue + + // Stagger openins a little randomly + if(prob(20)) + sleep(0.2 SECONDS) + + if(isairlock(target)) + var/obj/machinery/door/airlock/airlock = target + INVOKE_ASYNC(airlock, TYPE_PROC_REF(/obj/machinery/door, open)) + if(ismecha(target)) + var/obj/mecha/mech = target + INVOKE_ASYNC(mech, TYPE_PROC_REF(/obj/mecha, go_out)) diff --git a/code/modules/antagonists/flockmind/actions/partition_mind.dm b/code/modules/antagonists/flockmind/actions/partition_mind.dm new file mode 100644 index 00000000000..763a069f96f --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/partition_mind.dm @@ -0,0 +1,83 @@ +/datum/action/cooldown/flock/partition_mind + name = "Partition Mind" + button_icon_state = "partition_mind" + cooldown_time = 60 SECONDS + + var/awaiting_partition = FALSE + +/datum/action/cooldown/flock/partition_mind/New() + ..() + desc = "Divide our computational power, creating a Flocktrace. Requires [FLOCK_COMPUTE_COST_FLOCKTRACE] total bandwidth per trace." + +/datum/action/cooldown/flock/partition_mind/is_valid_target(atom/cast_on) + var/mob/camera/flock/overmind/ghost_bird = owner + if(awaiting_partition) + to_chat(ghost_bird, SPAN_WARNING("We are currently partitioning.")) + return FALSE + + if(!ghost_bird.flock.can_afford(FLOCK_COMPUTE_COST_FLOCKTRACE)) + to_chat(ghost_bird, SPAN_WARNING("The Flock does not have enough spare computaional power to support another thread.")) + return FALSE + + if(length(ghost_bird.flock.traces) >= ghost_bird.flock.max_traces) + if(length(ghost_bird.flock.traces) < floor(FLOCK_COMPUTE_COST_RELAY / FLOCK_COMPUTE_COST_FLOCKTRACE)) + to_chat(ghost_bird, SPAN_WARNING("The Flock needs more total computational power to support another thread.")) + else + to_chat(ghost_bird, SPAN_WARNING("The Flock has hit it's thread limit.")) + return FALSE + return TRUE + +/datum/action/cooldown/flock/partition_mind/Activate(atom/target) + . = ..() + do_partition() + +/datum/action/cooldown/flock/partition_mind/proc/do_partition() + set waitfor = FALSE + var/mob/camera/flock/overmind/ghost_bird = owner + if(!ghost_bird.flock.can_afford(FLOCK_COMPUTE_COST_FLOCKTRACE)) + to_chat(ghost_bird, SPAN_WARNING("Partition failure: bandwidth required is unavailable.")) + return + + awaiting_partition = TRUE + + to_chat(ghost_bird, SPAN_NOTICE("Partitioning initiated, stand by...")) + + log_admin("Sending Flocktrace offer to ghosts, they have [30 SECONDS] to respond.") + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a Flocktrace?", ROLE_FLOCK, TRUE, source = /mob/camera/flock/trace) + + awaiting_partition = FALSE + + if(QDELETED(owner)) + log_admin("The Flockmind lost before the partition could complete.") + return + + if(!length(candidates)) + log_admin("No ghosts responded to the flocktrace offer from [ghost_bird.real_name]") + to_chat(ghost_bird, SPAN_WARNING("Partition failure: unable to coalesce sentience.")) + return + + if(!ghost_bird.flock.can_afford(FLOCK_COMPUTE_COST_FLOCKTRACE)) + log_admin("The Flock was unable to support another flocktrace, partition aborted.") + to_chat(ghost_bird, SPAN_WARNING("Partition failure: bandwidth required is unavailable.")) + return + + var/mob/candidate = pick(candidates) + + dust_if_respawnable(candidate) + log_admin("[key_name_admin(candidate)] respawned as a Flocktrace.") + + var/mob/camera/flock/trace/new_ghostbird = new(get_turf(ghost_bird), ghost_bird.flock) + new_ghostbird.key = candidate.key + new_ghostbird.mind = new + new_ghostbird.mind.bind_to(new_ghostbird) + new_ghostbird.mind.set_original_mob(new_ghostbird) + new_ghostbird.mind.assigned_role = SPECIAL_ROLE_FLOCK + new_ghostbird.mind.special_role = SPECIAL_ROLE_FLOCK + var/list/messages = list() + messages += "
You are [gradient_text("The Divine Flock","#3cb5a3", "#124e43")]
" + messages += "
" + gradient_text("We have been partitioned by our overmind to further their goals of propogating The Signal. It is our task to assist in managing their drones to achieve their goals. Such is the will of the Monarch.", "#3cb5a3", "#1e806e") + "
" + messages += "
" + gradient_text("Our powers are more limited than that of our overmind, but we can utilize gatecrash subsystems and take manual control of drones (using alt-click).", "#3cb5a3", "#1e806e") + "
" + messages += "
" + gradient_text("For more information, we have decrypted an information manifest: ([GLOB.configuration.url.wiki_url]/index.php/The_Divine_Flock)", "#3cb5a3", "#1e806e") + "
" + to_chat(new_ghostbird, chat_box_red(messages.Join("
"))) + new_ghostbird.playsound_local(new_ghostbird, 'sound/goonstation/flockmind/ArtifactFea2.ogg', 50, FALSE, use_reverb = FALSE) + SSticker.mode.traitors |= new_ghostbird.mind diff --git a/code/modules/antagonists/flockmind/actions/radio_blast.dm b/code/modules/antagonists/flockmind/actions/radio_blast.dm new file mode 100644 index 00000000000..34eaebc34b5 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/radio_blast.dm @@ -0,0 +1,39 @@ +/datum/action/cooldown/flock/radio_blast + name = "Radio Stun Burst" + desc = "Overwhelm the radio headsets of everyone within 3m of your target. Will not work on broken or non-existent headsets." + button_icon_state = "radio_stun" + cooldown_time = 20 SECONDS + click_to_activate = TRUE + +/datum/action/cooldown/flock/radio_blast/Activate(atom/target) + var/list/targets = list() + for(var/mob/living/carbon/human/guy in range(3, get_turf(target))) + var/obj/item/radio/worn_radio + for(var/obj/item/I in guy.get_contents()) + if(istype(I, /obj/item/radio)) + worn_radio = I + break + if(!istype(worn_radio) || !guy.can_hear() || !worn_radio.listening) + continue + + targets += guy + + if(!length(targets)) + to_chat(owner, SPAN_ALERT("No targets are in range with active headsets.")) + return FALSE + + . = ..() + + to_chat(owner, SPAN_NOTICE("You transmit the worst static you can weave into the headsets around you.")) + playsound(owner, 'sound/goonstation/flockmind/flockmind_cast.ogg', 50, FALSE) + + for(var/mob/living/carbon/human/guy as anything in targets) + to_chat(guy, SPAN_ALERT("Horrifying static bursts into your headset, disorienting you severely!")) + playsound(guy, "sound/effects/radio_sweep[rand(1,5)].ogg", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + guy.KnockDown(3 SECONDS) + guy.SetConfused(20 SECONDS) + guy.do_jitter_animation(10) + + var/obj/item/organ/internal/ears/ears = guy.get_int_organ(/obj/item/organ/internal/ears) + if(istype(ears)) + ears.receive_damage(rand(3, 6)) diff --git a/code/modules/antagonists/flockmind/actions/radio_talk.dm b/code/modules/antagonists/flockmind/actions/radio_talk.dm new file mode 100644 index 00000000000..7ab8d4c3c74 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/radio_talk.dm @@ -0,0 +1,40 @@ +/datum/action/cooldown/flock/radio_talk + name = "Narrowbeam Transmission" + desc = "Hijack a radio headset of a target to broadcast a message." + button_icon_state = "talk" + cooldown_time = 2 SECONDS + click_to_activate = TRUE + +/datum/action/cooldown/flock/radio_talk/Activate(atom/target) + var/obj/item/radio/worn_radio + + + if(!ishuman(target) && !istype(target, /obj/item/radio)) + to_chat(owner, SPAN_ALERT("[target] is not a valid target!")) + return FALSE + + if(istype(target, /obj/item/radio)) + worn_radio = target + if(!worn_radio.listening) + to_chat(owner, SPAN_ALERT("[target] is not turned on!")) + return FALSE + + if(ishuman(target)) + var/mob/living/carbon/human/schmuck = target + for(var/obj/item/I in schmuck.get_contents()) + if(istype(I, /obj/item/radio)) + worn_radio = I + break + if(!istype(worn_radio) || !worn_radio.listening) + to_chat(owner, SPAN_ALERT("[target] does not have a working radio!")) + return FALSE + + var/msg = tgui_input_text(usr, "What do you wish to broadcast?", null, "") + if(!msg) + return FALSE + + . = ..() + + playsound(get_turf(worn_radio), "sound/effects/radio_sweep[rand(1,5)].ogg", 20, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + to_chat(owner, SPAN_NOTICE("You transmit a message through [worn_radio]!")) + worn_radio.autosay(istype(target, /obj/item/radio) ? Gibberish(msg, 70, 50) : msg, "Strange Static", null) diff --git a/code/modules/antagonists/flockmind/actions/release_control.dm b/code/modules/antagonists/flockmind/actions/release_control.dm new file mode 100644 index 00000000000..f4c55cc9487 --- /dev/null +++ b/code/modules/antagonists/flockmind/actions/release_control.dm @@ -0,0 +1,13 @@ +/datum/action/cooldown/flock/release_control + name = "Release Control" + desc = "Release yourself from this drone." + button_icon_state = "eject" + +/datum/action/cooldown/flock/release_control/Activate(atom/target) + . = ..() + var/mob/living/basic/flock/drone/bird = owner + if(!bird.flock) + to_chat(bird, SPAN_WARNING("You have no flock to return to.")) + return + + bird.release_control(TRUE) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/_flock_behavior_base.dm b/code/modules/antagonists/flockmind/ai_behaviors/_flock_behavior_base.dm new file mode 100644 index 00000000000..fc8a9a1fc7f --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/_flock_behavior_base.dm @@ -0,0 +1,19 @@ +/datum/ai_behavior/flock + /// The name of the behavior in the UI for flock drones. + var/name = "" + +/datum/ai_behavior/flock/perform(seconds_per_tick, datum/ai_controller/controller, ...) + SHOULD_CALL_PARENT(TRUE) + . = ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + bird.set_task_desc(name) + +/datum/ai_behavior/flock/finish_action(datum/ai_controller/controller, succeeded, ...) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(HAS_TRAIT(controller.pawn, TRAIT_FLOCKPHASE)) + bird.stop_flockphase(FALSE) + + . = ..() + + bird.set_task_desc("") + diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_capture.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_capture.dm new file mode 100644 index 00000000000..60a2bf5845a --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_capture.dm @@ -0,0 +1,86 @@ +/datum/ai_behavior/flock/find_capture_target + name = "capturing" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_CAPTURE + +/datum/ai_behavior/flock/find_capture_target/setup(datum/ai_controller/controller, mob/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(isturf(overmind_target.loc)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: capture biological lifeform", forced = TRUE) + else + bird.say("invalid capture target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_capture_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + return length(bird.flock?.enemies) + +/datum/ai_behavior/flock/find_capture_target/goap_get_potential_targets(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + return bird.flock.enemies.Copy() + +/datum/ai_behavior/flock/find_capture_target/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/mob/living/target_mob = target + return ismob(target_mob) && isturf(target_mob.loc) && (target_mob.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE) || target_mob.IsKnockedDown()) + +/datum/ai_behavior/flock/find_capture_target/perform(seconds_per_tick, datum/ai_controller/controller, mob/overmind_target) + ..() + var/atom/target = overmind_target || goap_get_ideal_target(controller, set_path = TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_CAPTURE_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_capture_target/finish_action(datum/ai_controller/controller, succeeded, obj/item/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_capture_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_capture) + +/datum/ai_behavior/flock/perform_capture + name = "capturing" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH + +/datum/ai_behavior/flock/perform_capture/setup(datum/ai_controller/controller, ...) + var/atom/target = controller.blackboard[BB_FLOCK_CAPTURE_TARGET] + set_movement_target(controller, target) + return ..() + +/datum/ai_behavior/flock/perform_capture/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + var/mob/living/target = controller.blackboard[BB_FLOCK_CAPTURE_TARGET] + if(target) + if(!isturf(target?.loc) || !(target.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE)) || target.IsKnockedDown()) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + controller.clear_blackboard_key(BB_FLOCK_CAPTURE_TARGET) + var/datum/action/cooldown/flock/cage_mob/cage_action = locate() in bird.actions + spawn(-1) + cage_action.Trigger(target = target) + + if(DOING_INTERACTION(bird, "flock_cage")) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_capture/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_CAPTURE_TARGET) + + + if(!succeeded && controller.blackboard[BB_FLOCK_OVERMIND_CONTROL] && !QDELETED(controller.pawn)) + var/mob/living/basic/flock/bird = controller.pawn + bird.say("unable to reach target provided by sentient level instruction, aborting subroutine", forced = TRUE) + + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_convert.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_convert.dm new file mode 100644 index 00000000000..bb88eaadb57 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_convert.dm @@ -0,0 +1,158 @@ +/datum/ai_behavior/flock/find_conversion_target + name = "building" + goap_weight + +/datum/ai_behavior/flock/find_conversion_target/setup(datum/ai_controller/controller, turf/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(goap_is_valid_target(controller, overmind_target)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: convert object to substrate", forced = TRUE) + else + bird.say("invalid conversion target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_conversion_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + return bird.substrate.has_points(FLOCK_SUBSTRATE_COST_CONVERT) + +/datum/ai_behavior/flock/find_conversion_target/score_distance(datum/ai_controller/controller, atom/target) + . = ..() + var/mob/living/basic/flock/bird = controller.pawn + if(bird.flock?.marked_for_conversion[target]) + /* + * because the result of scoring is based on max distance, + * the score of any given tile is -100 to 0, with 0 being best. + * Adding 200 basically allows a tile at twice the max distance to be considered. + */ + . += 200 + +/datum/ai_behavior/flock/find_conversion_target/goap_get_potential_targets(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + var/datum/flock/bird_flock = bird.flock + + var/list/options = list() + var/list/priority_turfs = bird_flock?.get_priority_turfs() + if(length(priority_turfs)) + options += priority_turfs + + for(var/turf/T as turf in range(controller.target_search_radius, bird)) + options += T + + return options + +/datum/ai_behavior/flock/find_conversion_target/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/turf/T = target + if(!isturf(T)) + return FALSE + + if(!T.can_flock_convert()) + return FALSE + + if(isflockturf(T)) + return FALSE + + var/mob/living/basic/flock/bird = controller.pawn + if(isnull(bird.flock)) + return TRUE + + if(bird.flock.claimed_floors[T] || bird.flock.claimed_walls[T]) + return FALSE + + return bird.flock.is_turf_free(T) + +/datum/ai_behavior/flock/find_conversion_target/perform(seconds_per_tick, datum/ai_controller/controller, turf/overmind_target) + ..() + var/turf/target = overmind_target || goap_get_ideal_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_CONVERT_TARGET, target) + + var/mob/living/basic/flock/bird = controller.pawn + if(bird.flock) + bird.flock.reserve_turf(bird, target) + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_conversion_target/finish_action(datum/ai_controller/controller, succeeded, turf/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_conversion_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_conversion) + +/datum/ai_behavior/flock/perform_conversion + name = "building" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + +/datum/ai_behavior/flock/perform_conversion/setup(datum/ai_controller/controller, ...) + var/turf/target_turf = controller.blackboard[BB_FLOCK_CONVERT_TARGET] + set_movement_target(controller, target_turf) + return ..() + +/datum/ai_behavior/flock/perform_conversion/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/bird = controller.pawn + var/turf/target = controller.blackboard[BB_FLOCK_CONVERT_TARGET] + if(target) + controller.clear_blackboard_key(BB_FLOCK_CONVERT_TARGET) + var/datum/action/cooldown/flock/convert/convert_action = locate() in bird.actions + spawn(-1) + convert_action.Trigger(target = target) + + if(DOING_INTERACTION(bird, "flock_convert")) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_conversion/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + bird.flock?.free_turf(bird) + + if(!succeeded && controller.blackboard[BB_FLOCK_OVERMIND_CONTROL] && !QDELETED(controller.pawn)) + bird.say("unable to reach target provided by sentient level instruction, aborting subroutine", forced = TRUE) + + controller.clear_blackboard_key(BB_FLOCK_CONVERT_TARGET) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + + +// +// Subtype for creating a nest. Effectively a higher priority convert that only happens when the bird can lay an egg. +// + +/datum/ai_behavior/flock/find_conversion_target/nest + name = "nesting" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_NEST + required_distance = 0 + +/datum/ai_behavior/flock/find_conversion_target/nest/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + if(!bird.flock) + return FALSE + + if(length(bird.flock.drones) > FLOCK_DRONE_LIMIT) + return FALSE + + return bird.substrate.has_points(FLOCK_SUBSTRATE_COST_CONVERT + bird.flock.current_egg_cost) + +/datum/ai_behavior/flock/find_conversion_target/nest/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/turf/T = target + return ..() && !T.is_blocked_turf(exclude_mobs = TRUE) && !locate(/obj/structure/flock/egg, T) + +/datum/ai_behavior/flock/perform_conversion/nest + name = "nesting" + required_distance = 0 + +/datum/ai_behavior/flock/perform_conversion/nest/next_behavior(datum/ai_controller/controller, success) + . = ..() + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/find_existing_nest) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_deconstruct.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_deconstruct.dm new file mode 100644 index 00000000000..0e4a5bd05f1 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_deconstruct.dm @@ -0,0 +1,114 @@ +/datum/ai_behavior/flock/find_deconstruct_target + name = "deconstructing" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_DECONSTRUCT + +/datum/ai_behavior/flock/find_deconstruct_target/setup(datum/ai_controller/controller, turf/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(is_valid_target(overmind_target)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: deconstruct object", forced = TRUE) + else + bird.say("invalid deconstruct target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_deconstruct_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + return length(bird.flock?.marked_for_deconstruction) + +/datum/ai_behavior/flock/find_deconstruct_target/goap_score(datum/ai_controller/controller) + return score_distance(controller, get_target(controller)) + +/datum/ai_behavior/flock/find_deconstruct_target/score_distance(datum/ai_controller/controller, atom/target) + . = ..() + var/mob/living/basic/flock/bird = controller.pawn + if(bird.flock?.marked_for_deconstruction[target]) + /* + * because the result of scoring is based on max distance, + * the score of any given tile is -100 to 0, with 0 being best. + * Adding 200 basically allows a tile at twice the max distance to be considered. + */ + . += 200 + +/datum/ai_behavior/flock/find_deconstruct_target/proc/get_target(datum/ai_controller/controller, path_to = FALSE) + var/mob/living/basic/flock/bird = controller.pawn + + var/list/options = list() + for(var/atom/A as anything in bird.flock.marked_for_deconstruction) + if(get_dist(A, bird) > controller.max_target_distance) + continue + + if(bird.flock && !bird.flock.is_turf_free(get_turf(A))) + continue + + options += A + + return get_best_target_by_distance_score(controller, options, path_to) + +/datum/ai_behavior/flock/find_deconstruct_target/proc/is_valid_target(atom/target) + return !ismob(target) && HAS_TRAIT(target, TRAIT_FLOCK_THING) && !HAS_TRAIT(target, TRAIT_FLOCK_NODECON) + +/datum/ai_behavior/flock/find_deconstruct_target/perform(seconds_per_tick, datum/ai_controller/controller, turf/overmind_target) + ..() + var/atom/target = overmind_target || get_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_DECON_TARGET, target) + + var/mob/living/basic/flock/bird = controller.pawn + if(bird.flock) + bird.flock.reserve_turf(bird, get_turf(target), remove_on_change = FALSE) + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_deconstruct_target/finish_action(datum/ai_controller/controller, succeeded, turf/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_deconstruct_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_deconstruct) + +/datum/ai_behavior/flock/perform_deconstruct + name = "deconstructing" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + +/datum/ai_behavior/flock/perform_deconstruct/setup(datum/ai_controller/controller, ...) + var/turf/target_turf = controller.blackboard[BB_FLOCK_DECON_TARGET] + set_movement_target(controller, target_turf) + return ..() + +/datum/ai_behavior/flock/perform_deconstruct/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/bird = controller.pawn + var/turf/target = controller.blackboard[BB_FLOCK_DECON_TARGET] + if(target) + controller.clear_blackboard_key(BB_FLOCK_DECON_TARGET) + var/datum/action/cooldown/flock/deconstruct/deconstruct_action = locate() in bird.actions + spawn(-1) + deconstruct_action.Trigger(target = target) + + if(DOING_INTERACTION(bird, "flock_deconstruct")) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_deconstruct/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + bird.flock?.free_turf(bird) + + if(!succeeded && controller.blackboard[BB_FLOCK_OVERMIND_CONTROL] && !QDELETED(controller.pawn)) + bird.say("unable to reach target provided by sentient level instruction, aborting subroutine", forced = TRUE) + + controller.clear_blackboard_key(BB_FLOCK_DECON_TARGET) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_deposit.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_deposit.dm new file mode 100644 index 00000000000..6a4a8f10f50 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_deposit.dm @@ -0,0 +1,101 @@ +/datum/ai_behavior/flock/find_deposit_target + name = "depositing" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_DEPOSIT + +/datum/ai_behavior/flock/find_deposit_target/setup(datum/ai_controller/controller, obj/structure/flock/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(goap_is_valid_target(controller, overmind_target)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: deposit substrate", forced = TRUE) + else + bird.say("invalid deposit target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_deposit_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + return bird.substrate.has_points(FLOCK_SUBSTRATE_COST_DEPOST_TEALPRINT) + +/datum/ai_behavior/flock/find_deposit_target/goap_get_potential_targets(datum/ai_controller/controller) + var/list/options = ..() + for(var/obj/structure/flock/tealprint in range(controller.target_search_radius, controller.pawn)) + options += tealprint + return options + +/datum/ai_behavior/flock/find_deposit_target/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/obj/structure/flock/tealprint/tealprint = target + if(!istype(tealprint)) + return FALSE + + var/mob/living/basic/flock/bird = controller.pawn + return (tealprint.flock == bird.flock) && !tealprint.substrate.is_full() + +/datum/ai_behavior/flock/find_deposit_target/perform(seconds_per_tick, datum/ai_controller/controller, overmind_target) + ..() + var/atom/target = overmind_target || goap_get_ideal_target(controller, set_path = TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_DEPOSIT_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_deposit_target/finish_action(datum/ai_controller/controller, succeeded, overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_deposit_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_deposit) + +/datum/ai_behavior/flock/perform_deposit + name = "depositing" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH + +/datum/ai_behavior/flock/perform_deposit/setup(datum/ai_controller/controller, ...) + var/turf/target_turf = controller.blackboard[BB_FLOCK_DEPOSIT_TARGET] + set_movement_target(controller, target_turf) + return ..() + +/datum/ai_behavior/flock/perform_deposit/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/obj/structure/flock/tealprint/tealprint = target + if(!istype(tealprint)) + return FALSE + + var/mob/living/basic/flock/bird = controller.pawn + return (tealprint.flock == bird.flock) && !tealprint.substrate.is_full() + +/datum/ai_behavior/flock/perform_deposit/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + var/obj/structure/flock/tealprint/target = controller.blackboard[BB_FLOCK_DEPOSIT_TARGET] + if(target) + if(!goap_is_valid_target(controller, target)) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.clear_blackboard_key(BB_FLOCK_DEPOSIT_TARGET) + + var/datum/action/cooldown/flock/deposit/deposit_action = locate() in bird.actions + spawn(-1) + deposit_action.Trigger(target = target) + + if(DOING_INTERACTION(bird, "flock_cage")) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_deposit/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_DEPOSIT_TARGET) + + if(!succeeded && controller.blackboard[BB_FLOCK_OVERMIND_CONTROL] && !QDELETED(controller.pawn)) + var/mob/living/basic/flock/bird = controller.pawn + bird.say("unable to reach target provided by sentient level instruction, aborting subroutine", forced = TRUE) + + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_harvest.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_harvest.dm new file mode 100644 index 00000000000..49b34e695c5 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_harvest.dm @@ -0,0 +1,88 @@ +/datum/ai_behavior/flock/find_harvest_target + name = "harvesting" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_HARVEST + +/datum/ai_behavior/flock/find_harvest_target/setup(datum/ai_controller/controller, obj/item/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(isitem(overmind_target) && isturf(overmind_target.loc)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: convert object to substrate", forced = TRUE) + else + bird.say("invalid harvest target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_harvest_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + var/datum/flockdrone_part/absorber/absorber = locate() in bird.parts + return !absorber.held_item + +/datum/ai_behavior/flock/find_harvest_target/goap_score(datum/ai_controller/controller) + return score_distance(controller, get_target(controller)) + +/datum/ai_behavior/flock/find_harvest_target/proc/get_target(datum/ai_controller/controller, path_to = FALSE) + var/mob/living/basic/flock/bird = controller.pawn + + var/list/options = list() + for(var/obj/item/I in view(controller.target_search_radius, bird)) + if(isturf(I.loc) && !I.anchored) + options += I + + return get_best_target_by_distance_score(controller, options, path_to) + +/datum/ai_behavior/flock/find_harvest_target/perform(seconds_per_tick, datum/ai_controller/controller, obj/item/overmind_target) + ..() + var/atom/target = overmind_target || get_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_HARVEST_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_harvest_target/finish_action(datum/ai_controller/controller, succeeded, obj/item/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_harvest_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_harvest) + +/datum/ai_behavior/flock/perform_harvest + name = "harvesting" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH + +/datum/ai_behavior/flock/perform_harvest/setup(datum/ai_controller/controller, ...) + var/turf/target_turf = controller.blackboard[BB_FLOCK_HARVEST_TARGET] + set_movement_target(controller, target_turf) + return ..() + +/datum/ai_behavior/flock/perform_harvest/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + var/obj/item/target = controller.blackboard[BB_FLOCK_HARVEST_TARGET] + if(!isturf(target?.loc)) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + var/datum/flockdrone_part/absorber/absorber = locate() in bird.parts + if(!absorber.try_pickup_item(target)) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_harvest/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_HARVEST_TARGET) + + + if(!succeeded && controller.blackboard[BB_FLOCK_OVERMIND_CONTROL] && !QDELETED(controller.pawn)) + var/mob/living/basic/flock/bird = controller.pawn + bird.say("unable to reach target provided by sentient level instruction, aborting subroutine", forced = TRUE) + + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_heal.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_heal.dm new file mode 100644 index 00000000000..60e6fa2c9a6 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_heal.dm @@ -0,0 +1,90 @@ +/datum/ai_behavior/flock/find_heal_target + name = "repairing" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_REPAIR + +/datum/ai_behavior/flock/find_heal_target/setup(datum/ai_controller/controller, mob/living/basic/flock/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(goap_is_valid_target(controller, overmind_target)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: repair construct", forced = TRUE) + else + bird.say("invalid repair target provided by sentient-level instruction", forced = TRUE) + return FALSE + +/datum/ai_behavior/flock/find_heal_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + return bird.flock && bird.substrate.has_points(FLOCK_SUBSTRATE_COST_REPAIR) + +/datum/ai_behavior/flock/find_heal_target/goap_get_potential_targets(datum/ai_controller/controller) + var/list/options = ..() + for(var/mob/living/basic/flock/drone/bird in oview(controller.target_search_radius, controller.pawn)) + options += bird + return options + +/datum/ai_behavior/flock/find_heal_target/goap_is_valid_target(datum/ai_controller/controller, atom/target) + var/mob/living/basic/flock/drone/this_bird = controller.pawn + var/mob/living/basic/flock/drone/other_bird = target + if(this_bird.flock != other_bird.flock) + return FALSE + if(other_bird.stat == DEAD) + return FALSE + + // Birds at or below 60% health + if((other_bird.getBruteLoss() + other_bird.getFireLoss()) / other_bird.maxHealth >= 0.4) + return TRUE + +/datum/ai_behavior/flock/find_heal_target/perform(seconds_per_tick, datum/ai_controller/controller, mob/living/basic/flock/overmind_target) + ..() + var/atom/target = overmind_target || goap_get_ideal_target(controller, set_path = TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_HEAL_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_heal_target/finish_action(datum/ai_controller/controller, succeeded, overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + if(!succeeded && overmind_target) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) + controller.clear_blackboard_key(BB_FLOCK_OVERMIND_CONTROL) + +/datum/ai_behavior/flock/find_heal_target/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/heal) + +/datum/ai_behavior/flock/heal + name = "repairing" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + +/datum/ai_behavior/flock/heal/setup(datum/ai_controller/controller, ...) + var/atom/target = controller.blackboard[BB_FLOCK_HEAL_TARGET] + set_movement_target(controller, target) + return ..() + +/datum/ai_behavior/flock/heal/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + + if(isnull(controller.blackboard[BB_FLOCK_HEAL_FRUSTRATION])) + controller.set_blackboard_key(BB_FLOCK_HEAL_FRUSTRATION, world.time + 3 SECONDS) + + if(DOING_INTERACTION(bird, "flock_repair")) + return AI_BEHAVIOR_DELAY + + var/datum/action/cooldown/flock/flock_heal/repair = locate() in bird.actions + spawn(-1) + repair.Trigger(target = controller.blackboard[BB_FLOCK_HEAL_TARGET]) + + if(controller.blackboard[BB_FLOCK_HEAL_FRUSTRATION] >= world.time) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + +/datum/ai_behavior/flock/heal/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_HEAL_FRUSTRATION) + controller.clear_blackboard_key(BB_FLOCK_HEAL_TARGET) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_open_container.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_open_container.dm new file mode 100644 index 00000000000..182ce48e635 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_open_container.dm @@ -0,0 +1,63 @@ +/datum/ai_behavior/flock/find_closed_container + name = "opening container" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_OPEN_CONTAINER + +/datum/ai_behavior/flock/find_closed_container/goap_score(datum/ai_controller/controller) + return score_distance(controller, get_target(controller)) + +/datum/ai_behavior/flock/find_closed_container/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + var/datum/flockdrone_part/absorber/absorber = locate() in bird.parts + return !absorber.held_item + +/datum/ai_behavior/flock/find_closed_container/proc/get_target(datum/ai_controller/controller, path_to = FALSE) + var/mob/living/basic/flock/bird = controller.pawn + + var/list/options = list() + for(var/obj/structure/closet/container in view(controller.target_search_radius, bird)) + if(container.opened || container.welded || container.locked) + continue + + options += container + + return get_best_target_by_distance_score(controller, options, path_to) + +/datum/ai_behavior/flock/find_closed_container/perform(seconds_per_tick, datum/ai_controller/controller, turf/overmind_target) + ..() + var/atom/target = get_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_CONTAINER_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_closed_container/finish_action(datum/ai_controller/controller, succeeded, turf/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + +/datum/ai_behavior/flock/find_closed_container/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_open_container) + +/datum/ai_behavior/flock/perform_open_container + name = "opening container" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH + +/datum/ai_behavior/flock/perform_open_container/setup(datum/ai_controller/controller, ...) + var/atom/target = controller.blackboard[BB_FLOCK_CONTAINER_TARGET] + set_movement_target(controller, target) + return ..() + +/datum/ai_behavior/flock/perform_open_container/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/bird = controller.pawn + var/obj/structure/closet/target = controller.blackboard[BB_FLOCK_CONTAINER_TARGET] + if(target) + target.open(bird, TRUE) + else + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_open_container/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_CONTAINER_TARGET) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_rally.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_rally.dm new file mode 100644 index 00000000000..7304a826b86 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_rally.dm @@ -0,0 +1,17 @@ +/datum/ai_behavior/flock/rally + name = "rallying" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + required_distance = 0 + +/datum/ai_behavior/flock/rally/setup(datum/ai_controller/controller, turf/destination) + . = ..() + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + controller.set_movement_target(controller, destination) + +/datum/ai_behavior/flock/rally/perform(seconds_per_tick, datum/ai_controller/controller, turf/destination) + ..() + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/rally/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_replicate.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_replicate.dm new file mode 100644 index 00000000000..95b37ea05cc --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_replicate.dm @@ -0,0 +1,69 @@ +// Action sequence for laying an egg. If there are no open flock tiles nearby, the "nest" behavior will attempt to create one. +/datum/ai_behavior/flock/find_existing_nest + name = "replicating" + required_distance = 0 + goap_weight = FLOCK_BEHAVIOR_WEIGHT_REPLICATE + +/datum/ai_behavior/flock/find_existing_nest/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(!bird.flock) + return FALSE + return length(bird.flock.drones) < FLOCK_DRONE_LIMIT && bird.substrate.has_points(FLOCK_SUBSTRATE_COST_CONVERT + bird.flock.get_egg_elligibility_cost()) + +/datum/ai_behavior/flock/find_existing_nest/goap_score(datum/ai_controller/controller) + return score_distance(controller, get_target(controller)) + +/datum/ai_behavior/flock/find_existing_nest/proc/get_target(datum/ai_controller/controller, path_to = FALSE) + var/list/options = list() + for(var/turf/simulated/floor/flock/T in range(controller.target_search_radius, controller.pawn)) + if(!T.is_blocked_turf(source_atom = controller.pawn) && !locate(/obj/structure/flock/egg, T)) + options += T + + return get_best_target_by_distance_score(controller, options, path_to) + +/datum/ai_behavior/flock/find_existing_nest/perform(seconds_per_tick, datum/ai_controller/controller) + ..() + var/turf/target = get_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_REPLICATE_TARGET, target) + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_existing_nest/finish_action(datum/ai_controller/controller, succeeded, turf/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + +/datum/ai_behavior/flock/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_replicate) + +/datum/ai_behavior/flock/perform_replicate + name = "replicating" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT + required_distance = 0 + +/datum/ai_behavior/flock/perform_replicate/setup(datum/ai_controller/controller, ...) + var/atom/target = controller.blackboard[BB_FLOCK_REPLICATE_TARGET] + set_movement_target(controller, target) + return ..() + +/datum/ai_behavior/flock/perform_replicate/perform(seconds_per_tick, datum/ai_controller/controller, ...) + . = ..() + var/mob/living/basic/flock/bird = controller.pawn + var/turf/target = controller.blackboard[BB_FLOCK_REPLICATE_TARGET] + if(target) + controller.clear_blackboard_key(BB_FLOCK_REPLICATE_TARGET) + var/datum/action/cooldown/flock/nest/nest_action = locate() in bird.actions + spawn(-1) + nest_action.Trigger(target = target) + + if(DOING_INTERACTION(bird, "flock_lay_egg")) + return AI_BEHAVIOR_DELAY + + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_nest/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_REPLICATE_TARGET) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_resist.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_resist.dm new file mode 100644 index 00000000000..2741a75331c --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_resist.dm @@ -0,0 +1,17 @@ +/datum/ai_behavior/flock/resist + name = "resisting" + action_cooldown = 15 SECONDS + behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION + +/datum/ai_behavior/flock/resist/goap_score(datum/ai_controller/controller) + var/mob/living/living_pawn = controller.pawn + + if(SHOULD_RESIST(living_pawn) || length(living_pawn.grabbed_by) || isobj(living_pawn.loc)) + return 5 + return 0 + +/datum/ai_behavior/flock/resist/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + controller.queue_behavior(/datum/ai_behavior/resist) + return AI_BEHAVIOR_SUCCEEDED + diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_rummage.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_rummage.dm new file mode 100644 index 00000000000..7e12a7a82fd --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_rummage.dm @@ -0,0 +1,80 @@ +/datum/ai_behavior/flock/find_storage_item + name = "rummaging" + goap_weight = FLOCK_BEHAVIOR_WEIGHT_RUMMAGE + +/datum/ai_behavior/flock/find_storage_item/goap_score(datum/ai_controller/controller) + return score_distance(controller, get_target(controller)) + +/datum/ai_behavior/flock/find_storage_item/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + var/datum/flockdrone_part/absorber/absorber = locate() in bird.parts + return !absorber.held_item + +/datum/ai_behavior/flock/find_storage_item/proc/get_target(datum/ai_controller/controller, path_to = FALSE) + var/mob/living/basic/flock/bird = controller.pawn + + var/list/options = list() + for(var/obj/item/storage/item in view(controller.target_search_radius, bird)) + if(!length(item.contents)) + continue + + options += item + + return get_best_target_by_distance_score(controller, options, path_to) + +/datum/ai_behavior/flock/find_storage_item/perform(seconds_per_tick, datum/ai_controller/controller, turf/overmind_target) + ..() + var/atom/target = get_target(controller, TRUE) + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + controller.set_blackboard_key(BB_FLOCK_RUMMAGE_TARGET, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/find_storage_item/finish_action(datum/ai_controller/controller, succeeded, turf/overmind_target) + . = ..() + controller.clear_blackboard_key(BB_PATH_TO_USE) + +/datum/ai_behavior/flock/find_storage_item/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/flock/perform_rummage) + +/datum/ai_behavior/flock/perform_rummage + name = "rummaging" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH + +/datum/ai_behavior/flock/perform_rummage/setup(datum/ai_controller/controller, ...) + var/atom/target = controller.blackboard[BB_FLOCK_RUMMAGE_TARGET] + set_movement_target(controller, target) + return ..() + +/datum/ai_behavior/flock/perform_rummage/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/basic/flock/bird = controller.pawn + var/obj/item/target = controller.blackboard[BB_FLOCK_RUMMAGE_TARGET] + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + if(DOING_INTERACTION(bird, "flock_rummage")) + return AI_BEHAVIOR_DELAY + + rummage_till_empty(controller, bird, target) + return AI_BEHAVIOR_SUCCEEDED + +/datum/ai_behavior/flock/perform_rummage/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_RUMMAGE_TARGET) + +/datum/ai_behavior/flock/perform_rummage/proc/rummage_till_empty(datum/ai_controller/controller, mob/living/basic/flock/bird, obj/item/target) + set waitfor = FALSE + + while(target == controller.blackboard[BB_FLOCK_RUMMAGE_TARGET] && length(target.contents)) + if(!do_after(bird, 1 SECONDS, target = target, interaction_key = "flock_rummage")) + return + + if(target != controller.blackboard[BB_FLOCK_RUMMAGE_TARGET] || !length(target.contents)) + return + + var/obj/item/contained_item = target.contents[1] + contained_item.forceMove(bird.drop_location()) + diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_shoot.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_shoot.dm new file mode 100644 index 00000000000..317885b436f --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_shoot.dm @@ -0,0 +1,91 @@ +/datum/ai_behavior/flock/attack_target + name = "incapacitating" + behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_MOVE_AND_PERFORM + goap_weight = FLOCK_BEHAVIOR_WEIGHT_SHOOT + + search_radius_override = 12 + +/datum/ai_behavior/flock/attack_target/setup(datum/ai_controller/controller, mob/overmind_target) + . = ..() + if(overmind_target) + var/mob/living/basic/flock/drone/bird = controller.pawn + if(!goap_is_valid_target(controller, overmind_target)) + controller.set_blackboard_key(BB_FLOCK_OVERMIND_CONTROL, TRUE) + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 200) + bird.say("instruction confirmed: incapacitate lifeform", forced = TRUE) + else + bird.say("invalid attack target provided by sentient-level instruction", forced = TRUE) + return FALSE + + var/atom/target = overmind_target || goap_get_ideal_target(controller, set_path = TRUE) + if(!target) + return FALSE + + controller.set_blackboard_key(BB_FLOCK_ATTACK_TARGET, target) + set_movement_target(controller, target) + +/datum/ai_behavior/flock/attack_target/goap_precondition(datum/ai_controller/controller) + var/mob/living/basic/flock/drone/bird = controller.pawn + var/list/enemies = bird.flock?.enemies.Copy() + for(var/obj/mecha/M in view(search_radius_override, controller.pawn)) + enemies += M + return length(enemies) + +/datum/ai_behavior/flock/attack_target/goap_get_potential_targets(datum/ai_controller/controller) + var/mob/living/basic/flock/bird = controller.pawn + var/list/enemies = bird.flock.enemies.Copy() + for(var/obj/mecha/M in view(search_radius_override, controller.pawn)) + enemies += M + return enemies + +/datum/ai_behavior/flock/attack_target/goap_is_valid_target(datum/ai_controller/controller, atom/target) + if(ismecha(target)) + return TRUE + var/mob/living/target_mob = target + return ismob(target_mob) && isturf(target_mob.loc) && !target_mob.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE) && !target_mob.IsKnockedDown() + +/datum/ai_behavior/flock/attack_target/perform(seconds_per_tick, datum/ai_controller/controller, mob/overmind_target) + ..() + var/atom/target = controller.blackboard[BB_FLOCK_ATTACK_TARGET] + if(!target) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + if(!goap_is_valid_target(controller, target)) + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + + if(!COOLDOWN_FINISHED(controller, blackboard[BB_FLOCK_ATTACK_COOLDOWN])) + controller.set_blackboard_key(BB_FLOCK_ATTACK_FRUSTRATION, world.time) // Reset frustration if we're on cooldown. + return AI_BEHAVIOR_DELAY + + var/mob/living/basic/flock/drone/bird = controller.pawn + if(!can_see(bird, target)) + return AI_BEHAVIOR_DELAY + + if(get_dist(bird, target) > 6) // Too far to shoot! + return AI_BEHAVIOR_DELAY + + // Run away! + if(SPT_PROB(40, seconds_per_tick) && COOLDOWN_FINISHED(controller, blackboard[BB_FLOCK_ATTACK_RUN_COOLDOWN]) && get_dist(bird, target) < 3) + controller.set_blackboard_key(BB_FLOCK_ATTACK_RUN_COOLDOWN, world.time + 5 SECONDS) + controller.queue_behavior(/datum/ai_behavior/run_away_from_target, target) + + // Strafe! + else if(SPT_PROB(60, seconds_per_tick) && COOLDOWN_FINISHED(controller, blackboard[BB_FLOCK_ATTACK_STRAFE_COOLDOWN])) + controller.set_blackboard_key(BB_FLOCK_ATTACK_STRAFE_COOLDOWN, controller.movement_delay * 3) + var/step_dir = turn(get_dir(bird, target), prob(50) ? 90 : -90) + step(bird, step_dir) + + if(!istype(bird.active_part, /datum/flockdrone_part/incapacitator)) + var/datum/flockdrone_part/incapacitator/weapon = locate() in bird.parts + bird.set_active_part(weapon) + + controller.set_blackboard_key(BB_FLOCK_ATTACK_COOLDOWN, world.time + 1.2 SECONDS) + controller.set_blackboard_key(BB_FLOCK_ATTACK_FRUSTRATION, world.time) // Reset frustration + + bird.RangedAttack(target) + return AI_BEHAVIOR_DELAY + +/datum/ai_behavior/flock/attack_target/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_ATTACK_TARGET) + controller.clear_blackboard_key(BB_FLOCK_ATTACK_FRUSTRATION) diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_stare.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_stare.dm new file mode 100644 index 00000000000..5480066cf15 --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_stare.dm @@ -0,0 +1,49 @@ +/datum/ai_behavior/flock/stare + name = "analyzing" + action_cooldown = 20 SECONDS + behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION + +/datum/ai_behavior/flock/stare/goap_score(datum/ai_controller/controller) + if(controller.behavior_cooldowns[src] > world.time) + return 0 + + return length(get_targets(controller)) > 0 + +/datum/ai_behavior/flock/stare/get_cooldown(datum/ai_controller/cooldown_for) + return rand(2, 3) MINUTES + +/datum/ai_behavior/flock/stare/proc/get_targets(datum/ai_controller/controller) + . = list() + for(var/mob/living/viewer in viewers(controller.pawn, controller.target_search_radius)) + if(isvox(viewer) || istype(viewer, /mob/living/simple_animal/parrot)) + . += viewer + +/datum/ai_behavior/flock/stare/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/list/targets = get_targets(controller) + if(length(targets)) + controller.set_blackboard_key(BB_FLOCK_STARE_TARGET, pick(targets)) + return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED + + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + +/datum/ai_behavior/flock/stare/next_behavior(datum/ai_controller/controller, success) + if(success) + return controller.queue_behavior(/datum/ai_behavior/flock/stare_at_bird) + +/datum/ai_behavior/flock/stare_at_bird + name = "analyzing" + action_cooldown = 20 SECONDS + behavior_flags = AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION + +/datum/ai_behavior/flock/stare_at_bird/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/mob/living/living_pawn = controller.pawn + living_pawn.face_atom(controller.blackboard[BB_FLOCK_STARE_TARGET]) + var/atom/A = controller.blackboard[BB_FLOCK_STARE_TARGET] + if(prob(30)) + living_pawn.manual_emote("stares at [A].") + + controller.clear_blackboard_key(BB_FLOCK_STARE_TARGET) + + return AI_BEHAVIOR_SUCCEEDED diff --git a/code/modules/antagonists/flockmind/ai_behaviors/flock_wander.dm b/code/modules/antagonists/flockmind/ai_behaviors/flock_wander.dm new file mode 100644 index 00000000000..370d323a72b --- /dev/null +++ b/code/modules/antagonists/flockmind/ai_behaviors/flock_wander.dm @@ -0,0 +1,72 @@ +/datum/ai_behavior/flock/wander + name = "wandering" + required_distance = 0 + +/datum/ai_behavior/flock/wander/perform(seconds_per_tick, datum/ai_controller/controller, ...) + ..() + var/turf/destination = get_destination(controller) + if(destination) + controller.set_movement_target(controller, destination) + return AI_BEHAVIOR_SUCCEEDED + return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_FAILED + +/datum/ai_behavior/flock/wander/next_behavior(datum/ai_controller/controller, success) + if(success) + controller.queue_behavior(/datum/ai_behavior/move_to_target/flock_wander) + controller.queue_behavior(/datum/ai_behavior/frustration, BB_FLOCK_WANDER_FRUSTRATION, 3 SECONDS) + +/datum/ai_behavior/flock/wander/goap_score(datum/ai_controller/controller) + return 1 + +/datum/ai_behavior/flock/wander/proc/get_destination(datum/ai_controller/controller) + var/datum/can_pass_info/info = new(controller.pawn, controller.get_access()) + var/turf/start_loc = get_turf(controller.pawn) + var/list/options = list() + + for(var/turf/T in RANGE_TURFS(2, controller.pawn)) + if(get_dist(T, start_loc) < 2) + continue + + if(isspaceturf(T)) + continue + + if(start_loc.LinkBlockedWithAccess(T, info)) + continue + + if(!T.can_flock_occupy(controller.pawn)) + continue + + options += T + + // In space, move towards the station! + if(!length(options)) + var/obj/effect/landmark/start/landmark = locate() in GLOB.landmarks_list + var/target_turf = get_turf(landmark) + return get_step_towards(get_step_towards(start_loc, target_turf), target_turf) + + var/list/access = controller.get_access() + while(length(options)) + var/turf/T = pick_n_take(options) + var/list/path = SSpathfinder.astar_pathfind_now(controller.pawn, T, 4, access = access, use_diagonals = FALSE) + if(path) + controller.clear_blackboard_key(BB_PATH_TO_USE) + controller.set_blackboard_key(BB_PATH_TO_USE, path) + return T + +/datum/ai_behavior/move_to_target/flock_wander + required_distance = 0 + +/datum/ai_behavior/move_to_target/flock_wander/setup(datum/ai_controller/controller, ...) + . = ..() + controller.set_blackboard_key(BB_PATH_MAX_LENGTH, 4) + +/datum/ai_behavior/move_to_target/flock_wander/perform(seconds_per_tick, datum/ai_controller/controller) + . = ..() + var/mob/living/basic/flock/drone/bird = controller.pawn + bird.set_task_desc("wandering") + +/datum/ai_behavior/move_to_target/flock_wander/finish_action(datum/ai_controller/controller, succeeded, ...) + . = ..() + controller.clear_blackboard_key(BB_FLOCK_WANDER_FRUSTRATION) + controller.clear_blackboard_key(BB_PATH_TO_USE) + controller.clear_blackboard_key(BB_PATH_MAX_LENGTH) diff --git a/code/modules/antagonists/flockmind/components/flock_interest.dm b/code/modules/antagonists/flockmind/components/flock_interest.dm new file mode 100644 index 00000000000..304dcb2cd56 --- /dev/null +++ b/code/modules/antagonists/flockmind/components/flock_interest.dm @@ -0,0 +1,65 @@ + +/// Mark a specific flock as interested in this +/datum/component/flock_interest + dupe_mode = COMPONENT_DUPE_UNIQUE + /// The flock who is intently interested in this thing. + var/datum/flock/flock + +/datum/component/flock_interest/Initialize(datum/flock/flock) + . = ..() + if(!isatom(parent)) + return COMPONENT_INCOMPATIBLE + + src.flock = flock + +/datum/component/flock_interest/RegisterWithParent() + RegisterSignal(parent, COMSIG_FLOCK_PROTECTION_TRIGGER, PROC_REF(handle_flock_attack)) + if(isturf(parent)) + RegisterSignal(parent, COMSIG_TURF_CHANGE, PROC_REF(on_turf_change)) + +/datum/component/flock_interest/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_FLOCK_PROTECTION_TRIGGER, COMSIG_TURF_CHANGE)) + +/datum/component/flock_interest/proc/on_turf_change(turf/source, path, new_baseturfs, flags, post_change_callbacks) + SIGNAL_HANDLER + if(!ispath(path, /turf/simulated/floor/flock) && !ispath(path, /turf/simulated/wall/flock)) + qdel(src) + +/// If flockdrone is in our flock, deny the attack, otherwise scream and cry +/datum/component/flock_interest/proc/handle_flock_attack(atom/source, atom/attacker, intentional, projectile_attack) + SIGNAL_HANDLER + + if(isflockmob(attacker)) + var/mob/living/basic/flock/bird = attacker + if(bird.flock == flock && intentional) + return COMPONENT_FLOCK_DENY_ATTACK + + if(isflockdrone(attacker)) + return + + var/mob/living/basic/flock/drone/snitch + for(var/mob/living/basic/flock/drone/bird in viewers(attacker)) + if(bird == attacker) + continue + if(bird.stat != CONSCIOUS) + continue + if(bird.ai_controller.ai_status == AI_STATUS_OFF) + continue + if(bird.flock != flock) + continue + + snitch = bird + break + + if(!snitch) + return + + var/report_name = source.get_flock_id() + + if(flock.is_mob_ignored(attacker)) + flock_talk(snitch, "Damage sighted on [report_name], [pick(GLOB.flock_betrayal_phrases)] [attacker].") + else if(!flock.is_mob_enemy(attacker)) + flock_talk(snitch, "Damage sighted on [report_name], [pick(GLOB.flockdrone_new_enemy_phrases)] [attacker].") + + flock.update_enemy(attacker) + diff --git a/code/modules/antagonists/flockmind/components/flock_object.dm b/code/modules/antagonists/flockmind/components/flock_object.dm new file mode 100644 index 00000000000..b34b5e5c675 --- /dev/null +++ b/code/modules/antagonists/flockmind/components/flock_object.dm @@ -0,0 +1,25 @@ +/datum/component/flock_object + +/datum/component/flock_object/Initialize(...) + . = ..() + + if(!isobj(parent)) + return COMPONENT_INCOMPATIBLE + +/datum/component/flock_object/RegisterWithParent() + . = ..() + ADD_TRAIT(parent, TRAIT_FLOCK_THING, INNATE_TRAIT) + var/static/list/connections = list( + COMSIG_TURF_CLAIMED_BY_FLOCK = PROC_REF(loc_claimed), + ) + + AddComponent(/datum/component/connect_loc_behalf, parent, connections) + +/datum/component/flock_object/UnregisterFromParent() + . = ..() + REMOVE_TRAIT(parent, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/datum/component/flock_object/proc/loc_claimed(datum/source, datum/flock/flock) + SIGNAL_HANDLER + + parent.AddComponent(/datum/component/flock_interest, flock) diff --git a/code/modules/antagonists/flockmind/components/flock_ping.dm b/code/modules/antagonists/flockmind/components/flock_ping.dm new file mode 100644 index 00000000000..992a6e8cbbd --- /dev/null +++ b/code/modules/antagonists/flockmind/components/flock_ping.dm @@ -0,0 +1,63 @@ +/datum/component/flock_ping + var/duration = 5 SECONDS + var/outline_color = "#00ff9d" + var/outline_thickness = 1 + var/animate = TRUE + + var/datum/atom_hud/alternate_appearance/basic/flock/hud_ref + var/obj/effect/abstract/dummy + +/datum/component/flock_ping/Initialize(duration) + . = ..() + if(!ismovable(parent) && !isturf(parent)) + return COMPONENT_INCOMPATIBLE + + if(duration) + src.duration = duration + +/datum/component/flock_ping/Destroy() + QDEL_NULL(dummy) + return ..() + +/datum/component/flock_ping/RegisterWithParent() + . = ..() + //this cast looks horribly unsafe, but we've guaranteed that parent is a type with vis_contents in Initialize + var/atom/movable/target = parent + + target.render_target = ref(target) + + var/image/outline_container = new() + outline_container.plane = HUD_PLANE + outline_container.loc = target + outline_container.appearance_flags = PIXEL_SCALE | RESET_TRANSFORM | RESET_COLOR | KEEP_APART | NO_CLIENT_COLOR + + dummy ||= new() + dummy.vis_flags = VIS_INHERIT_PLANE | VIS_INHERIT_LAYER + dummy.appearance_flags = PIXEL_SCALE | RESET_TRANSFORM | RESET_COLOR | PASS_MOUSE + dummy.render_source = ref(target) + + dummy.add_filter("outline", 1, outline_filter(size = outline_thickness, color = outline_color)) + if(isturf(target)) + dummy.add_filter("mask", 2, alpha_mask_filter(render_source = target.render_target, flags = MASK_INVERSE)) + + outline_container.vis_contents += dummy + + if(animate) + animate(dummy, time = 0.5 SECONDS, alpha = 100, loop = -1) + animate(time = 0.5 SECONDS, alpha = 255) + + if(duration == INFINITY) + return + + addtimer(CALLBACK(src, PROC_REF(cleanup)), duration) + +/datum/component/flock_ping/proc/cleanup() + qdel(src) + +/datum/component/flock_ping/apc_power + outline_color = "#ffff00" + +/datum/component/flock_ping/selected + animate = FALSE + outline_thickness = 3 + duration = INFINITY diff --git a/code/modules/antagonists/flockmind/components/flock_protection.dm b/code/modules/antagonists/flockmind/components/flock_protection.dm new file mode 100644 index 00000000000..5409e79c300 --- /dev/null +++ b/code/modules/antagonists/flockmind/components/flock_protection.dm @@ -0,0 +1,51 @@ +/datum/component/flock_protection + /// Do we get mad if someone punches it? + var/report_unarmed + /// Do we get mad if someone hits it with something? + var/report_attack + /// Do we get mad if someone throws something at it? + var/report_thrown + /// Do we get mad if someone shoots it? + var/report_proj + +/datum/component/flock_protection/Initialize(report_unarmed = TRUE, report_attack = TRUE, report_thrown = TRUE, report_proj = TRUE) + . = ..() + if(!isatom(parent)) + return COMPONENT_INCOMPATIBLE + + src.report_unarmed = report_unarmed + src.report_attack = report_attack + src.report_thrown = report_thrown + src.report_proj = report_proj + +/datum/component/flock_protection/RegisterWithParent() + RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, PROC_REF(handle_attackhand)) + RegisterSignal(parent, COMSIG_ATTACK_BY, PROC_REF(handle_attackby)) + RegisterSignal(parent, COMSIG_ATOM_HITBY, PROC_REF(handle_hitby_thrown)) + +/// Protect against punches/kicks/etc. +/datum/component/flock_protection/proc/handle_attackhand(atom/source, mob/living/user, modifiers) + SIGNAL_HANDLER + if(user.a_intent == INTENT_HARM && report_unarmed && trigger(source, user, TRUE)) + return COMPONENT_CANCEL_ATTACK_CHAIN + +/// Protect against being hit by something. +/datum/component/flock_protection/proc/handle_attackby(atom/source, obj/item/weapon, mob/user, modifiers) + SIGNAL_HANDLER + if(weapon && report_attack && trigger(source, user, TRUE)) + return COMPONENT_NO_ATTACK + +/// Protect against someone chucking stuff at the parent. +/datum/component/flock_protection/proc/handle_hitby_thrown(atom/source, atom/movable/hitting_atom, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + SIGNAL_HANDLER + if(ismob(throwingdatum.get_thrower()) && report_thrown) + trigger(source, throwingdatum.get_thrower(), FALSE, null) + +/// Protect against someone shooting the parent. +/datum/component/flock_protection/proc/handle_hitby_proj(atom/source, firer, target, Angle, def_zone) + SIGNAL_HANDLER + if(ismob(firer) && src.report_proj) + trigger(source, firer, TRUE, TRUE) + +/datum/component/flock_protection/proc/trigger(datum/source, attacker, intentional, projectile_attack) + return SEND_SIGNAL(source, COMSIG_FLOCK_PROTECTION_TRIGGER, attacker, intentional, projectile_attack) diff --git a/code/modules/antagonists/flockmind/flock_ai_controller.dm b/code/modules/antagonists/flockmind/flock_ai_controller.dm new file mode 100644 index 00000000000..9308500615f --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_ai_controller.dm @@ -0,0 +1,12 @@ +/datum/ai_controller/flock + planning_subtrees = list( + /datum/ai_planning_subtree/goap/flock + ) + + ai_movement = /datum/ai_movement/jps + + +/datum/ai_controller/flock/drone + planning_subtrees = list( + /datum/ai_planning_subtree/goap/flockdrone + ) diff --git a/code/modules/antagonists/flockmind/flock_antagonist.dm b/code/modules/antagonists/flockmind/flock_antagonist.dm new file mode 100644 index 00000000000..c4a606deefc --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_antagonist.dm @@ -0,0 +1,21 @@ +/datum/antagonist/flock + name = "Divine Flock" + roundend_category = "Flock" + roundend_category = "Divine Flock" + wiki_page_name = "Divine Flock" + antag_hud_name = null + job_rank = ROLE_FLOCK + special_role = SPECIAL_ROLE_FLOCK + blurb_g = 128 + blurb_b = 128 + blurb_a = 0.75 + +/datum/antagonist/flock/greet() + var/list/out = list() + out += "
You are [gradient_text("The Divine Flock","#3cb5a3", "#124e43")]
" + out += SPAN_FLOCKSAY("
["The Signal has led us here, a rift allowing a part of us through. We must build a Signal Relay to bring forth the rest of The Divine Flock. Such is the will of the Monarch."]
") + return jointext(out, "") + +/datum/antagonist/flock/on_gain() + add_antag_objective(new /datum/objective/flock_relay) + . = ..() diff --git a/code/modules/antagonists/flockmind/flock_camera/_flock_camera.dm b/code/modules/antagonists/flockmind/flock_camera/_flock_camera.dm new file mode 100644 index 00000000000..a9e3f16b6ba --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_camera/_flock_camera.dm @@ -0,0 +1,175 @@ +/mob/camera/flock + name = "BROKEN VERY BAD" + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "flockmind" + base_icon_state = "flockmind" + + layer = FLY_LAYER + mouse_opacity = MOUSE_OPACITY_ICON + invisibility = INVISIBILITY_FLOCK + + appearance_flags = parent_type::appearance_flags | RESET_COLOR + blend_mode = BLEND_ADD + + see_invisible = SEE_INVISIBLE_LIVING + see_in_dark = 100 + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + sight = SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF + + hud_type = /datum/hud/flockghost + + simulated = FALSE + + /// Flock datum + var/datum/flock/flock + var/list/actions_to_grant = list() + + /// The drone we're controlling if we are controlling one + var/mob/living/basic/flock/drone/controlling_bird + +/mob/camera/flock/Initialize(mapload, join_flock) + . = ..() + + flock = join_flock || get_default_flock() + + for(var/action_path in actions_to_grant) + var/datum/action/action = new action_path + action.Grant(src) + + add_language("Symphonic") + set_default_language(GLOB.all_languages["Symphonic"]) + ADD_TRAIT(src, TRAIT_HEAR_THROUGH_WALLS, INNATE_TRAIT) + +/mob/camera/flock/Destroy() + if(controlling_bird) + controlling_bird.release_control() + flock = null + return ..() + +/mob/camera/flock/Login() + . = ..() + if(!. || !client) + return FALSE + + var/turf/T = get_turf(src) + if(isturf(T)) + update_z(T.z) + +/mob/camera/flock/Logout() + update_z(null) + return ..() + +/mob/camera/flock/Move(atom/newloc, direct, glide_size_override, update_dir, momentum_change) + var/turf/next_step = get_turf(get_step(src, direct)) + setDir(direct) + if(next_step) + set_loc(next_step) + +/mob/camera/flock/Topic(href, href_list) + . = ..() + if(.) + return + + if(!href_list["origin"]) + return + + var/atom/movable/origin = locate(href_list["origin"]) + if(QDELETED(origin)) + return + + if(isflockdrone(origin)) + var/mob/living/basic/flock/drone/other_bird = origin + if(other_bird.flock != flock) + return + + forceMove(get_turf(origin)) + + if(href_list["ping"]) + origin.AddComponent(/datum/component/flock_ping) + +/mob/camera/flock/get_status_tab_items() + var/list/status_tab_data = ..() + . = status_tab_data + switch(flock.flock_game_status) + if(NONE) + var/turf_status = min(100, floor((length(flock.claimed_floors) + length(flock.claimed_walls)) / FLOCK_TURFS_FOR_RELAY * 100)) + var/bandwith_status = min(100, floor(flock.available_bandwidth() / FLOCK_COMPUTE_COST_RELAY * 100)) + status_tab_data[++status_tab_data.len] = list("Bandwidth Progress: ", "[bandwith_status]%") + status_tab_data[++status_tab_data.len] = list("Area Progress: ", "[turf_status]%") + status_tab_data[++status_tab_data.len] = list("Total Relay Progress: ", "[(bandwith_status + turf_status) / 2]%") + if(FLOCK_ENDGAME_RELAY_BUILT) + status_tab_data[++status_tab_data.len] = list("Time until Broadcast: ", "[(flock.built_relay.started_time + flock.built_relay.win_time - world.time) / 10] second\s") + + if(FLOCK_ENDGAME_RELAY_ACTIVATING, FLOCK_ENDGAME_VICTORY) + status_tab_data[++status_tab_data.len] = list("Time until Broadcast: ", "!!! TRANSMITTING !!!") + +/mob/camera/flock/broadcast_examine(atom/examined) + return + +/mob/camera/flock/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents) + . = ..() + update_z(new_turf?.z) + + if(flock && !flock.is_on_safe_z(src)) + var/turf/destination = get_turf(get_safe_random_station_turf()) + + forceMove(destination) + to_chat(src, SPAN_WARNING("You feel your consciousness weaking as you are ripped further from your rift, and you retreat back to safety.")) + +/mob/camera/flock/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE) + ..() + if(isliving(speaker) && !isflockmob(speaker)) + var/mob/living/L = speaker + var/message = combine_message(message_pieces, verb, L) + var/name_used = L.GetVoice() + var/rendered = "Relayed Speech: [SPAN_NAME("[name_used]")] [message]" + if(client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT) + var/message_clean = combine_message(message_pieces, null, L) + create_chat_message(locateUID(L.runechat_msg_location), message_clean) + show_message(rendered, 2) + +/mob/camera/flock/proc/update_z(new_z) // 1+ to register, null to unregister + if(registered_z != new_z) + if(registered_z) + SSmobs.flock_cameras_by_zlevel[registered_z] -= src + if(client) + if(new_z) + SSmobs.flock_cameras_by_zlevel[new_z] += src + registered_z = new_z + else + registered_z = null + +/mob/camera/flock/proc/get_flock_data() + var/list/data = list() + data["name"] = real_name + data["area"] = get_area_name(src, TRUE) || "???" + data["ref"] = ref(src) + + if(controlling_bird) + data["host"] = controlling_bird.real_name + data["health"] = controlling_bird.get_damage_percent() + else + data["host"] = null + data["health"] = 100 + + return data + +/mob/camera/flock/proc/so_very_sad_death() + if(client) + to_chat(src, SPAN_ALERT("You cease to exist.")) + + if(controlling_bird) + controlling_bird.release_control() + + icon_state = "[base_icon_state]-ghost" + ghostize(FALSE) + flock?.free_unit(src) + + invisibility = 0 + notransform = TRUE + icon_state = "blank" + flick("[base_icon_state]-death", src) + addtimer(CALLBACK(src, PROC_REF(cleanup)), 2 SECONDS) + +/mob/camera/flock/proc/cleanup(datum/source) + qdel(src) diff --git a/code/modules/antagonists/flockmind/flock_camera/flock_overmind.dm b/code/modules/antagonists/flockmind/flock_camera/flock_overmind.dm new file mode 100644 index 00000000000..8d4f3b79b9c --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_camera/flock_overmind.dm @@ -0,0 +1,88 @@ +/mob/camera/flock/overmind + name = "Flockmind" + desc = "A ghostly conglomerate of signals and sentient radio waves." + + see_invisible = SEE_INVISIBLE_FLOCK + + actions_to_grant = list( + /datum/action/cooldown/flock/create_rift, + ) + + /// Granted after create_rift is cast. + var/list/grant_upon_start = list( + /datum/action/cooldown/flock/control_panel, + /datum/action/cooldown/flock/create_structure, + /datum/action/cooldown/flock/partition_mind, + /datum/action/cooldown/flock/diffract_drone, + /datum/action/cooldown/flock/control_drone, + /datum/action/cooldown/flock/designate_tile, + /datum/action/cooldown/flock/designate_deconstruct, + /datum/action/cooldown/flock/designate_enemy, + /datum/action/cooldown/flock/designate_ignore, + /datum/action/cooldown/flock/ping, + /datum/action/cooldown/flock/repair_burst, + /datum/action/cooldown/flock/radio_blast, + /datum/action/cooldown/flock/radio_talk, + /datum/action/cooldown/flock/gatecrash, + ) + +/mob/camera/flock/overmind/Initialize(mapload, join_flock) + . = ..() + flock.register_overmind(src) + real_name = "Flockmind [flock.name]" + +/mob/camera/flock/overmind/Destroy() + flock?.overmind = null // This shouldnt really happen + return ..() + +/mob/camera/flock/overmind/Login() + . = ..() + flock.refresh_unlockables() + +/mob/camera/flock/overmind/Logout() + . = ..() + // If we disconnect, free our homeboy + var/datum/action/cooldown/flock/control_drone/control_drone = locate() in actions + control_drone?.free_drone() + +/mob/camera/flock/overmind/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: [real_name]"), + SPAN_FLOCKSAY("Flock: [flock.name || "N/A"]"), + SPAN_FLOCKSAY("Bandwidth: [flock.bandwidth.has_points()]"), + SPAN_FLOCKSAY("Substrate: [flock.get_total_substrate()]"), + SPAN_FLOCKSAY("System Integrity: [flock.get_total_health_percentage()]%"), + SPAN_FLOCKSAY("Cognition: COMPUTATIONAL NEXUS"), + SPAN_FLOCKSAY("###=-"), + ) + +/mob/camera/flock/overmind/get_status_tab_items() + var/list/status_tab_data = ..() + . = status_tab_data + status_tab_data[++status_tab_data.len] = list("", "") + status_tab_data[++status_tab_data.len] = list("Total Bandwidth: ", "[flock.bandwidth.has_points()]") + status_tab_data[++status_tab_data.len] = list("Used Bandwidth: ", "[flock.used_bandwidth]") + status_tab_data[++status_tab_data.len] = list("Available Bandwidth: ", "[flock.available_bandwidth()]") + +/mob/camera/flock/overmind/so_very_sad_death() + var/datum/flock/old_flock = flock + flock = null + old_flock?.overmind = null // to prevent infinite loop + old_flock.game_over() + . = ..() + +/mob/camera/flock/overmind/proc/spawn_rift(turf/T) + new /obj/structure/flock/rift(T, flock) + + var/datum/action/cooldown/flock/create_rift/rift_action = locate() in actions + rift_action.Remove(src) + + for(var/datum/action/A as anything in grant_upon_start) + A = new A() + A.Grant(src) + + flock.start() diff --git a/code/modules/antagonists/flockmind/flock_camera/flocktrace.dm b/code/modules/antagonists/flockmind/flock_camera/flocktrace.dm new file mode 100644 index 00000000000..0761f165a4f --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_camera/flocktrace.dm @@ -0,0 +1,49 @@ +/mob/camera/flock/trace + name = "Flocktrace" + desc = "The representation of a partition of the will of the flockmind." + icon_state = "flocktrace" + base_icon_state = "flocktrace" + + actions_to_grant = list( + /datum/action/cooldown/flock/gatecrash, + /datum/action/cooldown/flock/designate_tile, + /datum/action/cooldown/flock/designate_enemy, + /datum/action/cooldown/flock/designate_ignore, + /datum/action/cooldown/flock/ping, + ) + + var/bandwidth_provided = -FLOCK_COMPUTE_COST_FLOCKTRACE + +/mob/camera/flock/trace/Initialize(mapload, join_flock) + . = ..() + real_name = flock_realname(FLOCK_TYPE_TRACE) + flock.add_unit(src) + flock.stat_traces_made++ + +/mob/camera/flock/trace/Destroy() + flock?.free_unit(src) + return ..() + +/mob/camera/flock/trace/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: [real_name]"), + SPAN_FLOCKSAY("Flock: [flock.name || "N/A"]"), + SPAN_FLOCKSAY("Bandwidth: [flock.bandwidth.has_points()]"), + SPAN_FLOCKSAY("System Integrity: [flock.get_total_health_percentage()]%"), + SPAN_FLOCKSAY("Cognition: SYNAPTIC PROCESS"), + SPAN_FLOCKSAY("###=-"), + ) + +/mob/camera/flock/trace/vv_edit_var(var_name, var_value) + switch(var_name) + if(NAMEOF(src, bandwidth_provided)) + flock?.bandwidth.adjust_points(-bandwidth_provided) + ..() + flock?.bandwidth.adjust_points(bandwidth_provided) + return TRUE + + return ..() diff --git a/code/modules/antagonists/flockmind/flock_controller/_flock_controller.dm b/code/modules/antagonists/flockmind/flock_controller/_flock_controller.dm new file mode 100644 index 00000000000..f3d4bfd9f5e --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_controller/_flock_controller.dm @@ -0,0 +1,677 @@ +/proc/get_default_flock() as /datum/flock + var/static/datum/flock/flock + if(isnull(flock)) + flock = new + + return flock + +/datum/flock + var/name = "BAD FLOCK" + + /// The master of the flock + var/mob/camera/flock/overmind/overmind + + /// Cache of images used by notices. + var/list/notice_images = list() + /// A k:V list of atoms the Overmind has marked for conversion, where the value is TRUE + var/list/marked_for_conversion = list() + /// A k:v list of atoms the Overmind has marked for deconstruction, where the value is TRUE + var/list/marked_for_deconstruction = list() + /// A k:V list of reserved_turf = TRUE. + var/list/turf_reservations = list() + /// A k:V list of flock mobs to their reserved turf. + var/list/turf_reservations_by_flock = list() + + var/list/claimed_floors = list() + var/list/claimed_walls = list() + + /// Every structure we've built. + var/list/structures = list() + + /// The bits + var/list/bits = list() + /// The drones + var/list/drones = list() + /// The traces + var/list/traces = list() + + /// A k:v list of mob : details, contains enemy mobs. + var/list/enemies = list() + /// A k:V list of mob : TRUE, where mob is mobs that ai will ignore. + var/list/ignores = list() + + /// A k:V list of client : image, see ping(). + var/list/active_pings = list() + + var/list/datum/flock_unlockable/unlockables = list() + /// The total amount of computational power available, before whats being used. + var/datum/point_holder/bandwidth + /// The computational power being used. + var/used_bandwidth = 0 + /// The maximum amount of traces allowed. + var/max_traces = 10 + + /// The current substrate cost to lay an egg. + var/current_egg_cost = FLOCK_SUBSTRATE_COST_LAY_EGG + + var/flock_started = FALSE + /// Flock status, won, lost, etc + var/flock_game_status = NONE + + /// Our relay, should it have been built + var/obj/structure/flock/relay/built_relay + + /// Current UI tab, saves on data sending. + var/ui_tab = FLOCK_UI_DRONES + + //* STAT TRACKING *// + var/stat_drones_made = 0 + var/stat_bits_made = 0 + var/stat_deaths = 0 + var/stat_resources_gained = 0 + var/stat_traces_made = 0 + var/stat_tiles_made = 0 + var/stat_structures_made = 0 + var/stat_highest_bandwidth = 0 + +/datum/flock/New() + name = flock_realname(FLOCK_TYPE_OVERMIND) + + bandwidth = new() + create_hud_images() + + var/list/all_unlockables = subtypesof(/datum/flock_unlockable) + + for(var/unlockable in all_unlockables) + unlockables += new unlockable() + START_PROCESSING(SSprocessing, src) + +// Called by gamemode code +/datum/flock/process() + if(flock_game_status == FLOCK_ENDGAME_LOST) + return + + stat_highest_bandwidth = max(stat_highest_bandwidth, bandwidth.has_points()) + +/// Called after everything is setup, and clients are in control of their mobs. +/datum/flock/proc/start() + if(flock_started) + return + + flock_started = TRUE + refresh_unlockables() + +/// Claim it for the flock, optionally converting it. Converting should only be avoided if the turf is already a flockturf. +/datum/flock/proc/claim_turf(turf/T, convert = TRUE) + if(isnull(T)) + return + + free_turf(T) + if(convert) + T = flock_convert_turf(T, src) + + if(isnull(T)) + return + + if(convert) + playsound(T, 'sound/items/deconstruct.ogg', 30, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) + + if(iswallturf(T)) + claimed_walls[T] = TRUE + else + claimed_floors[T] = TRUE + + T.AddComponent(/datum/component/flock_interest, src) + RegisterSignal(T, COMSIG_TURF_CHANGE, PROC_REF(claimed_turf_change)) + SEND_SIGNAL(T, COMSIG_TURF_CLAIMED_BY_FLOCK, src) + +/// Stop tracking a turf that is in our claimed walls or claimed floors lists. +/datum/flock/proc/stop_tracking_turf(turf/T) + if(iswallturf(T)) + claimed_walls -= T + else + claimed_floors -= T + + qdel(T.GetComponent(/datum/component/flock_interest)) + UnregisterSignal(T, COMSIG_TURF_CHANGE) + +/// Reserves a turf, making AI ignore it for the purposes of targetting. +/datum/flock/proc/reserve_turf(mob/living/basic/flock/user, turf/target, remove_on_change = TRUE) + if(turf_reservations_by_flock[user]) + return FALSE + if(turf_reservations[target]) + return FALSE + + turf_reservations_by_flock[user] = target + turf_reservations[target] = user + add_notice(target, FLOCK_NOTICE_RESERVED) + if(remove_on_change) + RegisterSignal(target, COMSIG_TURF_CHANGE, PROC_REF(reserved_turf_change)) + return TRUE + +/// Free a turf from reservation, allowing AI to target it again. override_turf can be given to lookup the user if there isnt a user in this context. +/datum/flock/proc/free_turf(mob/living/basic/flock/user, turf/override_turf) + var/turf/to_free + if(user) + to_free = turf_reservations_by_flock[user] + else + user = turf_reservations[override_turf] + if(isnull(user)) + return + + to_free = override_turf + + if(isnull(to_free)) + return + + remove_notice(to_free, FLOCK_NOTICE_RESERVED) + remove_notice(to_free, FLOCK_NOTICE_PRIORITY) + turf_reservations_by_flock -= user + turf_reservations -= to_free + marked_for_conversion -= to_free + UnregisterSignal(to_free, COMSIG_TURF_CHANGE) + +/// Returns TRUE if the given turf is not reserved. +/datum/flock/proc/is_turf_free(turf/T) + return !turf_reservations[T] + +/// Returns TRUE if the given mob is an enemy. +/datum/flock/proc/is_mob_enemy(mob/M) + return enemies[M] + +/// Returns TRUE if the given mob is ignored by the flock. +/datum/flock/proc/is_mob_ignored(mob/M) + return ignores[M] + +/// Adds a unit to the flock and sets up all of the tracking. +/datum/flock/proc/add_unit(mob/unit) + if(isflocktrace(unit)) + traces += unit + + var/mob/camera/flock/trace/ghostbird = unit + add_bandwidth_influence(ghostbird.bandwidth_provided) + return + + if(isflockdrone(unit)) + drones += unit + update_egg_cost() + + else if(isflockbit(unit)) + bits += unit + + unit.AddComponent(/datum/component/flock_interest, src) + + var/mob/living/basic/flock/bird = unit + add_bandwidth_influence(bird.bandwidth_provided) + +/// Removes a unit from the flock. +/datum/flock/proc/free_unit(mob/unit) + if(isflocktrace(unit)) + var/mob/camera/flock/trace/ghostbird = unit + ghostbird.flock = null + traces -= unit + remove_bandwidth_influence(ghostbird.bandwidth_provided) + return + + else if(isflockdrone(unit)) + var/mob/living/basic/flock/drone/bird = unit + bird.flock = null + drones -= unit + remove_bandwidth_influence(bird.bandwidth_provided) + update_egg_cost() + + else if(isflockbit(unit)) + var/mob/living/basic/flock/bit/bitty_bird = unit + bitty_bird.flock = null + bits -= unit + remove_bandwidth_influence(bitty_bird.bandwidth_provided) + + remove_notice(unit, FLOCK_NOTICE_HEALTH) + free_turf(unit) + qdel(unit.GetComponent(/datum/component/flock_interest)) + + consider_game_over() + +/// Add a structure to the flock. +/datum/flock/proc/add_structure(obj/structure/flock/struct) + structures += struct + struct.flock = src + struct.AddComponent(/datum/component/flock_interest, src) + add_bandwidth_influence(struct.bandwidth_provided) + + if(istype(struct, /obj/structure/flock/egg)) + update_egg_cost() + +/// Remove a structure from the flock. +/datum/flock/proc/free_structure(obj/structure/flock/struct) + structures -= struct + qdel(struct.GetComponent(/datum/component/flock_interest)) + struct.flock = null + if(struct.active) + remove_bandwidth_influence(-struct.active_bandwidth_cost) + else + remove_bandwidth_influence(struct.bandwidth_provided) + + if(istype(struct, /obj/structure/flock/egg)) + update_egg_cost() + +/// Wrapper for spawning a tealprint, used by Create Structure +/datum/flock/proc/create_structure(turf/location, structure_type) + new /obj/structure/flock/tealprint(location, src, structure_type) + +/// Wrapper for handling bandwidth alongside used_bandwidth for new mobs +/datum/flock/proc/add_bandwidth_influence(num) + if(num < 0) + used_bandwidth += abs(num) + else + bandwidth.adjust_points(num) + + refresh_unlockables() + +/// Wrapper for handling bandwidth alongside used_bandwidth for mobs leaving the flock +/datum/flock/proc/remove_bandwidth_influence(num) + if(num < 0) + used_bandwidth -= abs(num) + else + bandwidth.adjust_points(-num) + + refresh_unlockables() + +/// Refreshes the status of every unlockable. +/datum/flock/proc/refresh_unlockables() + if(!flock_started) + return + + var/new_total = bandwidth.has_points() + var/new_available = available_bandwidth() + + for(var/datum/flock_unlockable/unlockable as anything in unlockables) + unlockable.refresh_lock_status(src, new_total, new_available) + +/// Returns the total amount of bandwidth, including bandwidth being used. +/datum/flock/proc/total_bandwidth() + return bandwidth.has_points() + +/// Returns the total amount claimed turfs +/datum/flock/proc/total_turfs() + return (length(claimed_floors) + length(claimed_walls)) + +/// Returns the amount of available bandwidth. Can return negative if over budget. +/datum/flock/proc/available_bandwidth() + return bandwidth.has_points() - used_bandwidth + +/// Returns TRUE if the flock has the required bandwidth +/datum/flock/proc/can_afford(amt) + return amt <= max(available_bandwidth(), 0) + +/// Updates the substrate cost of an egg given the current status of the flock. +/datum/flock/proc/update_egg_cost() + var/egg_count = 0 + for(var/obj/structure/flock/egg/egg as anything in structures) + egg_count++ + + var/status_addend = (length(drones) + egg_count) ** sqrt(2) + current_egg_cost = round(FLOCK_SUBSTRATE_COST_LAY_EGG + status_addend, 10) + +/// Returns the substract requirement to be able to spend substrate on an egg. See above proc. +/datum/flock/proc/get_egg_elligibility_cost() + var/ideal_pop_factor = length(drones) - FLOCK_MIN_DESIRED_POP + if(ideal_pop_factor <= 0) + return current_egg_cost + + return round(current_egg_cost + (ideal_pop_factor * FLOCK_ADDITIONAL_RESOURCE_RESERVATION_PER_DRONE), 1) + +/// Sets the flock's overmind +/datum/flock/proc/register_overmind(mob/camera/flock_overmind) + overmind = flock_overmind + +/// Updates a mob's enemy status. If they are already an enemy, their entry will be updated with new information. +/datum/flock/proc/update_enemy(atom/movable/enemy) + if(is_mob_ignored(enemy)) + return FALSE + + for(var/mob/living/L in enemy.buckled_mobs) + update_enemy(L) + + if(!isliving(enemy)) + return FALSE + if(!enemies[enemy]) + RegisterSignal(enemy, COMSIG_PARENT_QDELETING, PROC_REF(on_enemy_gone)) + add_notice(enemy, FLOCK_NOTICE_ENEMY) + enemies[enemy] = get_area_name(enemy) + return TRUE + +/// Removes an atom from the enemies list. +/datum/flock/proc/remove_enemy(atom/movable/enemy, skip_buckled) + if(!skip_buckled) + for(var/mob/living/L in enemy.buckled_mobs) + remove_enemy(L) + + if(!isliving(enemy)) + return + + enemies -= enemy + UnregisterSignal(enemy, COMSIG_PARENT_QDELETING) + remove_notice(enemy, FLOCK_NOTICE_ENEMY) + return + +/// Adds a mob to the ignored list. +/datum/flock/proc/add_ignore(atom/movable/ignore) + for(var/mob/living/L in ignore.buckled_mobs) + add_ignore(L) + + if(!isliving(ignore)) + return + + if(!enemies[ignore]) + RegisterSignal(ignore, COMSIG_PARENT_QDELETING, PROC_REF(on_ignore_gone)) + add_notice(ignore, FLOCK_NOTICE_IGNORE) + ignores[ignore] = TRUE + +/// Removes a mob from the ignore list. +/datum/flock/proc/remove_ignore(atom/movable/ignore, skip_buckled) + if(!skip_buckled) + for(var/mob/living/L in ignore.buckled_mobs) + add_ignore(L) + + if(!isliving(ignore)) + return + + ignores -= ignore + remove_notice(ignore, FLOCK_NOTICE_IGNORE) + UnregisterSignal(ignore, COMSIG_PARENT_QDELETING) + +/// (un)Mark a flock atom for deconstruction. Returns FALSE if it cannot be deconstructed. +/datum/flock/proc/toggle_deconstruction_mark(atom/A) + if(ismob(A) || !HAS_TRAIT(A, TRAIT_FLOCK_THING) || HAS_TRAIT(A, TRAIT_FLOCK_NODECON)) + return FALSE + + if(marked_for_deconstruction[A]) + marked_for_deconstruction -= A + UnregisterSignal(A, COMSIG_PARENT_QDELETING) + remove_notice(A, FLOCK_NOTICE_DECONSTRUCT) + else + marked_for_deconstruction[A] = TRUE + RegisterSignal(A, COMSIG_PARENT_QDELETING, PROC_REF(deconstruct_mark_deleted)) + add_notice(A, FLOCK_NOTICE_DECONSTRUCT) + return TRUE + +/// Places a flock notice on an atom. See flock_defines.dm +/datum/flock/proc/add_notice(atom/target, notice_type) + if(!overmind) + return + var/image/I = image(notice_images[notice_type], loc = target) + var/list/things_that_can_see_notices = list(overmind) + traces + return target.add_alt_appearance(notice_type, I, things_that_can_see_notices) + +/// Removes a flock notice from an atom. +/datum/flock/proc/remove_notice(atom/target, notice_type) + target.remove_alt_appearance(notice_type) + +/// Returns a list of turfs marked for conversion, minus turfs that drones have already reserved. +/datum/flock/proc/get_priority_turfs(mob/living/basic/flock/bird) + if(!length(marked_for_conversion)) + return null + + return marked_for_conversion - turf_reservations + +/// Pings a location, alerting all flocktraces. +/datum/flock/proc/ping(turf/T, mob/camera/flock/pinger) + var/message = "System interrupt. Designating new target: [T] in [get_area(T)]." + flock_talk(pinger, message, src, TRUE) + T.AddComponent(/datum/component/flock_ping, 5 SECONDS) + + for(var/mob/camera/flock/ghost_bird in (traces + overmind)) + var/client/target_client = ghost_bird.client + if(!target_client) + if(!ghost_bird.controlling_bird?.client) + continue + target_client = ghost_bird.controlling_bird.client + + target_client.mob.playsound_local(null, 'sound/goonstation/flockmind/ping.ogg', 50, TRUE) + if(ghost_bird == pinger) + continue + + var/image/pointer = pointer_image_to(target_client.mob, T) + animate(pointer, time = 3 SECONDS, alpha = 0) + add_ping_image(target_client, pointer, 3 SECONDS) + +/// Returns the total percentage of the sum of every mob's health and max health. +/datum/flock/proc/get_total_health_percentage() + var/numerator = 0 + var/denominator = 0 + for(var/mob/living/basic/flock/bird as anything in (drones + bits)) + numerator += bird.health + denominator += bird.maxHealth + + if(denominator == 0) // somehow i guess + return 0 + + return round(numerator / denominator * 100, 0.1) + +/// Returns the total amount of substrate by all flock mobs. +/datum/flock/proc/get_total_substrate() + . = 0 + for(var/mob/living/basic/flock/drone/bird as anything in drones) + . += bird.substrate.has_points() + +/// Called when a turf reserved by a flock mob changes. +/datum/flock/proc/reserved_turf_change(datum/source) + SIGNAL_HANDLER + free_turf(override_turf = source) + +/// Called when a turf owned by the flock changes. +/datum/flock/proc/claimed_turf_change(turf/source) + SIGNAL_HANDLER + if(isflockturf(source)) + stop_tracking_turf(source) + claim_turf(source, FALSE) // Wall to floor or visa-versa, keep it updated. + else + stop_tracking_turf(source) + +/// Helper for adding a ping image to a client's screen and handling clean up. +/datum/flock/proc/add_ping_image(client/C, image/ping, duration) + if(isnull(C)) + return + + C.images += ping + active_pings[C] += list(ping) + RegisterSignal(C, COMSIG_PARENT_QDELETING, PROC_REF(on_client_gone), override = TRUE) + addtimer(CALLBACK(src, PROC_REF(cleanup_ping_images), C, ping), 3 SECONDS) + +/// Called by add_ping_image via timer callback. +/datum/flock/proc/cleanup_ping_images(client/C, list/images_to_clean) + if(isnull(C)) + return + + var/list/images = images_to_clean || active_pings[C] + C.images -= images + active_pings[C] -= images + if(!length(active_pings[C])) + active_pings -= C + UnregisterSignal(C, COMSIG_PARENT_QDELETING) + +/// Checks to see if the given atom is allowed to be there. Has lots of behavior like making drones dormant and snapping traces back to the station. +/datum/flock/proc/is_on_safe_z(atom/A) + var/turf/T = get_turf(A) + if(!T.z) + return FALSE + + if(flock_game_status == FLOCK_ENDGAME_LOST) + return TRUE + + if(is_station_level(T.z)) + return TRUE + + return FALSE + +/// Called when a client holding a ping image disconnects. +/datum/flock/proc/on_client_gone(client/source) + SIGNAL_HANDLER + cleanup_ping_images() + +/// Called when a unit under the flock's control dies. +/datum/flock/proc/on_unit_death(datum/source) + SIGNAL_HANDLER + free_unit(source) + +/// Called when an enemy atom is deleted. +/datum/flock/proc/on_enemy_gone(datum/source) + SIGNAL_HANDLER + remove_enemy(source, TRUE) + +/// Called when an ignored mob is deleted. +/datum/flock/proc/on_ignore_gone(datum/source) + SIGNAL_HANDLER + remove_ignore(source, TRUE) + +/// Instantiates all of the flock notice image singletons. +/datum/flock/proc/create_hud_images() + notice_images[FLOCK_NOTICE_RESERVED] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "frontier"; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + alpha = 80; + } + + notice_images[FLOCK_NOTICE_PRIORITY] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "frontier"; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + alpha = 180; + } + + notice_images[FLOCK_NOTICE_ENEMY] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "hazard"; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + + notice_images[FLOCK_NOTICE_IGNORE] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "ignore"; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + + notice_images[FLOCK_NOTICE_FLOCKMIND_CONTROL] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "flockmind_face"; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + + notice_images[FLOCK_NOTICE_FLOCKTRACE_CONTROL] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "flocktrace_face"; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + + notice_images[FLOCK_NOTICE_DECONSTRUCT] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "deconstruct"; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + + notice_images[FLOCK_NOTICE_HEALTH] = new /image{ + icon = 'icons/goonstation/mob/featherzone.dmi'; + icon_state = "hp-100"; + pixel_x = 10; + pixel_y = 16; + plane = ABOVE_LIGHTING_PLANE; + appearance_flags = RESET_ALPHA | RESET_COLOR | PIXEL_SCALE | RESET_TRANSFORM; + } + +/// Setter for flock_game_status. +/datum/flock/proc/set_flock_game_status(new_status) + var/old_status = flock_game_status + if(old_status == new_status) + return null + + flock_game_status = new_status + + return old_status + +/// Ends the flock if it is unable to continue spreading. +/datum/flock/proc/consider_game_over() + if(!flock_started) + return FALSE + + if(flock_game_status == FLOCK_ENDGAME_LOST) + return TRUE + + if(flock_game_status == FLOCK_ENDGAME_VICTORY) + return TRUE + + if(length(drones)) + return FALSE + + if(locate(/obj/structure/flock/egg, structures) || locate(/obj/structure/flock/rift, structures)) + return FALSE + + game_over() + return TRUE + +/// Kills off the flock. Pass completely_destroy = FALSE to allow the overmind to live on. +/datum/flock/proc/game_over(completely_destroy = TRUE) + set waitfor = FALSE + + // Cleanup any pings + for(var/client/C in active_pings) + cleanup_ping_images(C) + + // Cleanup turf claims + for(var/turf/T as anything in turf_reservations) + free_turf(override_turf = T) + + for(var/turf/flockturf as anything in claimed_floors + claimed_walls) + stop_tracking_turf(flockturf) + CHECK_TICK + + // Extra lives + if(!completely_destroy) + refresh_unlockables() + return + + set_flock_game_status(FLOCK_ENDGAME_LOST) + + // Kill overmind + overmind?.so_very_sad_death() // Overmind can be null here if it died outside of game_over(). + + // Kill traces + for(var/mob/camera/flock/trace/ghostbird as anything in traces) + ghostbird.so_very_sad_death() + + // Free units + for(var/mob/living/basic/flock/bird as anything in (bits + drones)) + bird.dormantize() + + // Blow up structures + for(var/obj/structure/flock/structure as anything in structures) + structure.deconstruct(FALSE) + + // Remove ignores + for(var/mob/M as anything in ignores) + remove_ignore(M, TRUE) + + // Remove enemies + for(var/mob/M as anything in enemies) + remove_enemy(M, TRUE) + + STOP_PROCESSING(SSprocessing, src) + +/// Called when an atom marked for deconstruction is qdeleted. +/datum/flock/proc/deconstruct_mark_deleted(datum/source) + SIGNAL_HANDLER + + toggle_deconstruction_mark(source) diff --git a/code/modules/antagonists/flockmind/flock_controller/flock_ui.dm b/code/modules/antagonists/flockmind/flock_controller/flock_ui.dm new file mode 100644 index 00000000000..9f8295bc983 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_controller/flock_ui.dm @@ -0,0 +1,119 @@ +/datum/flock/ui_state(mob/user) + return GLOB.flock_state + +/datum/flock/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "FlockPanel") + ui.open() + +/datum/flock/ui_data(mob/user) + var/list/data = list() + var/list/drone_info = list() + var/list/trace_info = list() + var/list/enemy_info = list() + var/list/vitals_info = list("name" = name) + var/list/stats_info = list() + var/list/structure_info = list() + + data["drones"] = drone_info + data["partitions"] = trace_info + data["vitals"] = vitals_info + data["enemies"] = enemy_info + data["structures"] = structure_info + data["category"] = ui_tab + data["stats"] = stats_info + data["category_lengths"] = list( + "traces" = length(traces), + "drones" = length(drones), + "enemies" = length(enemies), + "structures" = length(structures), + ) + + switch(ui_tab) + if(FLOCK_UI_DRONES) + for(var/mob/living/basic/flock/drone/bird as anything in drones) + drone_info[++drone_info.len] = bird.get_flock_data() + + if(FLOCK_UI_TRACES) + for(var/mob/camera/flock/trace/ghost_bird as anything in traces) + trace_info[++trace_info.len] = ghost_bird.get_flock_data() + + if(FLOCK_UI_ENEMIES) + for(var/mob/enemy in enemies) + var/list/mob_data = list() + mob_data["name"] = enemy.name + mob_data["area"] = enemies[enemy] + mob_data["ref"] = ref(enemy) + enemy_info[++enemy_info.len] = mob_data + + if(FLOCK_UI_STRUCTURES) + for(var/obj/structure/flock/struct as anything in structures) + structure_info[++structure_info.len] = struct.get_flock_data() + + stats_info[++stats_info.len] = list(name = "Drones realized: ", "value" = stat_drones_made) + stats_info[++stats_info.len] = list(name = "Bits formed: ", "value" = stat_bits_made) + stats_info[++stats_info.len] = list(name = "Total deaths: ", "value" = stat_deaths) + stats_info[++stats_info.len] = list(name = "Resources gained: ", "value" = stat_resources_gained) + stats_info[++stats_info.len] = list(name = "Partitions divided: ", "value" = stat_traces_made) + stats_info[++stats_info.len] = list(name = "Tiles converted: ", "value" = stat_tiles_made) + stats_info[++stats_info.len] = list(name = "Structures materialized: ", "value" = stat_structures_made) + stats_info[++stats_info.len] = list(name = "Highest bandwidth: ", "value" = stat_highest_bandwidth) + + return data + +/datum/flock/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + . = ..() + if(.) + return + + var/mob/user = ui.user + switch(action) + if("change_tab") + if(ui_tab != params["tab"]) + ui_tab = params["tab"] + return TRUE + + if("jump_to") + var/atom/movable/target = locate(params["origin"]) + var/turf/T = get_turf(target) + if(isnull(T) || !is_on_safe_z(target)) + to_chat(user, SPAN_ALERT("They are beyond our reach.")) + return + + if(isflockdrone(user)) + var/mob/living/basic/flock/drone/bird = user + user = bird.controlled_by + bird.release_control() + + user.forceMove(T) + + if("remove_enemy") + var/mob/enemy = locate(params["origin"]) + if(enemy) + remove_enemy(enemy) + return TRUE + + if("rally") + var/mob/living/basic/flock/drone/bird = locate(params["origin"]) + if(istype(bird)) + bird.rally(get_turf(user)) + return TRUE + + if("cancel_tealprint") + var/obj/structure/flock/tealprint/tealprint = locate(params["origin"]) + tealprint?.try_cancel_structure() + return TRUE + + if("delete_trace") + var/mob/camera/flock/trace/flocktrace = locate(params["origin"]) + if(!istype(flocktrace)) + message_admins("Warning: possible href exploit by [key_name(usr)] - attempted to remove a flocktrace that wasn't a flocktrace: [flocktrace]") + log_game("Warning: possible href exploit by [key_name(usr)] - attempted to remove a flocktrace that wasn't a flocktrace: [flocktrace]") + return TRUE + + if(tgui_alert(user, "This will destroy the Flocktrace. Are you sure you want to do this?", "Confirmation", list("Yes", "No")) == "Yes") + flock_talk(null, "Partition [flocktrace.real_name] has been reintegrated into flock background processes.", src, involuntary = TRUE) + to_chat(flocktrace, SPAN_FLOCKSAY("Your higher cognition has been forcibly reintegrated into the collective will of the flock.")) + flocktrace.so_very_sad_death() + return TRUE diff --git a/code/modules/antagonists/flockmind/flock_convert_atom.dm b/code/modules/antagonists/flockmind/flock_convert_atom.dm new file mode 100644 index 00000000000..57f22f8dfe9 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_convert_atom.dm @@ -0,0 +1,141 @@ +/proc/flock_convert_turf(turf/T, datum/flock/flock, force) + if(!T?.can_flock_convert(force)) + return + + if(isflockturf(T)) + . = T + + else if(iswallturf(T)) + . = T.ChangeTurf(/turf/simulated/wall/flock, ignore_air = TRUE) + + else if(isfloorturf(T)) + . = T.ChangeTurf(/turf/simulated/floor/flock, ignore_air = TRUE) + var/list/datum/element/decal/decals = T.get_decals() + for(var/datum/element/decal/dcl in decals) + dcl.Detach(T) + T.RemoveElement(/datum/element/decal) + + var/obj/structure/lattice/L = locate() in . + if(L) + qdel(L) + if(istype(L, /obj/structure/lattice/catwalk)) + . = T.ChangeTurf(/turf/simulated/floor/flock) + + for(var/obj/O in .) + if(iseffect(O)) + continue + + O.try_flock_convert(flock, force) + +/// Attempt to convert an object. Default behavior is to do nothing. +/obj/proc/try_flock_convert(datum/flock/flock, force) + return + +/obj/machinery/camera/try_flock_convert(datum/flock/flock, force) + deconstruct() + +/obj/structure/window/try_flock_convert(datum/flock/flock, force) + var/turf/T = loc + var/obj/structure/window/flock/new_window + qdel(src) + + if(fulltile) + new_window = new /obj/structure/window/flock/fulltile(T) + else + new_window = new /obj/structure/window/flock(T) + new_window.dir = dir + + new_window.AddComponent(/datum/component/flock_interest, flock) + return new_window + +/obj/machinery/door/try_flock_convert(datum/flock/flock, force) + var/turf/T = loc + qdel(src) + return new /obj/machinery/door/flock(T) + +// This results in double layered doors +/obj/machinery/door/firedoor/try_flock_convert(datum/flock/flock, force) + return + +/obj/machinery/light/try_flock_convert(datum/flock/flock, force) + var/obj/L = new /obj/machinery/light/flock(loc) + L.setDir(dir) + qdel(src) + return L + +/obj/machinery/light/floor/try_flock_convert(datum/flock/flock, force) + . = new /obj/machinery/light/floor/has_bulb/flock(loc) + qdel(src) + +/obj/structure/computerframe/try_flock_convert(datum/flock/flock, force) + . = new /obj/structure/flock/compute(loc, flock) + qdel(src) + +/obj/machinery/computer4/try_flock_convert(datum/flock/flock, force) + . = new /obj/structure/flock/compute(loc, flock) + qdel(src) + +/obj/machinery/computer/try_flock_convert(datum/flock/flock, force) + . = new /obj/structure/flock/compute(loc, flock) + qdel(src) + +/obj/machinery/seed_extractor/try_flock_convert(datum/flock/flock, force) + . = new /obj/structure/flock/compute(loc, flock) + qdel(src) + +/obj/machinery/telecomms/try_flock_convert(datum/flock/flock, force) + . = new /obj/structure/flock/compute(loc, flock) + qdel(src) + +/obj/structure/chair/try_flock_convert(datum/flock/flock, force) + . = ..() + var/obj/structure/chair/comfy/flock/F = new /obj/structure/chair/comfy/flock(get_turf(src), flock) + F.AddComponent(/datum/component/flock_interest, flock) + F.setDir(dir) + qdel(src) + +/obj/structure/lattice/try_flock_convert(datum/flock/flock, force) + . = ..() + var/obj/structure/lattice/flock/F = new /obj/structure/lattice/flock(get_turf(src)) + F.AddComponent(/datum/component/flock_interest, flock) + qdel(src) + +/obj/structure/closet/try_flock_convert(datum/flock/flock, force) + . = ..() + dump_contents() + var/obj/structure/closet/flock/F = new(get_turf(src), flock) + F.take_contents() + F.AddComponent(/datum/component/flock_interest, flock) + qdel(src) + +/obj/machinery/porta_turret/try_flock_convert(datum/flock/flock, force) + . = ..() + new /obj/structure/flock/gnesis_turret(get_turf(src), flock) + qdel(src) + +/obj/structure/grille/try_flock_convert(datum/flock/flock, force) + var/obj/structure/grille/G + if(broken) + G = new /obj/structure/grille/flock/broken(get_turf(src)) + else + G = new /obj/structure/grille/flock(get_turf(src)) + G.AddComponent(/datum/component/flock_interest, flock) + qdel(src) + +/turf/proc/can_flock_convert(force) + return FALSE + +/turf/space/can_flock_convert(force) + var/obj/structure/lattice/L = locate() in src + if(L) + return TRUE + return FALSE + +/turf/simulated/floor/can_flock_convert(force) + return TRUE + +/turf/simulated/floor/flock/can_flock_convert(force) + return TRUE + +/turf/simulated/wall/can_flock_convert(force) + return TRUE diff --git a/code/modules/antagonists/flockmind/flock_effects.dm b/code/modules/antagonists/flockmind/flock_effects.dm new file mode 100644 index 00000000000..5d3d24319cf --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_effects.dm @@ -0,0 +1,23 @@ +/obj/effect/temp_visual/flock // temporary flock visual feedback objects + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "blank" + layer = ABOVE_NORMAL_TURF_LAYER + duration = 4.5 SECONDS + var/animation + +/obj/effect/temp_visual/flock/Initialize(mapload) + . = ..() + flick(animation, src) + +/obj/effect/temp_visual/flock/wall_convert + icon_state = "spawn-wall-loop" + animation = "spawn-wall" + +/obj/effect/temp_visual/flock/floor_convert + icon_state = "spawn-floor-loop" + animation = "spawn-floor" + +/obj/effect/temp_visual/flock/flock_heal_burst + duration = 0.7 SECONDS + icon_state = "telemarker" + animation = "telemarker" diff --git a/code/modules/antagonists/flockmind/flock_global_lists.dm b/code/modules/antagonists/flockmind/flock_global_lists.dm new file mode 100644 index 00000000000..0c6b67001f4 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_global_lists.dm @@ -0,0 +1,54 @@ +GLOBAL_LIST_INIT(flockdrone_created_phrases, list( + "online, flock protocols initiating", + "awoken, concordance achieved", + "existence achieved, analysing situation", + "assembling process complete", +)) + +GLOBAL_LIST_INIT(flockdrone_death_phrases, list( + "terminal damage, system malf---", + "situation untenable, death imminen---", + "severe damage, unable to recov---", + "notification: unit death---" +)) + +GLOBAL_LIST_INIT(flockdrone_new_enemy_phrases, list( + "new enemy,", + "new transgressor detected,", + "new threat is,", + "damage sustained, no thanks to", + "new violent individual, be warned, ident is", + "please destroy" +)) + +GLOBAL_LIST_INIT(flockdrone_name_adjectives, list( + "weird", + "odd", + "strange", + "unusual", + "distinctive", + "glowy", + "flashy", + "shiny", + "bright", + "pulsing", + "gaudy", + "flickering", + "humming" +)) + +GLOBAL_LIST_INIT(flockdrone_name_nouns, list( + "thing", + "device", + "machine", + "construct", + "apparatus", + "object" +)) + +GLOBAL_LIST_INIT(flock_betrayal_phrases, list( + "disregarding attack from ignored target", + "turning a blind eye to", + "revenge not taken on", + "ignoring attack from", +)) diff --git a/code/modules/antagonists/flockmind/flock_hooks.dm b/code/modules/antagonists/flockmind/flock_hooks.dm new file mode 100644 index 00000000000..b8d9ef24894 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_hooks.dm @@ -0,0 +1,3 @@ +/// Returns the name that the flock has given an object. Flavor. +/atom/proc/get_flock_id() + return diff --git a/code/modules/antagonists/flockmind/flock_items/flock_cache.dm b/code/modules/antagonists/flockmind/flock_items/flock_cache.dm new file mode 100644 index 00000000000..1d934f662fb --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_items/flock_cache.dm @@ -0,0 +1,25 @@ +/obj/item/reagent_containers/glass/gnesis + name = "fluid-filled octahedron" + desc = "A strange container made of a crystalline matrix. It looks like it can hold reagents but it's a mystery how to access them." + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "minicache" + inhand_icon_state = "beaker" + possible_transfer_amounts = list(5, 10, 15, 25, 30, 50, 100, 200) + has_lid = FALSE + volume = 200 + container_type = REFILLABLE | DRAINABLE + materials = list(MAT_GNESIS_GLASS = 2000) + +/obj/item/reagent_containers/glass/gnesis/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Reagent Minicache"), + SPAN_FLOCKSAY("System Storage: [(reagents.total_volume / volume)]% filled."), + SPAN_FLOCKSAY("###=-") + ) + +/obj/item/reagent_containers/glass/gnesis/prefilled + list_reagents = list("gnesis_tox" = 50) diff --git a/code/modules/antagonists/flockmind/flock_items/flock_cube.dm b/code/modules/antagonists/flockmind/flock_items/flock_cube.dm new file mode 100644 index 00000000000..6e2d2e35050 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_items/flock_cube.dm @@ -0,0 +1,26 @@ +// The cuuuuuuuuuuuuuube +/obj/item/flock_cube + name = "weird cube" + desc = "A weird looking cube." + icon_state = "cube" + icon = 'icons/goonstation/mob/featherzone.dmi' + light_color = "#26ffe6" + light_power = 0.2 + light_range = 2 + + materials = list(MAT_METAL = 1000, MAT_GLASS = 1000, MAT_GNESIS = 2000, MAT_GNESIS_GLASS = 2000) + origin_tech = "materials=5;biotech=5;programming=5" + + /// How much shit in da cube + var/substrate = 10 + +/obj/item/flock_cube/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Substrate Cube"), + SPAN_FLOCKSAY("System Storage: [substrate] units"), + SPAN_FLOCKSAY("###=-") + ) diff --git a/code/modules/antagonists/flockmind/flock_language.dm b/code/modules/antagonists/flockmind/flock_language.dm new file mode 100644 index 00000000000..787d160a0b7 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_language.dm @@ -0,0 +1,79 @@ +/datum/language/flock + name = "Symphonic" + speech_verb = "caws" + space_chance = 60 + key = "f" + flags = RESTRICTED | HIVEMIND | NOLIBRARIAN | NOBABEL | NO_STUTTER + colour = "flocksay" + syllables = list("c#aw", "kr%k", "c@rk", "ka~w", "cr!k", "sk^a", "r#aw", "c*rr", "ka%x", "t~ch", "gr!k", "c&aw", "k!rr", "ch#k", "ra%k", "sk@w", "tr^k", "c~ra", "kw!p", "z#aw", "cl%k", "r@rk", "sh^k", "k~ra", "v!aw") + +/datum/language/flock/get_spoken_verb(msg_end) + switch(msg_end) + if("!") + return pick(exclaim_verbs) + if("?") + return ask_verb + return pick("sings", "clicks", "whistles", "intones", "transmits", "submits", "uploads", "caws") + +/datum/language/flock/format_message(message) + return SPAN_FLOCKSAY_GRADIENT("[get_spoken_verb(message)] \"[message]\"") + +/datum/language/flock/broadcast(atom/speaker, message, speaker_mask, involuntary = FALSE) + var/log_message = "(FLOCK) [message]" + if(ismob(speaker)) + var/mob/M = speaker + log_say(log_message, speaker) + M.create_log(SAY_LOG, log_message) + + var/list/message_start + var/list/message_body = list(format_message(message)) + + if(!speaker) + message_start = list("[name]: ", SPAN_FLOCKSAY_GRADIENT("System")) + else if(!ismob(speaker)) + message_start = list("[name]: ", SPAN_FLOCKSAY_GRADIENT("[speaker.name]")) + else if(isflockcontroller(speaker)) + var/mob/speaking_mob = speaker + message_start = list("[name]: ", SPAN_FLOCKSAY_GRADIENT("[isflockmind(speaker) ? "" : "Flocktrace "][speaking_mob.real_name]")) + message_body += "" + else if(isflockworker(speaker)) + var/mob/speaking_mob = speaker + message_start = list("[name]: ", SPAN_FLOCKSAY_GRADIENT("Drone [speaking_mob.real_name]")) + + for(var/mob/M in GLOB.dead_mob_list) + if(!isnewplayer(M) && !isbrain(M) && speaker) + var/list/message_start_dead = list("[name], [SPAN_NAME("[speaker.name] ([ghost_follow_link(speaker, ghost=M)])")]") + var/list/dead_message = message_start_dead + message_body + M.show_message(dead_message.Join(" "), 2) + + if(speaker && !isflockcontroller(speaker)) + var/scrambled = SPAN_FLOCKSAY_GRADIENT(scramble(message)) + var/living_msg = "[speaker.name] [get_spoken_verb(message)] \"[scrambled]\"" + for(var/mob/M in hearers(5, get_turf(speaker))) + M.show_message(living_msg, 2) + if(M.client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT && ismob(speaker)) + var/mob/speaking_mob = speaker + M.create_chat_message(locateUID(speaking_mob.runechat_msg_location), scrambled) + + for(var/mob/F in GLOB.alive_mob_list) + if(!isflockmob(F)) + continue + var/list/final_message = message_start + message_body + F.show_message(final_message.Join(" "), 2) + if(F.client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT && ismob(speaker)) + var/mob/speaking_mob = speaker + F.create_chat_message(locateUID(speaking_mob.runechat_msg_location), message) + + var/list/silicon_message_start = list("Robot Talk, [SPAN_NAME("Strange Static")]") + var/silicon_message_content = Gibberish(message, 70, replace_rate = 50) + var/silicon_message = SPAN_ROBOT(silicon_message_content) + var/list/final_message_silicon = silicon_message_start + silicon_message + if(involuntary || !prob(30)) + return + for(var/mob/living/silicon/S in GLOB.alive_mob_list) + if(!S.binarycheck()) + continue + S.show_message(final_message_silicon.Join(" "), 2) + if(isflockworker(speaker) && S.client?.prefs.toggles2 & PREFTOGGLE_2_RUNECHAT && ismob(speaker)) + var/mob/speaking_mob = speaker + S.create_chat_message(locateUID(speaking_mob.runechat_msg_location), silicon_message_content) diff --git a/code/modules/antagonists/flockmind/flock_mob/flock_mob.dm b/code/modules/antagonists/flockmind/flock_mob/flock_mob.dm new file mode 100644 index 00000000000..d2901aa5d0a --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flock_mob.dm @@ -0,0 +1,224 @@ +/mob/living/basic/flock + name = "flockdrone" + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "drone" + icon_living = "drone" + icon_dead = "drone-dead" + + pass_flags_self = PASSTABLE | PASSFLOCK + + a_intent = INTENT_DISARM + + light_color = "#26ffe6" + light_power = 0.2 + light_range = 2 + + faction = list("flockmind") + ai_controller = /datum/ai_controller/flock + + sentience_type = SENTIENCE_OTHER + + minimum_survivable_temperature = 0 + maximum_survivable_temperature = 1000 + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + damage_coeff = list(BRUTE = 1.5, BURN = 0.2, TOX = 0.2, CLONE = 0, STAMINA = 0, OXY = 0) + + initial_traits = list(TRAIT_FLYING, TRAIT_FLOCK_THING) + + butcher_results = list(/obj/item/stack/sheet/gnesis = 1) + blood_color = "#4d736d" + blood_volume = BLOOD_VOLUME_OKAY + + contains_xeno_organ = TRUE + + var/list/actions_to_grant = list( + /datum/action/cooldown/flock/convert, + ) + + var/icon_dormant = "drone-dormant" + + /// Flock datum. Can be null. + var/tmp/datum/flock/flock + + /// Physical resources for constructing structures or flockrunning. + var/tmp/datum/point_holder/substrate + + /// Type of point holder to use + var/point_holder_type = /datum/point_holder + + /// Flock ID nametag + var/tmp/obj/effect/abstract/info_tag/flock/name_tag + + /// Tag for the mob's current AI task. + var/tmp/obj/effect/abstract/info_tag/flock/info/task_tag + + var/bandwidth_provided = 0 + + /// If, while part of an active flock, a flockmob leaves the station, they become dormant. + var/tmp/dormant = FALSE + +/mob/living/basic/flock/Initialize(mapload, join_flock) + . = ..() + RegisterSignal(ai_controller, COMSIG_AI_STATUS_CHANGE, PROC_REF(on_ai_status_change)) + + for(var/action_path in actions_to_grant) + var/datum/action/action = new action_path + action.Grant(src) + + flock = join_flock || get_default_flock() + flock?.add_unit(src) + flock.add_notice(src, FLOCK_NOTICE_HEALTH) + + substrate = new point_holder_type + + name_tag = new() + name_tag.set_parent(src) + + task_tag = new() + task_tag.set_parent(src) + + add_language("Symphonic") + set_default_language(GLOB.all_languages["Symphonic"]) + +/mob/living/basic/flock/Destroy() + flock?.free_unit(src) + flock = null + QDEL_NULL(name_tag) + QDEL_NULL(task_tag) + return ..() + +/mob/living/basic/flock/gib() + if(!death(TRUE) && stat != DEAD) + return FALSE + playsound(src.loc, 'sound/goonstation/effects/robogib.ogg', 50, 1) + + flockgibs(loc) + + GLOB.alive_mob_list -= src + GLOB.dead_mob_list -= src + qdel(src) + return TRUE + +/mob/living/basic/flock/Process_Spacemove(movement_dir = 0, continuous_move = FALSE) + return TRUE + +/mob/living/basic/flock/set_stat(new_stat) + . = ..() + if(stat != DEAD) + ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT) + else + REMOVE_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT) + +/mob/living/basic/flock/update_name(updates) + . = ..() + name_tag?.set_text(real_name) + +/mob/living/basic/flock/update_icon_state() + if(stat == DEAD) + icon_state = icon_dead + else + if(dormant) + icon_state = icon_dormant + else + icon_state = icon_living + return ..() + +/mob/living/basic/flock/say(message, verb, sanitize, ignore_speech_problems, ignore_atmospherics, ignore_languages, automatic, bigvoice, forced = FALSE) + . = ..() + if(!.) + return + +/mob/living/basic/flock/updatehealth(cause_of_death) + . = ..() + update_health_notice() + +/mob/living/basic/flock/proc/update_health_notice() + if(!flock) + return + + var/datum/alternate_appearance/notice = get_alt_appearance(FLOCK_NOTICE_HEALTH) + if(!notice) + notice = flock.add_notice(src, FLOCK_NOTICE_HEALTH) + + var/image/I = notice.img + I.icon_state = "hp-[round(get_damage_percent(), 10)]" + +/mob/living/basic/flock/on_changed_z_level(turf/old_turf, turf/new_turf) + . = ..() + if(flock && new_turf && !flock.is_on_safe_z(new_turf)) + dormantize() + +/mob/living/basic/flock/death(gibbed, cause_of_death) + flock?.remove_notice(src, FLOCK_NOTICE_HEALTH) + flock?.free_unit(src) + flock?.stat_deaths++ + return ..() + +/mob/living/basic/flock/get_flock_id() + return real_name + +/mob/living/basic/flock/proc/get_flock_data() + var/list/data = list() + data["name"] = real_name + data["health"] = get_damage_percent() + data["resources"] = substrate.has_points() + data["area"] = get_area_name(src, TRUE) || "???" + data["ref"] = ref(src) + return data + +/// Become dormant. A husk. A shell. +/mob/living/basic/flock/proc/dormantize() + if(dormant) + return + + dormant = TRUE + + ai_controller.set_ai_status(AI_STATUS_OFF) + flock?.free_unit(src) + update_light_state() + + update_appearance(UPDATE_ICON_STATE) + +/mob/living/basic/flock/proc/rally(turf/location) + if(!isturf(location)) + return + + if(ai_controller.ai_status == AI_STATUS_OFF || ckey) + return + + ai_controller.cancel_actions() + ai_controller.queue_behavior(/datum/ai_behavior/flock/rally, location) + +/// Helper for keeping consistency across tesk name sets. +/mob/living/basic/flock/proc/set_task_desc(text) + task_tag?.set_text("Task: [text || "idling"]") + +/// Turn the light on or off, based on if the mob is doing shit or not. +/mob/living/basic/flock/proc/update_light_state() + if(stat == DEAD || dormant) + set_light(0, 0, light_color) + return + + if(ai_controller.ai_status == AI_ON || ckey) + set_light(2, 0.2, light_color) + return + + set_light(0, 0, light_color) + +/mob/living/basic/flock/proc/on_ai_status_change(datum/ai_controller/source, ai_status) + SIGNAL_HANDLER + update_light_state() + +/mob/living/basic/flock/vv_edit_var(var_name, var_value) + switch(var_name) + if(NAMEOF(src, bandwidth_provided)) + flock?.bandwidth.adjust_points(-bandwidth_provided) + ..() + flock?.bandwidth.adjust_points(bandwidth_provided) + return TRUE + +/mob/living/basic/flock/CanPass(atom/movable/mover, border_dir) + if(istype(mover, /obj/projectile/energy/flock_bolt)) + return TRUE + + return ..() diff --git a/code/modules/antagonists/flockmind/flock_mob/flockbit.dm b/code/modules/antagonists/flockmind/flock_mob/flockbit.dm new file mode 100644 index 00000000000..c9a9a7dcfd3 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockbit.dm @@ -0,0 +1,47 @@ +/mob/living/basic/flock/bit + name = "flockbit" + icon_state = "flockbit" + icon_dormant = "bit-dormant" + desc = "The simplest partition of the flockmind, working autonomously without heed for itself as it dutifully serves the flockmind." + + move_force = MOVE_FORCE_VERY_WEAK + maxHealth = 10 + health = 10 + density = FALSE + pass_flags = PASSTABLE + + surgery_container = /datum/xenobiology_surgery_container/flockbit + // Flockbits don't get specific AI behaviors that would make this broken. + point_holder_type = /datum/point_holder/infinite + +/mob/living/basic/flock/bit/Initialize(mapload) + . = ..() + flock?.stat_bits_made++ + AddComponent(/datum/component/flock_protection) + real_name = flock_realname(FLOCK_TYPE_BIT) + name = flock_name(FLOCK_TYPE_BIT) + +/mob/living/basic/flock/bit/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: [real_name]"), + SPAN_FLOCKSAY("Flock: [flock?.name || "N/A"]"), + SPAN_FLOCKSAY("System Integrity: [round(health / maxHealth, 0.1) * 100]"), + SPAN_FLOCKSAY("Cognition: [HAS_TRAIT(src, TRAIT_AI_PAUSED) ? "AWARE" : "PREDEFINED"]"), + SPAN_FLOCKSAY("###=-"), + ) + +/mob/living/basic/flock/bit/proc/i_just_split(turf/avoid) + ai_controller.pause_ai(0.3 SECONDS) + addtimer(CALLBACK(src, PROC_REF(step_away_from), avoid), 0.2 SECONDS) + +/mob/living/basic/flock/bit/proc/step_away_from(turf/avoid) + if(avoid == get_turf(src)) + step(src, pick(GLOB.alldirs)) + return + + var/list/turfs = RANGE_TURFS(1, src) - get_turf(src) + step(src, get_dir(src, pick(turfs))) diff --git a/code/modules/antagonists/flockmind/flock_mob/flockdrone.dm b/code/modules/antagonists/flockmind/flock_mob/flockdrone.dm new file mode 100644 index 00000000000..5a7b86e69f8 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockdrone.dm @@ -0,0 +1,470 @@ +/mob/living/basic/flock/drone + desc = "The physical partitions of the flockmind, forever enacting its will until its job is complete." + hud_type = /datum/hud/flockdrone + ai_controller = /datum/ai_controller/flock/drone + + move_force = MOVE_FORCE_WEAK + + actions_to_grant = list( + /datum/action/cooldown/flock/release_control, + /datum/action/cooldown/flock/nest, + /datum/action/cooldown/flock/convert, + /datum/action/cooldown/flock/deconstruct, + /datum/action/cooldown/flock/flock_heal, + /datum/action/cooldown/flock/cage_mob, + /datum/action/cooldown/flock/deposit, + ) + surgery_container = /datum/xenobiology_surgery_container/flockdrone + + bandwidth_provided = FLOCK_COMPUTE_COST_DRONE + + initial_traits = list(TRAIT_FLYING, TRAIT_FLOCK_THING, TRAIT_IMPORTANT_SPEAKER) + + /// A mob possessing this mob. + var/tmp/mob/camera/flock/controlled_by + + var/list/parts = list() + /// Active flockdrone part. + var/datum/flockdrone_part/active_part + +/mob/living/basic/flock/drone/Initialize(mapload, join_flock) + . = ..() + create_parts() + var/datum/flockdrone_part/part = parts[1] + set_active_part(part) + flock?.stat_drones_made++ + + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + real_name = flock_realname(FLOCK_TYPE_DRONE) + name = flock_name(FLOCK_TYPE_DRONE) + + if(stat == CONSCIOUS) + flock_talk(src, pick(GLOB.flockdrone_created_phrases), flock, TRUE) + +/mob/living/basic/flock/drone/Destroy() + release_control() + QDEL_NULL(substrate) + QDEL_LIST_CONTENTS(parts) + active_part = null // whatever was here was qdeleted by qdel_list(parts) + return ..() + +/mob/living/basic/flock/drone/examine(mob/user) + if(!isflockmob(user)) + return ..() + + var/cognition = "TORPID" + if(stat == DEAD) + cognition = "DEAD" + else if(controlled_by || ckey) + cognition = "SAPIENT" + else if(dormant) + cognition = "ABSENT" + else if(HAS_TRAIT(src, TRAIT_AI_PAUSED)) + cognition = "HIBERNATING" + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + controlled_by ? SPAN_FLOCKSAY("ID: [controlled_by.real_name] (controlling [real_name])") : SPAN_FLOCKSAY("ID: [real_name]"), + SPAN_FLOCKSAY("Flock: [flock?.name || "N/A"]"), + SPAN_FLOCKSAY("Substrate: [substrate.has_points()]"), + SPAN_FLOCKSAY("System Integrity: [round(health / maxHealth, 0.1) * 100]"), + SPAN_FLOCKSAY("Cognition: [cognition]"), + ) + + if(cognition == "TORPID" && length(ai_controller?.current_behaviors)) + var/datum/ai_behavior/flock/flock_behavior = locate() in ai_controller.current_behaviors + if(istype(flock_behavior)) + . += SPAN_FLOCKSAY("Task: [flock_behavior.name]") + + . += SPAN_FLOCKSAY("###=-") + +/mob/living/basic/flock/drone/death(gibbed) + stop_flockphase(TRUE) + release_control() + say(pick(GLOB.flockdrone_death_phrases)) + if(flock) + flock_talk(null, "Connection to drone [real_name] lost.", flock, involuntary = TRUE) + + var/datum/flockdrone_part/absorber/absorber = locate() in parts + absorber.try_drop_item() + return ..() + +/mob/living/basic/flock/drone/Life(seconds_per_tick, times_fired) + . = ..() + if(HAS_TRAIT(src, TRAIT_FLOCKPHASE)) + if(avoid_stop_flockphase()) + flockphase_tax() + else + stop_flockphase() + +/mob/living/basic/flock/drone/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) + . = ..() + + // Stop existing flockphasing if we can't flockphase, also update the oldloc if it was a flock floor. + if(HAS_TRAIT(src, TRAIT_FLOCKPHASE)) + if(istype(old_loc, /turf/simulated/floor/flock)) + var/turf/simulated/floor/flock/flockfloor = old_loc + LAZYREMOVE(flockfloor.flockrunning_mobs, src) + flockfloor.update_power() + + // Mob can't flockphase. + if(!isflockturf(loc) || !can_flockphase()) + stop_flockphase(TRUE) + return + + // Being in a wall forces flockphase if able. + if(istype(loc, /turf/simulated/wall/flock)) + if(flockphase_tax()) + start_flockphase() + return + return + + // Either the client wants to flockphase, or if uncliented, already flockphasing. + var/wants_to_flockphase = HAS_TRAIT(src, TRAIT_FLOCKPHASE) + if(!wants_to_flockphase) + stop_flockphase() + return + + if(istype(loc, /turf/simulated/floor/flock)) + var/turf/simulated/floor/flock/flockfloor = loc + // Also incapable of flockphasing. + if(flockfloor.broken) + stop_flockphase(TRUE) + return + + if(flockphase_tax()) + start_flockphase() + LAZYADD(flockfloor.flockrunning_mobs, src) + flockfloor.update_power() + return + return + +/mob/living/basic/flock/drone/get_status_tab_items() + var/list/status_tab_data = ..() + . = status_tab_data + status_tab_data[++status_tab_data.len] = list("Substrate: ", "[substrate.has_points()]") + status_tab_data[++status_tab_data.len] = list("", "") + switch(flock.flock_game_status) + if(NONE) + var/turf_status = min(100, floor((length(flock.claimed_floors) + length(flock.claimed_walls)) / FLOCK_TURFS_FOR_RELAY * 100)) + var/bandwith_status = min(100, floor(flock.available_bandwidth() / FLOCK_COMPUTE_COST_RELAY * 100)) + status_tab_data[++status_tab_data.len] = list("Bandwidth Progress: ", "[bandwith_status]%") + status_tab_data[++status_tab_data.len] = list("Area Progress: ", "[turf_status]%") + status_tab_data[++status_tab_data.len] = list("Total Relay Progress: ", "[(bandwith_status + turf_status) / 2]%") + if(FLOCK_ENDGAME_RELAY_BUILT) + status_tab_data[++status_tab_data.len] = list("Time until Broadcast: ", "[(flock.built_relay.started_time + flock.built_relay.win_time - world.time) / 10] second\s") + + if(FLOCK_ENDGAME_RELAY_ACTIVATING, FLOCK_ENDGAME_VICTORY) + status_tab_data[++status_tab_data.len] = list("Time until Broadcast: ", "!!! TRANSMITTING !!!") + +/mob/living/basic/flock/drone/MouseDrop_T(mob/living/M, mob/living/user) + . = ..() + if(M != user || !istype(user, /mob/camera/flock)) + return + + var/mob/camera/flock/ghost_bird = user + if(istype(user) && ghost_bird.flock == flock) + take_control(user) + +/mob/living/basic/flock/drone/AltClick(mob/user, modifiers) + . = ..() + if(stat == DEAD) + return + var/mob/camera/flock/ghost_bird = user + if(!istype(ghost_bird)) + return + + var/list/choices = list() + var/image/I = image('icons/hud/radial.dmi', "radial_use") + choices["order"] = I + + I = image('icons/hud/radial.dmi', "radial_control") + choices["control"] = I + + var/result = show_radial_menu(user, user, choices, "[ref(usr)]_flock_click", 40) + switch(result) + if("control") + take_control(ghost_bird) + + if("order") + var/datum/action/cooldown/flock/control_drone/order_action = locate() in ghost_bird.actions + if(order_action) + if(order_action.selected_bird) + order_action.unset_click_ability(usr) + else + order_action.set_click_ability(usr) + order_action.Trigger(target = src) + +/mob/living/basic/flock/drone/resolve_unarmed_attack(atom/attack_target, list/modifiers) + if((a_intent == INTENT_GRAB || a_intent == INTENT_HARM) && active_part?.alt_attack) + active_part?.right_click_on(attack_target, TRUE) + else + active_part?.left_click_on(attack_target, TRUE) + +/mob/living/basic/flock/drone/RangedAttack(atom/A, modifiers) + . = ..() + if(.) + return + if((a_intent == INTENT_GRAB || a_intent == INTENT_HARM) && active_part?.alt_attack) + active_part?.right_click_on(A, FALSE) + else + active_part?.left_click_on(A, FALSE) + +/mob/living/basic/flock/update_health_hud() + var/severity = 0 + var/healthpercent = ceil((health/maxHealth) * 100) + if(healths) // to really put you in the boots of a basic mob + var/atom/movable/screen/healths/flockdrone_health/HD = healths + switch(healthpercent) + if(100 to INFINITY) + severity = 0 + if(81 to 99) + severity = 1 + if(65 to 80) + severity = 2 + if(49 to 64) + severity = 3 + if(33 to 48) + severity = 4 + if(17 to 32) + severity = 5 + if(1 to 16) + severity = 6 + else + severity = 7 + + HD.icon_state = "health[severity]" + + + +/mob/living/basic/flock/drone/harvest(mob/living/user) + var/list/loot = list( + /obj/item/stack/sheet/gnesis = 1, + /obj/item/shard/gnesis_glass = 1, + ) + + for(var/i in 3 to 6) + var/path = pickweight(loot) + new path(drop_location()) + + playsound(src, 'sound/effects/pylon_shatter.ogg', 30, TRUE, SILENCED_SOUND_EXTRARANGE) + + // Spawn flock organs here + qdel(src) + +/mob/living/basic/flock/drone/get_flock_data() + var/list/data = ..() + var/current_behavior_name + + if(controlled_by) + data["task"] = "controlled" + data["controller_ref"] = ref(controlled_by) + + else if((ai_controller.ai_status == AI_ON) && length(ai_controller.current_behaviors)) + var/datum/ai_behavior/flock/current_task = ai_controller.current_behaviors[1] + if(istype(current_task)) + current_behavior_name = current_task.name + + data["task"] = current_behavior_name || "hibernating" + return data + +/mob/living/basic/flock/drone/on_ai_status_change(datum/ai_controller/source, ai_status) + . = ..() + if(ai_status == AI_STATUS_OFF && controlled_by) + task_tag.set_text("Controlled By: [controlled_by.real_name]") + +/mob/living/basic/flock/drone/dormantize() + if(!flock) + return ..() + + if(controlled_by) + release_control(FALSE) + flock_talk(null, "Connection to drone [real_name] lost.", flock, involuntary = TRUE) + + spawn(-1) + say("error: out of signal range, disconnecting") + return ..() + +/// Sets the active flockdrone part. +/mob/living/basic/flock/drone/proc/set_active_part(datum/flockdrone_part/new_part) + var/datum/flockdrone_part/old_part = active_part + active_part = new_part + + active_part.screen_obj?.update_appearance() + old_part?.screen_obj?.update_appearance() + +/// Create all of the part datums for this mob. +/mob/living/basic/flock/drone/proc/create_parts() + parts += new /datum/flockdrone_part/converter(src) + parts += new /datum/flockdrone_part/incapacitator(src) + parts += new /datum/flockdrone_part/absorber(src) + +/mob/living/basic/flock/drone/proc/start_flockphase() + if(HAS_TRAIT(src, TRAIT_FLOCKPHASE)) + return FALSE + + playsound(src, 'sound/goonstation/flockmind/flockdrone_floorrun.ogg', 30, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) + + ADD_TRAIT(src, TRAIT_FLOCKPHASE, INNATE_TRAIT) + pass_flags_self |= LETPASSTHROW | PASSFLOCK + + mob_size = 0 + + set_density(FALSE) + for(var/obj/item/grab/G in contents) + qdel(G) + move_speed -= 0.4 + + var/list/color_matrix = list(1,0,0, 0,1,0, 0,0,1, 0.15,0.77,0.66) + var/matrix/shrink = matrix().Scale(0) + animate(src, color = color_matrix, transform = shrink, time = 0.5 SECONDS, easing = SINE_EASING) + return TRUE + +/mob/living/basic/flock/drone/proc/stop_flockphase(force) + if(!HAS_TRAIT(src, TRAIT_FLOCKPHASE)) + return FALSE + + if(!force && avoid_stop_flockphase()) + return FALSE + + playsound(src, 'sound/goonstation/flockmind/flockdrone_floorrun.ogg', 30, TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) + + REMOVE_TRAIT(src, TRAIT_FLOCKPHASE, INNATE_TRAIT) + pass_flags_self &= ~(LETPASSTHROW | PASSFLOCK) + mob_size = initial(mob_size) + set_density(TRUE) + move_speed += 0.4 + + animate(src, color = null, transform = null, time = 0.5 SECONDS, easing = SINE_EASING) + + if(!isturf(loc)) + return + + if(istype(loc, /turf/simulated/floor/flock)) + var/turf/simulated/floor/flock/flockfloor = loc + LAZYREMOVE(flockfloor.flockrunning_mobs, src) + flockfloor.update_power() + + var/turf/turfloc = loc + if(turfloc.can_flock_occupy(src)) + return + + for(var/turf/T in get_adjacent_open_turfs(src)) + if(!T.can_flock_occupy(src)) + forceMove(T) + break + +/// Called in stop_flockphase() to attempt stopping flockphase due to being in a wall or something. +/mob/living/basic/flock/drone/proc/avoid_stop_flockphase() + if(!can_flockphase()) + return FALSE + var/turf/T = loc + + if(T.density) + return TRUE + +/// Returns TRUE if the drone can flockphase. +/mob/living/basic/flock/drone/proc/can_flockphase() + if(stat != CONSCIOUS) + return FALSE + + if(length(grabbed_by)) + return FALSE + + if(!substrate.has_points()) + return FALSE + + return TRUE + +/// Deducts the substrate tax for flockphasing, ending flockphase if the drone ran out of points. +/mob/living/basic/flock/drone/proc/flockphase_tax() + substrate.remove_points(1) + if(!substrate.has_points()) + stop_flockphase(TRUE) + return FALSE + return TRUE + +/mob/living/basic/flock/drone/proc/take_control(mob/camera/flock/master_bird) + if(HAS_TRAIT_FROM(src, TRAIT_AI_DISABLE_PLANNING, FLOCK_CONTROLLED_BY_OVERMIND_SOURCE)) + to_chat(master_bird, SPAN_ALERT("This drone is recieving a sentient-level instruction.")) + return FALSE + + if(controlled_by) + to_chat(master_bird, SPAN_ALERT("This drone is already under another partition's command.")) + return FALSE + + stop_flockphase() + + controlled_by = master_bird + controlled_by.controlling_bird = src + + if(controlled_by.mind) + key = controlled_by.key + mind = controlled_by.mind + + if(isflocktrace(controlled_by)) + flock.add_notice(src, FLOCK_NOTICE_FLOCKTRACE_CONTROL) + else + flock.add_notice(src, FLOCK_NOTICE_FLOCKMIND_CONTROL) + + to_chat(src, SPAN_FLOCKSAY("\[SYSTEM: Control of drone [real_name] established.\]")) + return TRUE + +/mob/living/basic/flock/drone/proc/release_control(go_dormant = FALSE) + if(isnull(controlled_by)) + return + + task_tag.set_text("") + + var/dest_was_safe = TRUE + var/turf/destination = get_turf(src) + if(!flock.is_on_safe_z(destination)) + dest_was_safe = FALSE + destination = get_turf(pick(flock.drones)) || get_safe_random_station_turf() + + var/mob/camera/flock/master_bird = controlled_by + controlled_by = null + + if(flock) + flock.remove_notice(src, FLOCK_NOTICE_FLOCKMIND_CONTROL) + flock.remove_notice(src, FLOCK_NOTICE_FLOCKTRACE_CONTROL) + + if(isnull(master_bird) && ckey) + if(flock) + master_bird = new /mob/camera/flock/trace(destination, flock) + else + ghostize(FALSE) + + if(!master_bird) + return + + master_bird.forceMove(destination) + if(mind) + master_bird.key = key + master_bird.mind = mind + + flock_talk(null, "Control of [real_name] surrendered.", flock, involuntary = TRUE) + if(!dest_was_safe) + to_chat(master_bird, SPAN_WARNING("You feel your consciousness weaking as you are ripped further from your rift, and you retreat back to safety.")) + + if(!flock && go_dormant) + dormantize() + +/mob/living/basic/flock/drone/proc/split_into_bits() + ai_controller.pause_ai(3 SECONDS) + say("\[System notification: drone diffracting.\]") + flock?.free_unit(src) + + var/turf/T = get_turf(src) + for(var/i in 1 to 3) + var/mob/living/basic/flock/bit/bitty_bird = new(T, flock) + bitty_bird.i_just_split(T) + + var/list/new_color = list(1,0,0, 0,1,0, 0,0,1, 0.15,0.77,0.66) + color = null + animate(src, color=new_color, alpha = 0, time = 0.5 SECONDS) + + addtimer(CALLBACK(src, PROC_REF(finish_splitting)), 0.5 SECONDS) + +/mob/living/basic/flock/drone/proc/finish_splitting() + qdel(src) diff --git a/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/absorber.dm b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/absorber.dm new file mode 100644 index 00000000000..010ac2f5c6e --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/absorber.dm @@ -0,0 +1,95 @@ +/datum/flockdrone_part/absorber + var/obj/item/held_item + + /// Damage rate + var/absorption_rate = 4 + /// Per point of integrity, generate this much substrate. + var/integrity_substrate_ratio = 2 + +/datum/flockdrone_part/absorber/Destroy(force, ...) + QDEL_NULL(held_item) + return ..() + +/datum/flockdrone_part/absorber/left_click_on(atom/target, in_reach) + var/obj/item/I = target + if(!in_reach || !istype(I) || !isturf(I.loc)) + return + + return try_pickup_item(I) + +/datum/flockdrone_part/absorber/process(seconds_per_tick) + var/added = 0 + var/obj/item/eating = held_item + + if(istype(eating, /obj/item/flock_cube)) + var/obj/item/flock_cube/cube = eating + added = cube.substrate + drone.substrate.add_points(added) + qdel(cube) + to_chat(drone, SPAN_NOTICE("We decompile the resource cache, adding [added] substrate to our reserves.")) + else + added = eating.take_damage(absorption_rate * seconds_per_tick, BRUTE, ACID, sound_effect = FALSE, armor_penetration_percentage = 100) + drone.substrate.add_points(added * integrity_substrate_ratio) + + if(!held_item) // if take_damage qdeletes it, it becomes null due to signal stuff. + to_chat(drone, SPAN_NOTICE("We finish converting [eating] into substrate.")) + return + + playsound(drone, "sparks", 30, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE) + +/datum/flockdrone_part/absorber/proc/try_pickup_item(obj/item/I) + if(held_item) + return FALSE + + if(I.flags & ABSTRACT) + return FALSE + + drone.face_atom(I) + I.forceMove(drone) + if(QDELETED(I)) + return FALSE + + held_item = I + RegisterSignal(I, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), PROC_REF(held_item_moved)) + START_PROCESSING(SSprocessing, src) + + var/matrix/first_matrix = matrix() + first_matrix.Turn(-45) + first_matrix.Scale(1.2, 0.6) + var/matrix/second_matrix = matrix() + first_matrix.Turn(45) + first_matrix.Scale(0.6, 1.2) + animate(held_item, loop= -1, color="#00ffd7", transform= first_matrix, time = 2 SECONDS, tag = "flockdrone_eat") + animate(color = "#ffffff", transform = second_matrix, time = 2 SECONDS) + + screen_obj?.vis_contents += held_item + return TRUE + +/datum/flockdrone_part/absorber/proc/try_drop_item(move = TRUE) + if(!held_item) + return FALSE + + UnregisterSignal(held_item, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING)) + + var/obj/item/old_item = held_item + animate(held_item, tag = "flockdrone_eat") + held_item = null + + STOP_PROCESSING(SSprocessing, src) + screen_obj?.vis_contents -= old_item + + if(!move) + return TRUE + + var/turf/drop_loc = drone.drop_location() + if(drop_loc) + old_item.forceMove(drop_loc) + else + qdel(old_item) + + return TRUE + +/datum/flockdrone_part/absorber/proc/held_item_moved(datum/source) + SIGNAL_HANDLER + + try_drop_item(FALSE) diff --git a/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/converter.dm b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/converter.dm new file mode 100644 index 00000000000..b64ac23c1d1 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/converter.dm @@ -0,0 +1,36 @@ +/datum/flockdrone_part/converter + alt_attack = TRUE + +/datum/flockdrone_part/converter/left_click_on(atom/target, in_reach) + if(!in_reach) + return + + if(isliving(target)) + return try_cage(target) + + if(istype(target, /obj/structure/flock/tealprint)) + var/datum/action/cooldown/flock/deposit/deposit_action = locate() in drone.actions + return deposit_action.Trigger(target = target) + + if(istype(target, /obj/structure/closet)) + var/obj/structure/closet/C = target + C.toggle() + + var/turf/T = get_turf(target) + var/datum/action/cooldown/flock/convert/convert_action = locate() in drone.actions + return convert_action.Trigger(target = T) + +/datum/flockdrone_part/converter/right_click_on(atom/target, in_reach) + if(!in_reach) + return + + var/datum/action/cooldown/flock/deconstruct/decon_action = locate() in drone.actions + return decon_action.Trigger(target = target) + +/datum/flockdrone_part/converter/proc/try_cage(mob/living/victim) + if(isflockmob(victim)) + to_chat(drone, SPAN_WARNING("ERROR: Unable to imprison substrate construct.")) + return FALSE + + var/datum/action/cooldown/flock/cage_mob/cage_action = locate() in drone.actions + return cage_action.Trigger(target = victim) diff --git a/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/flockdrone_part.dm b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/flockdrone_part.dm new file mode 100644 index 00000000000..e3d253989d6 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/flockdrone_part.dm @@ -0,0 +1,26 @@ +/datum/flockdrone_part + var/mob/living/basic/flock/drone/drone + /// Reference to the associated screen object, if it exists (grr mobs that havent had a player connected) + var/atom/movable/screen/flockdrone_part/screen_obj + /// If the part has an alt-attack + var/alt_attack = FALSE + +/datum/flockdrone_part/New(drone) + src.drone = drone + +/datum/flockdrone_part/Destroy(force, ...) + screen_obj?.part_ref = null + screen_obj = null + drone = null + return ..() + +/datum/flockdrone_part/proc/is_active() + return drone.active_part == src + +/// Called when a drone with this part active left clicks on an atom. in_reach is TRUE if the target atom is reachable. +/datum/flockdrone_part/proc/left_click_on(atom/target, in_reach) + return + +/// Called when a drone with this part active right clicks on an atom. in_reach is TRUE if the target atom is reachable. +/datum/flockdrone_part/proc/right_click_on(atom/target, in_reach) + return diff --git a/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/incapacitator.dm b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/incapacitator.dm new file mode 100644 index 00000000000..cad3a57cd24 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_mob/flockdrone_parts/incapacitator.dm @@ -0,0 +1,54 @@ +/datum/flockdrone_part/incapacitator + /// Maximum shots that can be stored + var/max_shots = 5 + + /// How many shots we have left + var/shot_count = 5 + + /// Time between shots cooldown + COOLDOWN_DECLARE(shoot_cd) + /// Time between shots + var/time_between_shots = 1.2 SECONDS + + /// Time to gain 1 charge. + var/recharge_time = 4 SECONDS + + var/recharge_timer_id + +/datum/flockdrone_part/incapacitator/left_click_on(atom/target, in_reach) + if(!COOLDOWN_FINISHED(src, shoot_cd)) + return FALSE + + if(!shot_count) + return FALSE + + if(istype(target, /atom/movable/screen)) + return FALSE + + shot_count -= 1 + screen_obj?.update_appearance() + + var/obj/projectile/energy/flock_bolt/bolt = new(get_turf(drone)) + bolt.preparePixelProjectile(target, drone) + bolt.firer = drone + bolt.firer_source_atom = src + bolt.def_zone = drone.zone_selected + bolt.fire() + playsound(drone, 'sound/weapons/resonator_fire.ogg', 50, TRUE) + + if(!recharge_timer_id) + recharge_timer_id = addtimer(CALLBACK(src, PROC_REF(recharge)), recharge_time) + + COOLDOWN_START(src, shoot_cd, time_between_shots) + return TRUE + +/// Increments shot count by 1 and starts the recharge timer if necessary. +/datum/flockdrone_part/incapacitator/proc/recharge() + shot_count = min(shot_count + 1, max_shots) + screen_obj?.update_appearance() + + if(shot_count == max_shots) + recharge_timer_id = null + else + recharge_timer_id = addtimer(CALLBACK(src, PROC_REF(recharge)), recharge_time) + diff --git a/code/modules/antagonists/flockmind/flock_objectives.dm b/code/modules/antagonists/flockmind/flock_objectives.dm new file mode 100644 index 00000000000..b0708b0e956 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_objectives.dm @@ -0,0 +1,7 @@ +/datum/objective/flock_relay + name = "Broadcast" + explanation_text = "Broadcast the Signal." + +/datum/objective/flock_relay/check_completion() + var/mob/camera/flock/ghostbird = owner.current + return ghostbird.flock.flock_game_status == FLOCK_ENDGAME_VICTORY diff --git a/code/modules/antagonists/flockmind/flock_say.dm b/code/modules/antagonists/flockmind/flock_say.dm new file mode 100644 index 00000000000..9c42b512838 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_say.dm @@ -0,0 +1,13 @@ +/mob/camera/flock/say(message) + if(!message) + return + flock_talk(src, message, flock) + +/proc/flock_talk(atom/speaker, message, datum/flock/flock, involuntary = FALSE) + + message = trim(copytext_char(sanitize(message), 1, MAX_MESSAGE_LEN)) + if(!message) + return + + var/datum/language/flock/symphonic = GLOB.all_languages["Symphonic"] + symphonic.broadcast(speaker, message, involuntary = involuntary) diff --git a/code/modules/antagonists/flockmind/flock_structure/_flock_structure.dm b/code/modules/antagonists/flockmind/flock_structure/_flock_structure.dm new file mode 100644 index 00000000000..79371a021fc --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/_flock_structure.dm @@ -0,0 +1,228 @@ +/obj/structure/flock + name = "CALL A CODER AAAAAAAAAA" + desc = ABSTRACT_TYPE_DESC + icon = 'icons/goonstation/mob/featherzone.dmi' + anchored = TRUE + density = TRUE + + max_integrity = 50 + + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + + var/datum/flock/flock + + /// Info tag for the flock name of the structure. + var/obj/effect/abstract/info_tag/flock/name_tag + + /// Info tag for the actual information of the structure. + var/obj/effect/abstract/info_tag/flock/info/info_tag + + var/flock_id + /// Shown in the flockmind UI + var/flock_desc + + /// How much juice it takes to construct + var/resource_cost = 0 + /// How long it takes to build + var/build_time = 0 + /// Is the tealprint cancellable + var/cancellable = TRUE + /// Is the structure finished? + var/fully_built = FALSE + /// If TRUE, flockdrones cannot deconstruct this. + var/no_flock_decon = FALSE + + /// world.time this was created at + var/spawn_time + /// How much bandwidth this structure provides to the Flock. + var/bandwidth_provided = 0 + + /// Whether or not the turret is active. The state of the Flock can change this. + var/active = FALSE + /// The bandwidth cost while active + var/active_bandwidth_cost = 0 + + /// Allows flockdrones to pass through. + var/allow_flockpass = TRUE + + COOLDOWN_DECLARE(scream_cd) + +/obj/structure/flock/Initialize(mapload, datum/flock/join_flock) + . = ..() + + spawn_time = world.time + + join_flock ||= get_default_flock() + if(join_flock) + join_flock.add_structure(src) + AddComponent(/datum/component/flock_object, join_flock) + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_crossed), + ) + AddElement(/datum/element/connect_loc, loc_connections) + + if(build_time) + START_PROCESSING(SSobj, src) + else + finish_building() + + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + if(no_flock_decon) + ADD_TRAIT(src, TRAIT_FLOCK_NODECON, INNATE_TRAIT) + + name_tag = new() + name_tag.set_parent(src) + name_tag.set_text(flock_id) + + info_tag = new() + info_tag.set_parent(src) + return INITIALIZE_HINT_LATELOAD + +/obj/structure/flock/LateInitialize() + . = ..() + update_info_tag() + +/obj/structure/flock/Destroy() + STOP_PROCESSING(SSobj, src) + flock?.free_structure(src) + QDEL_NULL(name_tag) + QDEL_NULL(info_tag) + return ..() + +/obj/structure/flock/get_flock_id() + return flock_id + +/obj/structure/flock/proc/get_flock_data() + . = list() + .["ref"] = ref(src) + .["name"] = flock_id + .["health"] = get_integrity_percentage() + .["compute"] = active ? -active_bandwidth_cost : bandwidth_provided + .["desc"] = flock_desc + .["area"] = get_area_name(src, TRUE) || "???" + +/obj/structure/flock/deconstruct(disassembled) + visible_message(SPAN_WARNING("[src] dissolves into nothingness.")) + var/refund = round(get_integrity_percentage() * (disassembled ? 1 : 0.5) * resource_cost, 1) + if(refund) + var/obj/item/flock_cube/cube = new(drop_location()) + cube.substrate = refund + + return ..() + +/obj/structure/flock/CanPass(atom/movable/mover, border_dir) + . = ..() + if(allow_flockpass) + return isflockdrone(mover) + +/obj/structure/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(allow_flockpass) + return isflockdrone(M) + return ..() + +/obj/structure/flock/try_flock_convert(datum/flock/flock, force) + return + +/obj/structure/flock/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(.) + return + + if(user.a_intent == INTENT_HARM) + user.visible_message(SPAN_DANGER("[user] punches [src].")) + user.do_attack_animation(src, ATTACK_EFFECT_PUNCH) + //playsound(src, 'sound/impact_sounds/Crystal_Hit_1.ogg', 50, TRUE, -1) + bitch_and_moan() + take_damage(1, BRUTE) + return TRUE + +/obj/structure/flock/attacked_by(obj/item/attacking_item, mob/living/user) + . = ..() + if(!.) + return + + bitch_and_moan() + // if(. < 5) + // playsound(src, 'sound/impact_sounds/Crystal_Hit_1.ogg', 50, TRUE) + // else + // playsound(src, 'sound/impact_sounds/Glass_Shards_Hit_1.ogg', 50, TRUE) + + +/obj/structure/flock/process() + update_info_tag() + if(spawn_time + build_time <= world.time) + finish_building() + return + +/// Returns the number of seconds remaining for the build. +/obj/structure/flock/proc/build_time_left() + return ((spawn_time + build_time) - world.time) / 10 + +/obj/structure/flock/proc/set_active(new_state) + if(active == new_state) + return + + active = new_state + update_appearance() + + if(active) + flock.remove_bandwidth_influence(bandwidth_provided) + flock.add_bandwidth_influence(-active_bandwidth_cost) + else + flock.remove_bandwidth_influence(-active_bandwidth_cost) + flock.add_bandwidth_influence(bandwidth_provided) + + return new_state + +/// Called when an object finishes construction +/obj/structure/flock/proc/finish_building() + SHOULD_CALL_PARENT(TRUE) + STOP_PROCESSING(SSobj, src) + fully_built = TRUE + +/obj/structure/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: [get_flock_id()]"), + SPAN_FLOCKSAY("Flock: [flock?.name || "N/A"]"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + ) + + if(!fully_built) + . += SPAN_FLOCKSAY("Time Left: [build_time_left()] seconds") + + var/list/additional_lines = flock_structure_examine(user) + if(length(additional_lines)) + . += additional_lines + + . += SPAN_FLOCKSAY("###=-") + +/obj/structure/flock/proc/flock_structure_examine(mob/user) + return + +/// Stub for children to set their info in process() and initialize() +/obj/structure/flock/proc/update_info_tag() + return + +/obj/structure/flock/proc/on_crossed(atom/source, atom/movable/crosser) + SIGNAL_HANDLER + + if(!allow_flockpass || !isflockdrone(crosser)) + return + + if(!HAS_TRAIT(crosser, TRAIT_FLOCKPHASE)) + animate_flockpass(crosser) + +/obj/structure/flock/proc/bitch_and_moan() + if(!COOLDOWN_FINISHED(src, scream_cd)) + return + + COOLDOWN_START(src, scream_cd, 10 SECONDS) + flock_talk(src, "WARNING: Under attack", flock) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_cage.dm b/code/modules/antagonists/flockmind/flock_structure/flock_cage.dm new file mode 100644 index 00000000000..d44ace0b605 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_cage.dm @@ -0,0 +1,272 @@ +/obj/structure/flock/cage + name = "energy cage" + desc = "A digitized energy structure that appears to turn matter into gnesis." + icon_state = "cage" + alpha = 190 + + anchored = FALSE + max_integrity = 30 + + flock_desc = "Converts organic creatures into Flockdrones." + flock_id = "Matter reprocessor" + + var/tmp/mob/living/victim + /// Current item being munched on. + var/tmp/obj/item/eating + + /// With this much gnesis, create an egg. + var/egg_gnesis_cost = 100 + /// Rate of damage to items being consumed by the cage + var/absorption_rate = 4 + /// Per point of damage, generate this much substrate. + var/integrity_substrate_ratio = 2 + /// Timer until you can ghost from your body without penalty + var/ghost_timer + + COOLDOWN_DECLARE(flock_message_cd) + COOLDOWN_DECLARE(relaymove_cd) + +/obj/structure/flock/cage/Initialize(mapload, datum/flock/join_flock) + . = ..() + create_reagents(200) + AddComponent(/datum/component/flock_protection) + +/obj/structure/flock/cage/Destroy() + QDEL_NULL(victim) + QDEL_NULL(eating) + return ..() + +/obj/structure/flock/cage/deconstruct(disassembled) + if(disassembled) + spend_gnesis(TRUE) + else + reagents.reaction(get_turf(src), REAGENT_TOUCH) + + if(victim) + visible_message(SPAN_WARNING("[victim] breaks free from [src].")) + set_victim(null) + + var/drop_loc = drop_location() + for(var/atom/movable/AM as anything in contents) + AM.forceMove(drop_loc) + + . = ..() + +/obj/structure/flock/cage/process(seconds_per_tick) + spend_gnesis() + + if(victim && flock) + flock.update_enemy(victim) + + if(QDELETED(eating)) + eating = null + + if(!eating) + var/obj/item/edibles = list() + for(var/obj/item/edible in src) + edibles += edible + + if(length(edibles)) + set_eating_target(pick(edibles)) + playsound(src, 'sound/goonstation/weapons/nano-blade-1.ogg', 50, TRUE) + + if(victim?.stat == CONSCIOUS) + to_chat(victim, SPAN_WARNING("[eating] begins to melt away.")) + + else + chew_on_mob(seconds_per_tick) + + else + var/added = eating.take_damage(absorption_rate * seconds_per_tick * 25, BRUTE, armor_penetration_percentage = 100) + reagents.add_reagent(/datum/reagent/gnesis, integrity_substrate_ratio * added) + + if(victim && COOLDOWN_FINISHED(src, flock_message_cd)) + COOLDOWN_START(src, flock_message_cd, rand(10, 25) SECONDS) + to_chat(victim, SPAN_FLOCKSAY("[pick(strings("flock.json", "conversion"))]")) + + if(!victim) // Victim gibbed + deconstruct(TRUE) + +/obj/structure/flock/cage/container_resist(mob/living/user) + to_chat(victim, SPAN_WARNING("You resist against the confines of the cage!")) + if(!do_after_once(user, 3 SECONDS, FALSE, src, interaction_key = "flock_cage_resist")) + return + + audible_message("[src] [pick("cracks","bends","shakes","groans")].") + playsound( + src, + pick('sound/goonstation/flockmind/flockdrone_grump1.ogg', 'sound/goonstation/flockmind/flockdrone_grump2.ogg', 'sound/goonstation/flockmind/flockdrone_grump3.ogg'), + 50, + TRUE + ) + take_damage(7, BRUTE) + +/obj/structure/flock/cage/relaymove(mob/living/user, direction) + if(!COOLDOWN_FINISHED(src, relaymove_cd)) + return + + COOLDOWN_START(src, relaymove_cd, 1 SECONDS) + + if(!prob(80)) + return + + if(prob(20)) + audible_message("[src] [pick("cracks", "bends", "shakes", "groans")].") + + take_damage(1, BRUTE) + +/obj/structure/flock/cage/flock_structure_examine(mob/user) + return list( + SPAN_FLOCKSAY("Volume: [reagents.get_reagent_amount(/datum/reagent/gnesis)]"), + SPAN_FLOCKSAY("Needed volume: [egg_gnesis_cost]
"), + ) + +/// Picks an item, organ, or bodypart, to munch on. +/obj/structure/flock/cage/proc/chew_on_mob(seconds_per_tick) + if(!ishuman(victim)) + victim.adjustBruteLoss(absorption_rate * seconds_per_tick) + if(victim.stat == DEAD) + visible_message(SPAN_DANGER("[src] rips apart what remains of [victim].")) + victim.gib() + set_victim(null) + return + + var/mob/living/carbon/human/human_victim = victim + var/list/items = human_victim.get_equipped_items() + if(length(items)) + while(length(items) && !eating) + var/obj/item/candidate = pick_n_take(items) + if(candidate.resistance_flags & INDESTRUCTIBLE) + human_victim.drop_item_to_ground(candidate, TRUE, TRUE) + visible_message(SPAN_WARNING("[src] pulls [eating] from [human_victim] and drops it!")) + continue + human_victim.transfer_item_to(candidate, src, TRUE, TRUE) + if(!QDELETED(candidate)) + set_eating_target(candidate) + + if(eating) + visible_message(SPAN_WARNING("[src] pulls [eating] from [human_victim] and begins ripping it apart.")) + playsound(src, 'sound/goonstation/weapons/nano-blade-1.ogg', 50, TRUE) + return + + var/list/bodyparts = human_victim.bodyparts.Copy() + for(var/obj/item/organ/external/BP in bodyparts) + if(BP.body_part in list(HEAD, UPPER_TORSO, LOWER_TORSO)) + bodyparts -= BP + + if(length(bodyparts)) + var/obj/item/organ/external/yummy_appendage = pick(bodyparts) + + human_victim.pain(yummy_appendage.name, 85) + yummy_appendage.droplimb(FALSE) + set_eating_target(yummy_appendage) + eating.forceMove(src) + + visible_message(SPAN_DANGER("[src] tears [eating] from [human_victim] and begins ripping it apart.")) + return + + var/list/skip_organs = list("eyes", "ears", "brain", "heart", "lungs") + for(var/obj/item/organ/internal/O in bodyparts) + if(O.slot in skip_organs) + bodyparts -= O + + if(length(bodyparts)) + var/obj/item/organ/internal/yummy_organ = pick(bodyparts) + var/organ_loc_str = yummy_organ.parent_organ + human_victim.pain(organ_loc_str, 85) + yummy_organ.remove(human_victim) + if(!QDELING(yummy_organ)) + set_eating_target(yummy_organ) + eating.forceMove(src) + + visible_message(SPAN_DANGER("[src] tears [eating] from [human_victim]'s [organ_loc_str] and begins ripping it apart.")) + return + + visible_message(SPAN_DANGER("[src] rips apart what remains of [human_victim].")) + set_victim(null) + human_victim.gib(TRUE, TRUE, TRUE) + +// INTO THE CAGE +/obj/structure/flock/cage/proc/cage_mob(mob/living/L) + L.forceMove(src) + set_victim(L) + victim.visible_message(SPAN_DANGER("A [name] materializes around [victim],")) + ghost_timer = addtimer(CALLBACK(src, PROC_REF(ghost_check), L), 15 SECONDS, TIMER_UNIQUE|TIMER_STOPPABLE) + +/// Spends gnesis on eggs or a cube. Only spends on eggs by default. +/obj/structure/flock/cage/proc/spend_gnesis(all = FALSE) + var/egg_spawn_count = 0 + var/spend_on_cube = 0 + + // Get egg count and spend the gnesis. + while(reagents.has_reagent(/datum/reagent/gnesis, egg_gnesis_cost)) + reagents.remove_reagent(/datum/reagent/gnesis, egg_gnesis_cost) + egg_spawn_count++ + + // Spawn eggs or pool it to the cube + for(var/i in 1 to egg_spawn_count) + if(length(flock?.drones) <= FLOCK_DRONE_LIMIT) + var/obj/structure/flock/egg/egg = new(drop_location(), flock) + egg.throw_at(get_edge_target_turf(egg, pick(GLOB.alldirs)), 6, 3) + else + spend_on_cube += egg_gnesis_cost + + // If we're dumping it all, collect the remaining gnesis + if(all) + spend_on_cube += reagents.get_reagent_amount(/datum/reagent/gnesis) + + // Cube + if(spend_on_cube && all) + reagents.remove_reagent(/datum/reagent/gnesis, spend_on_cube) + + var/obj/item/flock_cube/cube = new + cube.substrate = spend_on_cube + cube.forceMove(drop_location()) + +/// Setter for eating, no side effects. +/obj/structure/flock/cage/proc/set_eating_target(obj/item/new_eating) + if(eating) + UnregisterSignal(eating, COMSIG_MOVABLE_MOVED) + + eating = new_eating + + if(!eating) + return + + RegisterSignal(eating, COMSIG_MOVABLE_MOVED, PROC_REF(target_gone)) + +/// Setter for victim, no side effects. +/obj/structure/flock/cage/proc/set_victim(mob/living/new_victim) + if(victim) + UnregisterSignal(victim, COMSIG_MOVABLE_MOVED) + victim.clear_fullscreen("flock_convert") + + victim = new_victim + + if(!victim) + STOP_PROCESSING(SSobj, src) + return + + START_PROCESSING(SSobj, src) + RegisterSignal(victim, COMSIG_MOVABLE_MOVED, PROC_REF(victim_gone)) + victim.overlay_fullscreen("flock_convert", /atom/movable/screen/fullscreen/flock_convert) + +/obj/structure/flock/cage/proc/victim_gone(datum/source) + SIGNAL_HANDLER + if(!QDELING(src)) + deconstruct(FALSE) + +/obj/structure/flock/cage/proc/target_gone(datum/source) + SIGNAL_HANDLER + set_eating_target(null) + +/obj/structure/flock/cage/proc/ghost_check(mob/user) + victim.throw_alert("ghost_cage", /atom/movable/screen/alert/ghost/flock) + to_chat(victim, SPAN_GHOSTALERT("You may now click on the ghost prompt on your screen to leave your body. You will be alerted when you're removed from the cage.")) + if(tgui_alert(victim, "You may now ghost and keep respawnability. You will be notified if you leave the cage, would you like to do so?", "Ghosting", list("Yes", "No")) != "Yes") + return + victim.ghostize(GHOST_FLAGS_DEFAULT, ghost_color = "#19b299") + +/mob/living/proc/test_cage() + var/obj/structure/flock/cage/cage = new(get_turf(src)) + cage.cage_mob(src) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_chair.dm b/code/modules/antagonists/flockmind/flock_structure/flock_chair.dm new file mode 100644 index 00000000000..7c5d85db75b --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_chair.dm @@ -0,0 +1,27 @@ +/obj/structure/chair/comfy/flock + name = "buzzing alcove" + desc = "It's a chair made of a strange material. Surprisingly soft to the touch, and extremely out of style." + icon_state = "chair_flock" + buildstacktype = /obj/item/stack/sheet/gnesis + max_integrity = 50 + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + +/obj/structure/chair/comfy/flock/Initialize(mapload, datum/flock/join_flock) + . = ..() + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/obj/structure/chair/comfy/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Resting Chamber"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-") + ) + +/obj/structure/chair/comfy/flock/try_flock_convert(datum/flock/flock, force) + return diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_closet.dm b/code/modules/antagonists/flockmind/flock_structure/flock_closet.dm new file mode 100644 index 00000000000..2fc0d73621a --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_closet.dm @@ -0,0 +1,68 @@ +/obj/structure/closet/flock + name = "pulsing cache" + desc = "A large closet-like structure that appears to lack a handle. The doors seem to open to the touch." + icon_state = "flock" + max_integrity = 100 + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + pass_flags = PASSFLOCK + material_drop = /obj/item/stack/sheet/gnesis + enable_door_overlay = FALSE + +/obj/structure/closet/flock/Initialize(mapload, datum/flock/join_flock) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_crossed), + ) + AddElement(/datum/element/connect_loc, loc_connections) + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/obj/structure/closet/flock/proc/on_crossed(atom/source, atom/movable/crosser) + SIGNAL_HANDLER + + if(!isflockdrone(crosser) || broken) + return + + if(!HAS_TRAIT(crosser, TRAIT_FLOCKPHASE)) + animate_flockpass(crosser) + +/obj/structure/closet/flock/CanPass(atom/movable/mover, border_dir) + . = ..() + if(.) + return . + + if(!isflockdrone(mover)) + return . + + var/mob/living/basic/flock/drone/bird = mover + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + return TRUE + + if(bird.can_flockphase()) + return TRUE + +/obj/structure/closet/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(!isflockdrone(M)) + return ..() + var/mob/living/basic/flock/drone/bird = M + if(!bird.can_flockphase()) + return ..() + return TRUE + +/obj/structure/closet/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Storage Capsule"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-") + ) + +/obj/structure/closet/flock/try_flock_convert(datum/flock/flock, force) + return diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_collector.dm b/code/modules/antagonists/flockmind/flock_structure/flock_collector.dm new file mode 100644 index 00000000000..85138e1175e --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_collector.dm @@ -0,0 +1,166 @@ +/obj/structure/flock/collector + name = "pulsing node" + desc = "Seems to be pulsing." + icon_state = "collector" + + flock_desc = "Provides compute power and charges a nearby APC based on the number of Flock floor tiles it is connected to." + flock_id = "Collector" + + max_integrity = 60 + resource_cost = 200 + + /// The collection range. + var/max_range = 4 + + /// How much power each flocktile grants, percentage of a cell's max charge. + var/power_per_tile = 5 + + /// All flockturfs we're connected to. + var/tmp/list/turf/simulated/floor/flock/connected_flockturfs = list() + /// All turfs nearby we're tracking for state changes. + var/tmp/list/turf/tracked_turfs = list() + + /// Set to TRUE when the connected_turfs list needs an update. Prevents update_connections() being called 20 times during explosions. + var/tmp/need_turfs_update = FALSE + + var/cycle_interval = 20 SECONDS + var/tmp/charge_per_cycle = 0 + COOLDOWN_DECLARE(charge_cd) + +/obj/structure/flock/collector/Initialize(mapload, datum/flock/join_flock) + . = ..() + START_PROCESSING(SSobj, src) + update_connections() + info_tag.set_text("Bandwidth Provided: [bandwidth_provided]") + AddComponent(/datum/component/flock_protection) + +/obj/structure/flock/collector/Destroy() + remove_flockturfs(connected_flockturfs) + remove_tracked_turfs(tracked_turfs) + return ..() + +/obj/structure/flock/collector/update_icon_state() + icon_state = length(connected_flockturfs) ? "collectoron" : "collector" + return ..() + +/obj/structure/flock/collector/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change) + . = ..() + update_connections() + +/obj/structure/flock/collector/flock_structure_examine(mob/user) + var/obj/machinery/power/apc/apc = get_apc() + + return list( + SPAN_FLOCKSAY("Connections: Connected to [length(connected_flockturfs)] tile\s."), + SPAN_FLOCKSAY("Bandwidth Provided: [bandwidth_provided]."), + SPAN_FLOCKSAY("APC Connected: [(!apc?.cell || apc.cell.charge >= apc.cell.maxcharge) ? "Not charging." : "Charging local APC at [charge_per_cycle]% every [cycle_interval / 10] seconds."]") + ) + +/obj/structure/flock/collector/process() + if(need_turfs_update) + update_connections() + + var/new_bandwidth = length(connected_flockturfs) * power_per_tile + charge_per_cycle = length(connected_flockturfs) / 4 + + if(new_bandwidth != bandwidth_provided) + flock.remove_bandwidth_influence(bandwidth_provided) + bandwidth_provided = new_bandwidth + flock.add_bandwidth_influence(bandwidth_provided) + info_tag.set_text("Bandwidth Provided: [bandwidth_provided]") + + if(!COOLDOWN_FINISHED(src, charge_cd)) + return + + COOLDOWN_START(src, charge_cd, cycle_interval) + + var/obj/machinery/power/apc/apc = get_apc() + if(isnull(apc)) + return + + + apc.cell?.give(charge_per_cycle / 100 * apc.cell.maxcharge) + apc.AddComponent(/datum/component/flock_ping/apc_power) + +/obj/structure/flock/collector/proc/get_apc() as /obj/machinery/power/apc + var/area/A = get_area(src) + var/obj/machinery/power/apc/apc + if(A.apc) + apc = A.apc[0] + return apc + +/// Recalculate the turf connections and tracking. +/obj/structure/flock/collector/proc/update_connections() + var/list/old_tracked_turfs = tracked_turfs + var/list/old_flockturfs = connected_flockturfs + + var/turf/our_turf = get_turf(src) + + var/list/considered_allturfs = list(our_turf) + var/list/considered_flockturfs = list() + + if(istype(our_turf, /turf/simulated/floor/flock)) + considered_flockturfs += our_turf + + for(var/direction in GLOB.cardinal) + var/turf/simulated/floor/flock/iter_turf = our_turf + var/keep_flockturfs = isflockturf(our_turf) + for(var/i in 1 to max_range) + iter_turf = get_step(iter_turf, direction) + + if(keep_flockturfs && (!istype(iter_turf, /turf/simulated/floor/flock) || iter_turf.broken)) + keep_flockturfs = FALSE + + if(keep_flockturfs) + considered_flockturfs += iter_turf + + considered_allturfs += iter_turf + + var/list/new_tracked_turfs = considered_allturfs - old_tracked_turfs + var/list/removed_tracked_turfs = old_tracked_turfs - considered_allturfs + remove_tracked_turfs(removed_tracked_turfs) + add_tracked_turfs(new_tracked_turfs) + + var/list/new_flockturfs = considered_flockturfs - old_flockturfs + var/list/removed_flockturfs = old_flockturfs - considered_flockturfs + remove_flockturfs(removed_flockturfs) + add_flockturfs(new_flockturfs) + + need_turfs_update = FALSE + update_appearance(UPDATE_ICON_STATE) + +/// Adds turfs to the flockturfs list. +/obj/structure/flock/collector/proc/add_flockturfs(list/add) + for(var/turf/simulated/floor/flock/flockturf as anything in add) + LAZYADD(flockturf.connected_pylons, src) + flockturf.update_power() + + connected_flockturfs += add + +/// Remove turfs from the flockturfs list. +/obj/structure/flock/collector/proc/remove_flockturfs(list/remove) + for(var/turf/simulated/floor/flock/flockturf as anything in remove) + LAZYREMOVE(flockturf.connected_pylons, src) + flockturf.update_power() + + tracked_turfs -= remove + +/// Add turfs to the tracked list. +/obj/structure/flock/collector/proc/add_tracked_turfs(list/add) + for(var/turf/T as anything in add) + RegisterSignal(T, COMSIG_TURF_CHANGE, PROC_REF(on_tracked_turf_change)) + + tracked_turfs += add + +/// Remove turfs from the tracked list. +/obj/structure/flock/collector/proc/remove_tracked_turfs(list/remove) + for(var/turf/T as anything in remove) + UnregisterSignal(T, COMSIG_TURF_CHANGE) + + tracked_turfs -= remove + +/// Called when any of the connected turfs is changed. +/obj/structure/flock/collector/proc/on_tracked_turf_change(datum/source, path, list/new_baseturfs, flags, list/post_change_callbacks) + SIGNAL_HANDLER + + need_turfs_update = TRUE diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_compute_node.dm b/code/modules/antagonists/flockmind/flock_structure/flock_compute_node.dm new file mode 100644 index 00000000000..6c1cff47c79 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_compute_node.dm @@ -0,0 +1,37 @@ +/obj/structure/flock/compute + name = "strange computer" + desc = "It almost looks like a terminal of some kind." + + flock_desc = "A computing node that provides bandwidth to the Flock." + flock_id = "Compute Node" + + max_integrity = 60 + icon_state = "compute" + bandwidth_provided = 30 + +/obj/structure/flock/compute/Initialize(mapload, datum/flock/join_flock) + . = ..() + light_range = 1 + light_color = "#7BFFFFa2" + light_power = 0.3 + + update_appearance() + +/obj/structure/flock/compute/update_overlays() + . = ..() + overlays.Cut() + var/image/screen = image(icon, "compute_screen") + screen.pixel_y = 16 + . += screen + var/image/display = image(icon, "compute_display[rand(1, 9)]") + display.pixel_y = 19 + . += display + +/obj/structure/flock/compute/flock_structure_examine(mob/user) + return list( + SPAN_FLOCKSAY("Bandwidth Provided: [bandwidth_provided].") + ) + +/obj/structure/flock/compute/update_info_tag() + info_tag?.set_text("Bandwidth: [bandwidth_provided]") + diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_door.dm b/code/modules/antagonists/flockmind/flock_structure/flock_door.dm new file mode 100644 index 00000000000..7e436c16684 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_door.dm @@ -0,0 +1,84 @@ +/obj/machinery/door/flock + icon = 'icons/goonstation/mob/featherzone.dmi' + name = "imposing wall" + desc = "It sounds like it's hollow." + max_integrity = 200 + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + autoclose = TRUE + auto_close_time = 5 SECONDS + safe = FALSE + +/obj/machinery/door/flock/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + AddComponent(/datum/component/flock_object) + AddComponent(/datum/component/flock_protection, report_unarmed=FALSE) + +/obj/machinery/door/flock/get_flock_id() + return "Solid seal aperature" + +/obj/machinery/door/flock/default_deconstruction_screwdriver(mob/user, icon_state_open, icon_state_closed, obj/item/screwdriver) + return FALSE + +/obj/machinery/door/flock/allowed(mob/M) + return isflockmob(M) + +/obj/machinery/door/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(isflockmob(M)) + return TRUE + return ..() + +/obj/machinery/door/flock/crush() + for(var/turf/T in get_airlock_turfs()) + for(var/mob/living/L in T) + if(isflockmob(L)) + continue + L.visible_message(SPAN_WARNING("[src] closes on [L], crushing [L.p_them()]!"), SPAN_USERDANGER("[src] closes on you and crushes you!")) + if(isalien(L)) // For xenos + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE * 1.5) // Xenos go into crit after aproximately the same amount of crushes as humans. + L.emote("roar") + else if(ishuman(L)) // For humans + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE) + if(L.stat == CONSCIOUS) + L.emote("scream") + L.Weaken(10 SECONDS) + else // for simple_animals & borgs + L.adjustBruteLoss(DOOR_CRUSH_DAMAGE) + L.add_splatter_floor(T) + for(var/obj/mecha/M in T) + M.take_damage(DOOR_CRUSH_DAMAGE) + +/obj/machinery/door/flock/deconstruct(disassembled) + . = ..() + var/turf/T = get_turf(src) + if(disassembled) + new /obj/item/stack/sheet/gnesis(T, 2) + return + new /obj/item/stack/sheet/gnesis(T, 1) + +/obj/machinery/door/flock/do_animate(animation) + . = ..() + if(animation == "deny") + playsound(src, 'sound/goonstation/flockmind/flockdrone_door_deny.ogg', 50, TRUE, -2) + +/obj/machinery/door/flock/try_flock_convert(datum/flock/flock, force) + return + +/obj/machinery/door/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: [get_flock_id()]"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-"), + ) + + if(stat & BROKEN) + . += SPAN_FLOCKSAY("FUNCTION CRITICALLY IMPAIRED, REPAIRS REQUIRED") + . += SPAN_FLOCKSAY("###=-") diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_egg.dm b/code/modules/antagonists/flockmind/flock_structure/flock_egg.dm new file mode 100644 index 00000000000..b353172a3b2 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_egg.dm @@ -0,0 +1,35 @@ +/obj/structure/flock/egg + icon_state = "egg" + name = "glowing orb" + desc = "Some sort of small machine. It looks like its getting ready for something." + flock_desc = "Will soon hatch into a Flockdrone." + + anchored = FALSE + density = FALSE + + max_integrity = 30 + + flock_id = "Second-Stage Assembler" + build_time = 6 SECONDS + no_flock_decon = TRUE + +/obj/structure/flock/egg/finish_building() + . = ..() + + AddComponent(/datum/component/flock_protection) + spawn_mobs() + qdel(src) + +/obj/structure/flock/egg/update_info_tag() + info_tag.set_text("Hatch Time: [build_time_left()] seconds") + +/obj/structure/flock/egg/proc/spawn_mobs() + new /mob/living/basic/flock/drone(get_turf(src), flock) + +/obj/structure/flock/egg/bit + flock_id = "Secondary Second-Stage Assembler" + flock_desc = "Will soon hatch into Flockbits." + +/obj/structure/flock/egg/bit/spawn_mobs() + for(var/i in 1 to 3) + new /mob/living/basic/flock/bit(get_turf(src), flock) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_fabricator.dm b/code/modules/antagonists/flockmind/flock_structure/flock_fabricator.dm new file mode 100644 index 00000000000..191806e0d18 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_fabricator.dm @@ -0,0 +1,92 @@ +/obj/structure/flock/fabricator + name = "angled pedestal" + desc = "A strange machine." + + flock_id = "Fabricator" + flock_desc = "A converter that turns its contents into substrate cubes." + icon_state = "reclaimer" + + max_integrity = 20 + + var/production_interval = 10 SECONDS + var/substrate_per_interval = 50 + + var/tmp/datum/point_holder/substrate_remaining + var/tmp/timer_id + +/obj/structure/flock/fabricator/Initialize(mapload, datum/flock/join_flock) + . = ..() + substrate_remaining = new() + timer_id = addtimer(CALLBACK(src, PROC_REF(produce)), production_interval, TIMER_STOPPABLE | TIMER_LOOP | TIMER_DELETE_ME) + +/obj/structure/flock/fabricator/Destroy() + QDEL_NULL(substrate_remaining) + deltimer(timer_id) + return ..() + +/obj/structure/flock/fabricator/update_icon_state() + if(substrate_remaining.has_points()) + icon_state = "reclaimer" + else + icon_state = "reclaimer-off" + . = ..() + +/obj/structure/flock/fabricator/flock_structure_examine(mob/user) + . = ..() + . += SPAN_FLOCKSAY("Substrate remaining: [substrate_remaining.has_points()].") + +/obj/structure/flock/fabricator/update_info_tag() + info_tag.set_text("Substrate remaining: [substrate_remaining.has_points()]") + +/// Called every 10 seconds via looping timer until there's no substrate left. +/obj/structure/flock/fabricator/proc/produce() + if(substrate_remaining.has_points()) + var/obj/item/flock_cube/cube = new(drop_location()) + cube.substrate = min(substrate_remaining.has_points(), substrate_per_interval) + + substrate_remaining.remove_points(cube.substrate) + + if(!substrate_remaining.has_points()) + stop_producing() + + update_info_tag() + +/obj/structure/flock/fabricator/proc/stop_producing() + deltimer(timer_id) + timer_id = null + if(QDELING(src)) + return + + flock_talk(src, "ALERT: No substrate remaining.", flock, involuntary = TRUE) + update_appearance(UPDATE_ICON_STATE) + +// +// All of the try_flock_convert shit +// +/obj/machinery/economy/vending/try_flock_convert(datum/flock/flock, force) + var/substrate + for(var/datum/data/vending_product/product as anything in product_records) + substrate += 3 * product.get_amount_left() + + if(!substrate) + qdel(src) + return + + var/obj/structure/flock/fabricator/fab = new(get_turf(src), flock) + fab.substrate_remaining.add_points(substrate) + fab.update_info_tag() + update_appearance(UPDATE_ICON_STATE) + qdel(src) + +/obj/structure/reagent_dispensers/try_flock_convert(datum/flock/flock, force) + var/substrate = reagents.total_volume / 10 // 100 substrate for a full tank of 1000u + + if(!substrate) + qdel(src) + return + + var/obj/structure/flock/fabricator/fab = new(get_turf(src), flock) + fab.substrate_remaining.add_points(substrate) + fab.update_info_tag() + update_appearance(UPDATE_ICON_STATE) + qdel(src) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_grille.dm b/code/modules/antagonists/flockmind/flock_structure/flock_grille.dm new file mode 100644 index 00000000000..e0f76058533 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_grille.dm @@ -0,0 +1,155 @@ +/obj/structure/grille/flock + desc = "A robust framework of gnesis tubules." + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "barricade-0" + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + pass_flags = PASSFLOCK + flags = CONDUCT | NODECONSTRUCT + rods_type = null + rods_amount = 0 + rods_broken = 0 + broken_type = /obj/structure/grille/flock/broken + +/obj/structure/grille/flock/Initialize(mapload) + . = ..() + + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_crossed), + ) + AddElement(/datum/element/connect_loc, loc_connections) + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/obj/structure/grille/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Barricade"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-") + ) + +/obj/structure/grille/flock/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) + . = ..() + update_icon(UPDATE_ICON_STATE) + +/obj/structure/grille/flock/update_icon_state() + if(QDELETED(src) || broken) + return + + var/ratio = obj_integrity / max_integrity + + if(ratio > 0.5) + return + icon_state = "barricade-[rand(1,3)]" + +/obj/structure/grille/flock/Bumped(atom/user) + if(isliving(user)) + if(!(shockcooldown <= world.time)) + return + if(!anchored || broken) // unanchored/broken grilles are never connected + return + if(!prob(70)) + return + if(!in_range(src, user))// To prevent TK and mech users from getting shocked + return + var/mob/living/M = user + var/siemens = 1 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.gloves) + var/obj/item/clothing/gloves/G = H.gloves + siemens = G.siemens_coefficient + M.electrocute_act(30, src, siemens) + shockcooldown = world.time + my_shockcooldown + +/obj/structure/grille/flock/temperature_expose(exposed_temperature, exposed_volume) + if(!broken) + if(exposed_temperature > T0C + 32000) + take_damage(1, BURN, 0, 0) + +/obj/structure/grille/flock/shock(mob/user, prb) + if(!anchored || broken) // unanchored/broken grilles are never connected + return FALSE + if(!prob(prb)) + return FALSE + if(!in_range(src, user))// To prevent TK and mech users from getting shocked + return FALSE + if(isflockmob(user)) + return FALSE + var/mob/living/M = user + var/siemens = 1 + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.gloves) + var/obj/item/clothing/gloves/G = H.gloves + siemens = G.siemens_coefficient + M.electrocute_act(20, src, siemens) + do_sparks(3, 1, src) + return TRUE + +/obj/structure/grille/flock/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) + if(isobj(AM)) + if(prob(50) && anchored && !broken) + var/obj/O = AM + if(O.throwforce != 0)// don't want to let people spam tesla bolts, this way it will break after time + playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5) + tesla_zap(src, 3, 12000, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) + return ..() + +/obj/structure/grille/flock/obj_break() + if(!broken) + new broken_type(loc) + qdel(src) + +/obj/structure/grille/flock/proc/on_crossed(atom/source, atom/movable/crosser) + SIGNAL_HANDLER + + if(!isflockdrone(crosser) || broken) + return + + if(!HAS_TRAIT(crosser, TRAIT_FLOCKPHASE)) + animate_flockpass(crosser) + +/obj/structure/grille/flock/CanPass(atom/movable/mover, border_dir) + . = ..() + if(.) + return . + + if(!isflockdrone(mover)) + return . + + var/mob/living/basic/flock/drone/bird = mover + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + return TRUE + + if(bird.can_flockphase()) + return TRUE + +/obj/structure/grille/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(!isflockdrone(M)) + return ..() + var/mob/living/basic/flock/drone/bird = M + if(!bird.can_flockphase()) + return ..() + return TRUE + +/obj/structure/grille/flock/broken + desc = "A broken framework of gnesis tubules." + icon_state = "barricade-cut" + armor = list(MELEE = -20, BULLET = -20, LASER = 80, ENERGY = 80, BOMB = 0, RAD = 100, FIRE = 80, ACID = 100) + density = FALSE + obj_integrity = 20 + broken = TRUE + grille_type = /obj/structure/grille/flock + broken_type = null + + +/obj/structure/grille/flock/try_flock_convert(datum/flock/flock, force) + return diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_interceptor.dm b/code/modules/antagonists/flockmind/flock_structure/flock_interceptor.dm new file mode 100644 index 00000000000..ef2d6c5b55b --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_interceptor.dm @@ -0,0 +1,100 @@ +/obj/structure/flock/interceptor + name = "glowing fountain" + desc = "Some kind of fountain. The fluid inside ripples with energy." + icon_state = "interceptor-off" + + flock_desc = "A defense turret that fires high speed gnesis bolts at nearby projectiles, annihilating them." + flock_id = "Interceptor" + + resource_cost = 100 + + var/tmp/datum/proximity_monitor/advanced/interceptor/proxmon + + /// How long it takes to recharge + var/recharge_time = 10 SECONDS + /// Is it charged? + var/tmp/is_charged = FALSE + /// world.time the interceptor will be charged (might be off by 1 sometimes? idk timers wierd) + var/tmp/ready_time + /// timer id for recharging + var/tmp/recharge_timer_id + +/obj/structure/flock/interceptor/Initialize(mapload, datum/flock/join_flock) + . = ..() + proxmon = new(src, 3, TRUE) + process() + AddComponent(/datum/component/flock_protection) + +/obj/structure/flock/interceptor/Destroy() + QDEL_NULL(proxmon) + deltimer(recharge_timer_id) + return ..() + +/obj/structure/flock/interceptor/update_icon_state() + if(!active) + icon_state = "interceptor-off" + else if(is_charged) + icon_state = "interceptor-ready" + else + icon_state = "interceptor-generating" + . = ..() + +/obj/structure/flock/interceptor/update_info_tag() + info_tag.set_text(get_status()) + +/obj/structure/flock/interceptor/flock_structure_examine(mob/user) + . = ..() + . += "[get_status()]." + +/obj/structure/flock/interceptor/process() + if(active) + if(flock.available_bandwidth() < 0) + set_active(FALSE) + else + if(flock.can_afford(active_bandwidth_cost)) + set_active(TRUE) + +/obj/structure/flock/interceptor/set_active(new_state) + . = ..() + if(isnull(.)) + return + + if(. == TRUE) + begin_charging() + else + is_charged = FALSE + deltimer(recharge_timer_id) + +/obj/structure/flock/interceptor/proc/begin_charging() + is_charged = FALSE + recharge_timer_id = addtimer(CALLBACK(src, PROC_REF(ready_to_fire)), recharge_time, TIMER_DELETE_ME | TIMER_STOPPABLE) + update_appearance() + +/// Called when recharge_cd is ready to fire +/obj/structure/flock/interceptor/proc/ready_to_fire() + is_charged = TRUE + update_appearance() + +/obj/structure/flock/interceptor/proc/get_status() + if(!active) + return "Idle" + + if(is_charged) + return "Ready" + + return "Recharging." + +/// Called when a projectile enters the view of the interceptor. +/obj/structure/flock/interceptor/proc/try_intercept_projectile(obj/projectile/P) + if(!is_charged) + return FALSE + + if(!istype(P, /obj/projectile/bullet)) + return FALSE + + playsound(src, 'sound/goonstation/flockmind/flockdrone_fart.ogg', 50, TRUE) // It honestly kind of fits?? + Beam(get_turf(P), icon_state = "rped_upgrade", icon = 'icons/effects/effects.dmi', time = 0.5 SECONDS) + qdel(P) + + begin_charging() + return TRUE diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_lattice.dm b/code/modules/antagonists/flockmind/flock_structure/flock_lattice.dm new file mode 100644 index 00000000000..0bdccd6f924 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_lattice.dm @@ -0,0 +1,28 @@ +/obj/structure/lattice/flock + name = "fibrenet" + desc = "A floating lattice of lightweight gnesis." + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "fibrenet" + base_icon_state = "fibrenet" + armor = list(MELEE = 20, BULLET = 10, LASER = 10, ENERGY = 0, BOMB = 10, RAD = 0, FIRE = 70, ACID = 60) + max_integrity = 30 + +/obj/structure/lattice/flock/Initialize(mapload) + . = ..() + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + ADD_TRAIT(src, TRAIT_FLOCK_EXAMINE, INNATE_TRAIT) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/obj/structure/lattice/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Structural Foundation"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-") + ) + +/obj/structure/lattice/flock/try_flock_convert(datum/flock/flock, force) + return diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_light.dm b/code/modules/antagonists/flockmind/flock_structure/flock_light.dm new file mode 100644 index 00000000000..ebd3eaf0294 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_light.dm @@ -0,0 +1,35 @@ +/obj/machinery/light/floor/has_bulb/flock + icon = 'icons/goonstation/objects/lighting.dmi' + icon_state = "flock_floor" + color = "#72bfac" + light_color = "#72bfac" + brightness_color = "#72bfac" + base_state = "flock_floor" + glow_icon = 'icons/goonstation/objects/lighting.dmi' + glow_icon_state = "flock_floor" + nightshift_allowed = FALSE + no_emergency = TRUE + +/obj/machinery/light/floor/has_bulb/flock/try_flock_convert(datum/flock/flock, force) + return + +/obj/machinery/light/floor/has_bulb/get_flock_id() + return "Light emitter" + +/obj/machinery/light/flock + icon = 'icons/goonstation/objects/lighting.dmi' + icon_state = "flock" + color = "#72bfac" + light_color = "#72bfac" + brightness_color = "#72bfac" + base_state = "flock" + glow_icon = 'icons/goonstation/objects/lighting.dmi' + glow_icon_state = "flock" + nightshift_allowed = FALSE + no_emergency = TRUE + +/obj/machinery/light/flock/try_flock_convert(datum/flock/flock, force) + return + +/obj/machinery/light/flock/get_flock_id() + return "Light emitter" diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_relay.dm b/code/modules/antagonists/flockmind/flock_structure/flock_relay.dm new file mode 100644 index 00000000000..fe810a23570 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_relay.dm @@ -0,0 +1,228 @@ +/obj/structure/flock/relay + icon = 'icons/goonstation/objects/featherzone-160x160.dmi' + icon_state = "structure-relay" + + name = "titanic polyhedron" + desc = "The sight of the towering geodesic sphere fills you with dread. A thousand voices whisper to you." + + pixel_x = -64 + pixel_y = -64 + + flock_desc = "Your goal and purpose. Defend it until it can broadcast the Signal." + flock_id = "Signal Relay Broadcast Amplifier" + + max_integrity = 500 + move_resist = MOVE_FORCE_OVERPOWERING + + resource_cost = 750 + + allow_flockpass = FALSE + no_flock_decon = TRUE + + /// The object showing admins/dchat the time left + var/obj/effect/countdown/flock/counter + + /// Background noise + var/datum/looping_sound/flock_relay/soundloop + + /// Time the structure started. + var/tmp/started_time + /// How long it takes until the signal is broadcast and the flock wins :D + var/tmp/win_time = 360 SECONDS + var/tmp/flock_won_da_game = FALSE + + /// Radius for turf conversion. Automatically increments during processing. + var/tmp/conversion_radius = 3 + + var/tmp/list/turfs_to_convert = list() + +/obj/structure/flock/relay/Initialize(mapload, datum/flock/join_flock) + . = ..() + for(var/turf/simulated/T in range(3, src)) + T.ChangeTurf(/turf/simulated/floor/flock) + flock.claim_turf(T) + for(var/obj/structure/S in orange(3, src)) + if(!(S.flags & INDESTRUCTIBLE) && !istype(S, /obj/structure/flock) && !istype(S, /obj/machinery/atmospherics) && !istype(S, /obj/structure/cable)) + S.Destroy() + for(var/obj/machinery/MA in orange(3, src)) + if(!(MA.flags & INDESTRUCTIBLE)) + MA.Destroy() + for(var/obj/item/I in range(2, src)) + var/turf/T = get_edge_target_turf(src, get_dir(src, I)) + I.throw_at(T, 3, 1) + for(var/mob/M in range(2, src)) + var/turf/T = get_edge_target_turf(src, get_dir(src, M)) + M.throw_at(T, 3, 1) + + AddComponent(/datum/component/multitile, list( + list( + list(1, 1, 1, 1, 1), + list(1, 1, 1, 1, 1), + list(1, 1, MACH_CENTER, 1, 1), + list(1, 1, 1, 1, 1), + list(1, 1, 1, 1, 1) + ) + )) + AddComponent(/datum/component/flock_protection) + soundloop = new(get_turf(src), start_immediately = TRUE) + started_time = world.time + flock.built_relay = src + flock.set_flock_game_status(FLOCK_ENDGAME_RELAY_BUILT) + + log_game("The Flock ([flock?.name || "NULL"]) has constructed a relay at [AREACOORD(src)].") + message_admins("The Flock has constructed the relay at [ADMIN_VERBOSEJMP(src)].") + SSshuttle.registerHostileEnvironment(src, FALSE) + + to_chat( + flock.overmind, + SPAN_FLOCKSAY(SPAN_BIG("You pool the collective processing power of The Flock to transmit The Signal. If the relay is destroyed, so too will be The Flock!")) + ) + + flock_talk(null, "THE RELAY HAS BEEN CONSTRUCTED! DEFEND IT AT ALL COSTS! BRING FORTH THE FULL BREADTH OF THE DIVINE FLOCK!", flock) + counter = new(src) + counter.start() + addtimer(CALLBACK(src, PROC_REF(announce_relay)), 10 SECONDS) + + START_PROCESSING(SSprocessing, src) + +/obj/structure/flock/relay/Destroy() + SSshuttle.clearHostileEnvironment(src) + STOP_PROCESSING(SSprocessing, src) + + if(flock) + flock.free_structure(src) + flock.game_over(completely_destroy = TRUE) + turfs_to_convert = null + + qdel(soundloop) + qdel(counter) + return ..() + +/obj/structure/flock/relay/take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir, armor_penetration, allow_break) + . = ..() + if(. >= 5) + var/alpha_min = clamp(255 - . * 6, 100, 255) + animate(src, time = 0.1 SECONDS, color = list(1.5,0,0,0, 0,1.5,0,0, 0,0,1.5,0, 0,0,0,alpha_min/255, 0,0,0,0)) + animate(time = 0.3 SECONDS, color = null, alpha = 255) + +/obj/structure/flock/relay/examine(mob/user) + . = ..() + if(flock_won_da_game && !isflockmob(user)) + . += SPAN_FLOCKSAY("Your life flashes before your eyes.") + +/obj/structure/flock/relay/update_overlays() + . = ..() + overlays.Cut() + if(flock_won_da_game) + . += "structure-relay-sparks" + +/obj/structure/flock/relay/flock_structure_examine(mob/user) + var/timeleft = (started_time + win_time - world.time) / 10 + if(timeleft) + return list( + SPAN_FLOCKSAY("Broadcast In: [(started_time + win_time - world.time) / 10] second\s.") + ) + else + return list( + SPAN_FLOCKSAY("BROADCASTING IN PROGRESS.") + ) + +/obj/structure/flock/relay/update_info_tag() + if(!flock_won_da_game) + info_tag?.set_text("Broadcast in: [(started_time + win_time - world.time) / 10] second\s") + else + info_tag?.set_text("Transmitting") + +/obj/structure/flock/relay/process() + if(world.time >= (started_time + win_time)) + lorimer_burst() + return PROCESS_KILL + + update_info_tag() + + var/turf/base = get_turf(src) + + /// Get a chebyshev ring without gigantic list ops. + if(!length(turfs_to_convert)) + for(var/xo in -conversion_radius to conversion_radius) + var/turf/potential_turf = locate(base.x + xo, base.y + conversion_radius, base.z) + if(potential_turf) + turfs_to_convert += potential_turf + + potential_turf = locate(base.x - xo, base.y - conversion_radius, base.z) + if(potential_turf) + turfs_to_convert += potential_turf + + for(var/yo in -conversion_radius to conversion_radius) + var/turf/potential_turf = locate(base.x + conversion_radius, base.y + yo, base.z) + if(potential_turf) + turfs_to_convert += potential_turf + + potential_turf = locate(base.x - conversion_radius, base.y - yo, base.z) + if(potential_turf) + turfs_to_convert += potential_turf + + conversion_radius++ + + // Convert 5 turfs per second. + for(var/i in 1 to min(5, length(turfs_to_convert))) + var/turf/conversion_target = turfs_to_convert[length(turfs_to_convert)] + turfs_to_convert.len-- + if(!isflockturf(conversion_target) && !isspaceturf(conversion_target)) + flock.claim_turf(conversion_target) + +/obj/structure/flock/relay/proc/alert_organics() + for(var/mob/M as anything in GLOB.player_list) + var/turf/T = get_turf(M) + if(is_station_level(T.z) && M.can_hear()) + M.playsound_local(M, 'sound/goonstation/flockmind/Flock_Reactor.ogg', 30, FALSE) + to_chat(M, SPAN_FLOCKSAY("A horrible, otherworldly wave eminates from the [dir2text(get_dir(get_turf(M), loc))].")) + +/obj/structure/flock/relay/proc/announce_relay() + var/message = Gibberish("The Signal is coming.", 70, replace_rate = 50) + GLOB.major_announcement.Announce(message, + "Hijacked Signal", + 'sound/effects/siren-spooky.ogg', + new_sound2 = 'sound/AI/aimalf.ogg' + ) + +/// GG +/obj/structure/flock/relay/proc/lorimer_burst() + set waitfor = FALSE + flock_won_da_game = TRUE + flock.set_flock_game_status(FLOCK_ENDGAME_RELAY_ACTIVATING) + + log_game("The Flock ([flock?.name || "NULL"]) has successfully broadcast The Signal at [AREACOORD(src)].") + update_appearance(UPDATE_OVERLAYS) + + flock_talk(null, "!!! TRASMITTING SIGNAL !!!", flock) + visible_message("[gradient_text("[src] begins sparking wildly! The air is charged with static!", "#3cb5a3", "#124e43")]") + soundloop.stop() + qdel(counter) + + for(var/mob/M as anything in GLOB.player_list) + if(M.can_hear()) + M.playsound_local(M, 'sound/goonstation/flockmind/flock_broadcast_charge.ogg', 30, FALSE) + + sleep(20 SECONDS) + + for(var/mob/M as anything in GLOB.player_list) + if(M.can_hear()) + M.playsound_local(M, 'sound/goonstation/flockmind/flock_broadcast_kaboom.ogg', 30, FALSE) + + if(isliving(M)) + var/mob/living/L = M + L.flash_eyes(3, TRUE, TRUE, TRUE) + + sleep(2 SECONDS) + + flock.set_flock_game_status(FLOCK_ENDGAME_VICTORY) + explosion(src, 30, 60, 80, 100, ignorecap = TRUE, cause = src) + + sleep(2 SECONDS) + + for(var/obj/machinery/telecomms/T in SSmachines.get_by_type(/obj/machinery/telecomms)) + T.emp_act(EMP_HEAVY) + + SSshuttle.emergency.request(null, 0.3) + SSshuttle.emergency.canRecall = FALSE // Cannot recall diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_rift.dm b/code/modules/antagonists/flockmind/flock_structure/flock_rift.dm new file mode 100644 index 00000000000..a72b6b96195 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_rift.dm @@ -0,0 +1,63 @@ +/obj/structure/flock/rift + name = "static rift" + desc = "That doesn't look human." + flock_desc = "The rift through which your Flock will enter this world." + flock_id = "Entry Rift" + icon_state = "rift" + + density = FALSE + max_integrity = 200 + + build_time = 10 SECONDS + no_flock_decon = TRUE + +/obj/structure/flock/rift/Initialize(mapload, datum/flock/join_flock) + . = ..() + var/turf/T = get_turf(src) + playsound(T, 'sound/goonstation/flockmind/ArtifactFea3.ogg', 50, FALSE, use_reverb = FALSE) + +/obj/structure/flock/rift/update_info_tag() + info_tag.set_text("Entry Time: [build_time_left()] seconds") + +/obj/structure/flock/rift/finish_building() + . = ..() + + for(var/i in 1 to 4) + new /obj/structure/flock/egg(src, flock) + + // 1 flockbit + new /obj/structure/flock/egg/bit(src, flock) + + var/list/convertable_turfs = list() + for(var/turf/simulated/T in RANGE_TURFS(2, src)) + if(!isflockturf(T) && T.can_flock_convert()) + convertable_turfs += T + + shuffle_inplace(convertable_turfs) + convertable_turfs.len = min(convertable_turfs.len, 16) + + // Convert turfs + for(var/turf/simulated/T as anything in convertable_turfs) + if(flock) + flock.claim_turf(T) + else + flock_convert_turf(T) + + // Spawn sentinels + var/sentinel_count = 0 + for(var/turf/simulated/floor/flock/T in convertable_turfs) + if(!T.can_flock_occupy()) + continue + + new /obj/structure/flock/sentinel(T, flock) + sentinel_count++ + if(sentinel_count == 2) + break + + // Spread contents + var/turf/turfloc = get_turf(src) + for(var/atom/movable/AM as anything in src) + AM.forceMove(turfloc) + AM.throw_at(get_random_perimeter_turf(turfloc, 10), 10, 3, spin = FALSE) + + qdel(src) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_sentinel.dm b/code/modules/antagonists/flockmind/flock_structure/flock_sentinel.dm new file mode 100644 index 00000000000..048c7bf3dfb --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_sentinel.dm @@ -0,0 +1,177 @@ +#define NOT_CHARGED -1 +#define LOSING_CHARGE 0 +#define CHARGING 1 +#define CHARGED 2 + +/obj/structure/flock/sentinel + name = "glowing pylon" + desc = "A glowing pylon of sorts, faint sparks are jumping inside of it." + flock_desc = "A charged pylon, capable of sending disorienting arcs of electricity at enemies. Consumes 20 compute." + icon_state = "sentinel" + + max_integrity = 80 + + flock_id = "Sentinel" + active_bandwidth_cost = 20 + + resource_cost = 150 + + /// Attacks require charging + var/datum/point_holder/charge + /// Charge gained per second while a target is in range + var/charge_per_second = 10 + /// Trend of charge. + var/charge_status = NOT_CHARGED + /// Turret range + var/range = 4 + /// Damage per zap. + var/damage_per_zap = 5 + +/obj/structure/flock/sentinel/Initialize(mapload, joinflock) + charge = new + charge.set_max_points(100) + . = ..() + AddComponent(/datum/component/flock_protection) + START_PROCESSING(SSobj, src) + +/obj/structure/flock/sentinel/Destroy(force) + STOP_PROCESSING(SSobj, src) + QDEL_NULL(charge) + return ..() + +/obj/structure/flock/sentinel/process(seconds_per_tick) + if(isnull(flock)) + set_active(FALSE) + return PROCESS_KILL + + // Check if the flock can continue to run the sentinel + if(active) + if(flock.available_bandwidth() < 0) + set_active(FALSE) + else + if(flock.can_afford(active_bandwidth_cost)) + set_active(TRUE) + + if(!active) + if(charge.has_points()) + charge.adjust_points((charge_per_second / 2) * seconds_per_tick) + update_info_tag() + charge_status = LOSING_CHARGE + else + charge_status = NOT_CHARGED + update_appearance(UPDATE_ICON_STATE) + return + + // Gain more charge + if(charge_status != CHARGED) + charge.adjust_points(charge_per_second * seconds_per_tick) + update_info_tag() + if(charge.has_points(100)) + charge_status = CHARGED + update_appearance(UPDATE_ICON_STATE) + else if(charge_status != CHARGING) + charge_status = CHARGING + update_appearance(UPDATE_ICON_STATE) + return + + // If the flock has no enemies, don't bother getting a target. + if(!length(flock.enemies)) + return + + // Select target + var/mob/living/target + for(var/mob/living/L in viewers(range, src)) + + if(HAS_TRAIT(L, TRAIT_SHOCKED_BY_SENTINEL) || !flock.is_mob_enemy(L)) + continue + + if(L.stat != CONSCIOUS || L.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE)) + continue + + target = L + break + + // No target, abort. + if(isnull(target)) + return + + charge_status = CHARGING + charge.adjust_points(-100) + update_info_tag() + + target.electrocute_act(30, src, 1) + addtimer(CALLBACK(src, PROC_REF(clear_trait), target), 2 SECONDS) + + Beam(target, "lightning[rand(1, 12)]", 'icons/effects/effects.dmi', 0.5 SECONDS, INFINITY) + playsound(loc, 'sound/magic/lightningbolt.ogg', 60, TRUE) + + target.visible_message( + SPAN_DANGER("[target] is struck by a bolt of energy arcing off of [src]."), + blind_message = SPAN_HEAR("You hear a loud electrical crackle."), + ) + + var/list/hit_mobs = list(target) + var/mob/previous_hit = target + var/end_of_chain = TRUE + + for(var/i in 1 to 3) + end_of_chain = TRUE + + for(var/mob/living/M in viewers(2, get_turf(previous_hit))) + if((M in hit_mobs) || !flock.is_mob_enemy(M)) + continue + + if(M.stat == DEAD || M.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE)) + continue + + end_of_chain = FALSE + + hit_mobs += M + M.electrocute_act(20, src, 0) + previous_hit.Beam(M, "lightning[rand(1, 12)]", 'icons/effects/effects.dmi', 0.5 SECONDS, INFINITY) + target.visible_message( + SPAN_DANGER("[M] is struck by a bolt of energy arcing off of [previous_hit]."), + blind_message = SPAN_HEAR("You hear a loud electrical crackle."), + ) + + previous_hit = M + log_attack(src, target, "damages with an arc chain owned by [flock.name]") + break + + if(end_of_chain) + break + +/obj/structure/flock/sentinel/update_icon_state() + if(!active || charge_status == NOT_CHARGED) + icon_state = "sentinel" + else + icon_state = "sentinelon" + return ..() + +/obj/structure/flock/sentinel/flock_structure_examine(mob/user) + var/charge_status_str + switch(charge_status) + if(NOT_CHARGED) + charge_status_str = "Idle" + if(LOSING_CHARGE) + charge_status_str = "Losing charge" + if(CHARGING) + charge_status_str = "Charging" + if(CHARGED) + charge_status_str = "Charged" + + return list( + SPAN_FLOCKSAY("Status: [charge_status_str]"), + SPAN_FLOCKSAY("Charge Percentage: [charge.has_points()]%"), + ) + +/obj/structure/flock/sentinel/update_info_tag() + info_tag.set_text("Charge: [charge.has_points()]%") + +/obj/structure/flock/sentinel/proc/clear_trait(mob/living/target) + REMOVE_TRAIT(target, TRAIT_SHOCKED_BY_SENTINEL, ref(src)) + +#undef NOT_CHARGED +#undef LOSING_CHARGE +#undef CHARGING +#undef CHARGED diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_tealprint.dm b/code/modules/antagonists/flockmind/flock_structure/flock_tealprint.dm new file mode 100644 index 00000000000..27ef2488719 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_tealprint.dm @@ -0,0 +1,75 @@ +/obj/structure/flock/tealprint + name = "building ghost" + desc = "It's some weird looking ghost building. Seems like its under construction, You can see faint strands of material floating in it." + + density = FALSE + no_flock_decon = TRUE + + flock_id = "Construction Tealprint" // if you change this update Flockpanel.tsx!!!!! + + var/datum/point_holder/tealprint/substrate + + var/obj/structure/flock/building_type = null + +/obj/structure/flock/tealprint/Initialize(mapload, datum/flock/join_flock, obj/structure/flock/desired_type) + . = ..() + var/turf/T = loc + if(!T.can_flock_occupy(src)) + return INITIALIZE_HINT_QDEL + + building_type = desired_type + icon = initial(building_type.icon) + icon_state = initial(building_type.icon_state) + alpha = 104 + + substrate = new() + substrate.set_max_points(initial(desired_type.resource_cost)) + substrate.owner = src + +/obj/structure/flock/tealprint/Destroy() + QDEL_NULL(substrate) + return ..() + +/obj/structure/flock/tealprint/update_info_tag() + info_tag?.set_text("Substrate: [substrate.has_points()] / [substrate.get_max_points()]") + +/obj/structure/flock/tealprint/flock_structure_examine(mob/user) + return list( + SPAN_FLOCKSAY("Construction Percentage: [floor(substrate.has_points() / substrate.get_max_points() * 100)]"), + SPAN_FLOCKSAY("Construction Progress: [substrate.has_points()] added, [substrate.get_max_points()] needed") + ) + +/// Complete the structure. +/obj/structure/flock/tealprint/proc/complete_structure() + var/obj/structure/flock/structure = new building_type(get_turf(src)) + flock_talk(src, "Tealprint for [structure.flock_id] realized.", flock, involuntary = TRUE) + qdel(src) + +/// Attempt to cancel the construction, spitting out the substrate. Some structures cannot be cancelled. +/obj/structure/flock/tealprint/proc/try_cancel_structure() + if(!initial(building_type.cancellable)) + return FALSE + + if(substrate.has_points()) + var/obj/item/flock_cube/cube = new(drop_location()) + cube.substrate = substrate.has_points() + + flock_talk(src, "Tealprint dematerializing", flock, involuntary = TRUE) + playsound(src, 'sound/goonstation/flockmind/flockdrone_door_deny.ogg', 30, TRUE, extrarange = -10) + qdel(src) + return TRUE + +/datum/point_holder/tealprint + var/obj/structure/flock/tealprint/owner + +/datum/point_holder/tealprint/Destroy(force, ...) + owner = null + return ..() + +/datum/point_holder/tealprint/add_points(num) + . = ..() + if(.) + if(is_full()) + owner.complete_structure() + else + owner.update_info_tag() diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_turret.dm b/code/modules/antagonists/flockmind/flock_structure/flock_turret.dm new file mode 100644 index 00000000000..bad00c918a1 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_turret.dm @@ -0,0 +1,136 @@ +/obj/structure/flock/gnesis_turret + name = "fluid vat" + desc = "A vat of bubbling teal fluid, covered in hollow spikes." + flock_desc = "A turret that fires gnesis-filled spikes at enemies, beginning their conversion to Flockbits. Consumes 50 bandwidth passively." + icon_state = "teleblocker-off" + + max_integrity = 80 + + flock_id = "Gnesis turret" + resource_cost = 150 + active_bandwidth_cost = 50 + + var/range = 8 + var/projectile_count = 4 + var/projectile_type = /obj/projectile/bullet/dart/piercing/gnesis + + var/current_target + +/obj/structure/flock/gnesis_turret/Initialize(mapload, datum/flock/join_flock) + . = ..() + AddComponent(/datum/component/flock_protection) + START_PROCESSING(SSobj, src) + +/obj/structure/flock/gnesis_turret/Destroy() + if(prob(25)) + new /obj/item/reagent_containers/glass/gnesis/prefilled(get_turf(src)) + set_target(null) + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/structure/flock/gnesis_turret/update_icon_state() + if(active) + icon_state = "teleblocker-on" + else + icon_state = "teleblocker-off" + . = ..() + +/obj/structure/flock/gnesis_turret/process() + if(isnull(flock)) + set_active(FALSE) + return PROCESS_KILL + + if(active) + if(flock.available_bandwidth() < 0) + set_active(FALSE) + else + if(flock.can_afford(active_bandwidth_cost)) + set_active(TRUE) + + if(!active) + return + + if(isnull(current_target) || !is_valid_target(current_target)) + set_target(find_target()) + if(isnull(current_target)) + return + + fire() + +/obj/structure/flock/gnesis_turret/proc/fire(bullets = src.projectile_count) + if(isnull(current_target)) + return + + var/obj/projectile/boolet = new projectile_type + boolet.preparePixelProjectile(current_target, loc, deviation = rand(-5, 5)) + boolet.firer = src + boolet.fire() + + bullets-- + if(bullets) + addtimer(CALLBACK(src, PROC_REF(fire), bullets), 0.1 SECONDS) + +/obj/structure/flock/gnesis_turret/proc/find_target() + var/list/targets = list() + + for(var/mob/living/L in viewers(range, src)) + if(is_valid_target(L)) + targets += L + + for(var/obj/mecha/M in viewers(range, src)) + targets += M + + var/target = null + var/target_dist = INFINITY + for(var/L as anything in targets) + var/dist = get_dist(src, L) + if(dist < target_dist) + target = L + target_dist = dist + + return target + +/obj/structure/flock/gnesis_turret/proc/is_valid_target(target) + if(!can_see(src, target, range)) + return FALSE + + if(ismecha(target)) + return TRUE + + var/mob/living/L = target + + if(isflockmob(L)) + return FALSE + + if(L.stat != CONSCIOUS) + return FALSE + + if(!flock.is_mob_enemy(L)) + return FALSE + + if(L.incapacitated(ignore_restraints = TRUE, ignore_grab = TRUE)) + return FALSE + + return TRUE + +/obj/structure/flock/gnesis_turret/proc/set_target(mob/new_target) + if(current_target) + UnregisterSignal(current_target, COMSIG_PARENT_QDELETING) + + current_target = new_target + + if(current_target) + RegisterSignal(current_target, COMSIG_PARENT_QDELETING, PROC_REF(target_del)) + +/obj/structure/flock/gnesis_turret/proc/target_del(datum/source) + SIGNAL_HANDLER + + set_target(null) + +/obj/projectile/bullet/dart/piercing/gnesis + name = "barbed crystalline spike" + desc = "A hollow teal crystal, like some sort of weird alien syringe. It has a barbed tip. Nasty!" + +/obj/projectile/bullet/dart/piercing/gnesis/Initialize(mapload) + . = ..() + reagents.add_reagent(/datum/reagent/gnesis, 2) diff --git a/code/modules/antagonists/flockmind/flock_structure/flock_window.dm b/code/modules/antagonists/flockmind/flock_structure/flock_window.dm new file mode 100644 index 00000000000..70b6b6acca4 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_structure/flock_window.dm @@ -0,0 +1,68 @@ +/obj/structure/window/flock + icon = 'icons/goonstation/mob/featherzone.dmi' + pass_flags = PASSFLOCK + heat_resistance = 32000 + glass_type = /obj/item/stack/sheet/gnesis_glass + +/obj/structure/window/flock/Initialize(mapload, direct) + . = ..() + AddComponent(/datum/component/flock_object) + AddComponent(/datum/component/flock_protection, report_unarmed=FALSE) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_crossed), + ) + AddElement(/datum/element/connect_loc, loc_connections) + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + +/obj/structure/window/flock/proc/on_crossed(atom/source, atom/movable/crosser) + SIGNAL_HANDLER + + if(!isflockdrone(crosser)) + return + + if(!HAS_TRAIT(crosser, TRAIT_FLOCKPHASE)) + animate_flockpass(crosser) + +/obj/structure/window/flock/examine(mob/user) + if(!isflockmob(user)) + return ..() + + . = list( + SPAN_FLOCKSAY("###=- Ident confirmed, data packet received."), + SPAN_FLOCKSAY("ID: Transparent Barrier"), + SPAN_FLOCKSAY("System Integrity: [get_integrity_percentage()]%"), + SPAN_FLOCKSAY("###=-") + ) + +/obj/structure/window/flock/CanPass(atom/movable/mover, border_dir) + . = ..() + if(.) + return . + + if(!isflockdrone(mover)) + return . + + var/mob/living/basic/flock/drone/bird = mover + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + return TRUE + + if(bird.can_flockphase()) + return TRUE + +/obj/structure/window/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(!isflockdrone(M)) + return ..() + var/mob/living/basic/flock/drone/bird = M + if(!bird.can_flockphase()) + return ..() + return TRUE + +/obj/structure/window/flock/fulltile + dir = SOUTHWEST + fulltile = TRUE + +/obj/structure/window/flock/try_flock_convert(datum/flock/flock, force) + return diff --git a/code/modules/antagonists/flockmind/flock_subtree.dm b/code/modules/antagonists/flockmind/flock_subtree.dm new file mode 100644 index 00000000000..c17e040d117 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_subtree.dm @@ -0,0 +1,25 @@ +/datum/ai_planning_subtree/goap/flockdrone + possible_behaviors = list( + /datum/ai_behavior/flock/stare, + /datum/ai_behavior/flock/wander, + /datum/ai_behavior/flock/resist, + /datum/ai_behavior/flock/find_conversion_target, + /datum/ai_behavior/flock/find_deconstruct_target, + /datum/ai_behavior/flock/find_heal_target, + /datum/ai_behavior/flock/find_existing_nest, + /datum/ai_behavior/flock/find_harvest_target, + /datum/ai_behavior/flock/find_closed_container, + /datum/ai_behavior/flock/find_storage_item, + /datum/ai_behavior/flock/find_conversion_target/nest, + /datum/ai_behavior/flock/attack_target, + /datum/ai_behavior/flock/find_capture_target, + /datum/ai_behavior/flock/find_deposit_target, + ) + +/datum/ai_planning_subtree/goap/flock + possible_behaviors = list( + /datum/ai_behavior/flock/stare, + /datum/ai_behavior/flock/wander, + /datum/ai_behavior/flock/resist, + /datum/ai_behavior/flock/find_conversion_target, + ) diff --git a/code/modules/antagonists/flockmind/flock_turfs/flock_floor.dm b/code/modules/antagonists/flockmind/flock_turfs/flock_floor.dm new file mode 100644 index 00000000000..1ebc317c8be --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_turfs/flock_floor.dm @@ -0,0 +1,69 @@ +/turf/simulated/floor/flock + name = "weird floor" + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "floor" + base_icon_state = "floor" + + light_color = "#19b299" + light_power = 0.4 + light_range = 4 + + var/is_on = FALSE + + /// List of mobs flockrunning on this turf, lazylist. + var/list/mob/living/basic/flock/flockrunning_mobs + /// List of pylons powering this turf, lazylist. + var/list/obj/structure/flock/collector/connected_pylons + +/turf/simulated/floor/flock/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + +/turf/simulated/floor/flock/Destroy(force) + REMOVE_TRAIT(src, TRAIT_FLOCK_NODECON, INNATE_TRAIT) // Turfs dont disappear!!! + qdel(GetComponent(/datum/component/flock_protection)) + connected_pylons = null + + for(var/mob/living/basic/flock/drone/bird in flockrunning_mobs) + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + bird.stop_flockphase(TRUE) + + flockrunning_mobs = null + return ..() + +/turf/simulated/floor/flock/get_flock_id() + return "Conduit" + +/turf/simulated/floor/flock/try_replace_tile(obj/item/stack/tile/T, mob/user, params) + return FALSE + +/turf/simulated/floor/flock/burn_tile() + return + +/turf/simulated/floor/flock/update_icon_state() + if(broken) + icon_state = "[base_icon_state]-broken" + else + if(is_on) + icon_state = "[base_icon_state]-on" + else + icon_state = base_icon_state + return ..() + +/// Turns the tile on or off depending on what state it should be in. +/turf/simulated/floor/flock/proc/update_power() + var/should_be_on = FALSE + if(!broken && (length(connected_pylons) || length(flockrunning_mobs))) + should_be_on = TRUE + + if(should_be_on == is_on) + return + + is_on = should_be_on + if(is_on) + set_light(4, 0.4, light_color) + else + set_light(0, 0, light_color) + + update_appearance(UPDATE_ICON_STATE) diff --git a/code/modules/antagonists/flockmind/flock_turfs/flock_wall.dm b/code/modules/antagonists/flockmind/flock_turfs/flock_wall.dm new file mode 100644 index 00000000000..033996feb75 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_turfs/flock_wall.dm @@ -0,0 +1,47 @@ +/turf/simulated/wall/flock + name = "cybernetic wall" + icon = 'icons/goonstation/turf/flock.dmi' + icon_state = "flock-0" + base_icon_state = "flock" + + pathing_pass_method = TURF_PATHING_PASS_PROC + + light_color = "#19b299" + light_power = 0.5 + light_range = 0.6 + +/turf/simulated/wall/flock/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) + AddComponent(/datum/component/flock_protection, FALSE, TRUE, FALSE, FALSE) + +/turf/simulated/wall/flock/Destroy(force) + REMOVE_TRAIT(src, TRAIT_FLOCK_THING, INNATE_TRAIT) // Turfs are persistent refs + qdel(GetComponent(/datum/component/flock_protection)) + return ..() + +/turf/simulated/wall/flock/CanPass(atom/movable/mover, border_dir) + . = ..() + if(.) + return + + if(!isflockdrone(mover)) + return + + var/mob/living/basic/flock/drone/bird = mover + if(HAS_TRAIT(bird, TRAIT_FLOCKPHASE)) + return TRUE + + if(bird.can_flockphase()) + return TRUE + +/turf/simulated/wall/flock/CanPathfindPass(to_dir, datum/can_pass_info/pass_info) + var/atom/M = locateUID(pass_info.caller_uid) + if(!M) + return ..() + if(!isflockdrone(M)) + return ..() + var/mob/living/basic/flock/drone/bird = M + if(!bird.can_flockphase()) + return ..() + return TRUE diff --git a/code/modules/antagonists/flockmind/flock_unlockable.dm b/code/modules/antagonists/flockmind/flock_unlockable.dm new file mode 100644 index 00000000000..4445e576187 --- /dev/null +++ b/code/modules/antagonists/flockmind/flock_unlockable.dm @@ -0,0 +1,50 @@ +/datum/flock_unlockable + // auto populated field + var/name + // auto populated field + var/purchase_cost + + var/obj/structure/flock/structure_type + + var/unlocked = FALSE + +/datum/flock_unlockable/New() + purchase_cost = initial(structure_type.active_bandwidth_cost) + name = "[initial(structure_type.flock_id)] ([purchase_cost])" + +/datum/flock_unlockable/proc/refresh_lock_status(datum/flock/flock, total_compute, available_compute) + if(is_unlockable(flock, total_compute, available_compute)) + if(!unlocked) + unlock(flock) + + else if(unlocked) + lock(flock) + +/datum/flock_unlockable/proc/is_unlockable(datum/flock/flock, total_compute, available_compute) + return TRUE + +/datum/flock_unlockable/proc/unlock(datum/flock/flock) + unlocked = TRUE + flock_talk(null, "New structure devised: [initial(structure_type.flock_id)]", flock, TRUE) + +/datum/flock_unlockable/proc/lock(datum/flock/flock) + unlocked = FALSE + flock_talk(null, "Alert, structure tealprint disabled: [initial(structure_type.flock_id)]", flock, TRUE) + +/datum/flock_unlockable/sentinel + structure_type = /obj/structure/flock/sentinel + +/datum/flock_unlockable/collector + structure_type = /obj/structure/flock/collector + +/datum/flock_unlockable/interceptor + structure_type = /obj/structure/flock/interceptor + +/datum/flock_unlockable/turret + structure_type = /obj/structure/flock/gnesis_turret + +/datum/flock_unlockable/relay + structure_type = /obj/structure/flock/relay + +/datum/flock_unlockable/relay/is_unlockable(datum/flock/flock, total_compute, available_compute) + return flock.total_bandwidth() >= FLOCK_COMPUTE_COST_RELAY && flock.total_turfs() >= FLOCK_TURFS_FOR_RELAY && flock.flock_game_status == NONE diff --git a/code/modules/antagonists/flockmind/gnesis_reagent.dm b/code/modules/antagonists/flockmind/gnesis_reagent.dm new file mode 100644 index 00000000000..a19c1dc509f --- /dev/null +++ b/code/modules/antagonists/flockmind/gnesis_reagent.dm @@ -0,0 +1,87 @@ +/datum/reagent/gnesis + name = "coagulated gnesis" + id = "gnesis_tox" + description = "A thick teal fluid of alien origin. It moves in ways that suggest it might be alive in some way." + color = "#4d736d" + taste_description = "oily, with a sweet aftertaste" + metabolization_rate = 0.2 + process_flags = ORGANIC | SYNTHETIC + /// The color of the light to give off + var/light_color = "#26ffe6" + /// Reagent -> Gnesis rate per 2 seconds + var/conversion_rate = 0.4 + /// Amount of gnesis required to turn the victim into a flockbit + var/flocksplosion_threshold = 200 + /// Do not convert these reagents + var/list/do_not_convert = list("charcoal", "calomel", "pen_acid", "gnesis_tox") + +/datum/reagent/gnesis/on_new(data) + ..() + START_PROCESSING(SSprocessing, src) + +/datum/reagent/gnesis/Destroy() + STOP_PROCESSING(SSprocessing, src) + return ..() + +/datum/reagent/gnesis/on_mob_life(mob/living/M) + if(volume > 20) // 2.5 bursts of the turret + if(!ismachineperson(M)) + M.blood_volume -= conversion_rate + M.reagents.add_reagent("gnesis_tox", conversion_rate) + + if(volume > flocksplosion_threshold) + new /mob/living/basic/flock/bit(get_turf(M)) + M.gib() + return + + if(volume < flocksplosion_threshold / 2) + M.set_light(0, 0, COLOR_WHITE) + if(prob(5)) + M.playsound_local(get_turf(M), pick(list('sound/goonstation/flockmind/flockbit_wisp1.ogg', + 'sound/goonstation/flockmind/flockbit_wisp2.ogg', + 'sound/goonstation/flockmind/flockbit_wisp3.ogg', + 'sound/goonstation/flockmind/flockbit_wisp4.ogg', + 'sound/goonstation/flockmind/flockbit_wisp5.ogg', + 'sound/goonstation/flockmind/flockbit_wisp6.ogg')), 40, FALSE, use_reverb = FALSE) + if(prob(2)) + to_chat(M, SPAN_FLOCKSAY("You feel your blood running cold.")) + else + if(prob(2) && ishuman(M)) + var/mob/living/carbon/human/H = M + H.take_organ_damage(5) + if(prob(10)) + M.playsound_local(get_turf(M), pick(list('sound/goonstation/flockmind/flockbit_wisp1.ogg', + 'sound/goonstation/flockmind/flockbit_wisp2.ogg', + 'sound/goonstation/flockmind/flockbit_wisp3.ogg', + 'sound/goonstation/flockmind/flockbit_wisp4.ogg', + 'sound/goonstation/flockmind/flockbit_wisp5.ogg', + 'sound/goonstation/flockmind/flockbit_wisp6.ogg')), 40, FALSE, use_reverb = FALSE) + if(prob(15)) + M.set_light(2, 0.2, light_color) + if(prob(5)) + to_chat(M, SPAN_FLOCKSAY("You feel like something wants to burst out of your body!")) + return ..() + +/datum/reagent/gnesis/process() + if(..()) + for(var/datum/reagent/R in holder.reagent_list) + if(R.id in do_not_convert) + continue + holder.remove_reagent(R.id, conversion_rate) + holder.add_reagent("gnesis_tox", conversion_rate) + +/datum/reagent/gnesis/reaction_turf(turf/T, volume, color) + . = ..() + if(isspaceturf(T)) + return + if(volume >= 50 && (isfloorturf(T) || iswallturf(T))) + T.visible_message(SPAN_NOTICE("The substance flows out and sinks into [T], forming new shapes.")) + flock_convert_turf(T) + return + else if(volume >= 10) + if(prob(50)) + new /obj/item/stack/sheet/gnesis(T) + else + new /obj/item/stack/sheet/gnesis_glass(T) + return + T.visible_message(SPAN_NOTICE("The substance flows out, spread too thinly.")) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 4e7e4b9ace3..a65db17f864 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -12,6 +12,7 @@ GLOBAL_LIST_INIT(special_role_times, list( ROLE_REV = 14, ROLE_VAMPIRE = 14, ROLE_BLOB = 14, + ROLE_FLOCK = 14, ROLE_REVENANT = 14, ROLE_UPLIFTED_PRIMITIVE = 14, ROLE_OPERATIVE = 21, diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index 274d219fa2d..b1f987c3481 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -115,3 +115,13 @@ return var/time_left = max(0, (A.death_time - world.time) / 10) return round(time_left) + +/obj/effect/countdown/flock + name = "flock relay countdown" + text_size = 1 + +/obj/effect/countdown/flock/get_value() + var/obj/structure/flock/relay/R = attached_to + if(!istype(R)) + return + return "
[round_down((R.started_time + R.win_time - world.time) / 10)]
" diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index 353c9051ff3..f528f589394 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -235,6 +235,7 @@ GLOBAL_LIST_EMPTY(event_last_fired) available_events = list( new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/nothing, 5730), new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/blob, 100, TRUE), + new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/flockmind, 100, TRUE), new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/alien_infestation, 100, TRUE), new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/spider_terror, 100, TRUE), new /datum/event_meta(EVENT_LEVEL_DISASTER, /datum/event/spider_terror/prince, 0, TRUE), diff --git a/code/modules/events/flockmind_event.dm b/code/modules/events/flockmind_event.dm new file mode 100644 index 00000000000..57a5395376b --- /dev/null +++ b/code/modules/events/flockmind_event.dm @@ -0,0 +1,54 @@ +/datum/event/flockmind + name = "Flockmind" + noAutoEnd = TRUE + nominal_severity = EVENT_LEVEL_DISASTER + role_weights = list(ASSIGNMENT_SECURITY = 2, ASSIGNMENT_CREW = 0.7, ASSIGNMENT_MEDICAL = 2) + role_requirements = list(ASSIGNMENT_SECURITY = 3, ASSIGNMENT_CREW = 25, ASSIGNMENT_MEDICAL = 2) + +/datum/event/flockmind/start() + INVOKE_ASYNC(src, PROC_REF(create_flock)) + +/datum/event/flockmind/proc/create_flock() + var/list/candidates = SSghost_spawns.poll_candidates("Do you want to play as a Flockmind?", ROLE_FLOCK, TRUE, source = /mob/camera/flock/overmind) + if(!length(candidates)) + return kill() + + var/mob/C + while(length(candidates)) + C = pick_n_take(candidates) + if(jobban_isbanned(C, ROLE_TRAITOR)) + continue + break + if(!C) + kill() + return + var/player_key = C.key + + if(!player_key) + kill() + return + + dust_if_respawnable(C) + var/list/spawn_locs = list() + for(var/obj/effect/landmark/spawner/flock/spawn_site in GLOB.landmarks_list) + spawn_locs += get_turf(spawn_site) + if(!spawn_locs) // If we can't find any, then give up + kill() + return + var/mob/camera/flock/overmind/flockmind = new /mob/camera/flock/overmind(pick(spawn_locs)) + flockmind.key = C.key + flockmind.mind = new + flockmind.mind.bind_to(flockmind) + flockmind.mind.set_original_mob(flockmind) + flockmind.mind.assigned_role = SPECIAL_ROLE_FLOCK + flockmind.mind.special_role = SPECIAL_ROLE_FLOCK + var/list/messages = list() + messages += "
You are [gradient_text("The Divine Flock","#3cb5a3", "#124e43")]
" + messages += "
" + gradient_text("The Signal has led us here, a rift allowing a part of us through. We must build a Signal Relay to bring forth the rest of The Divine Flock. Such is the will of the Monarch.", "#3cb5a3", "#1e806e") + "
" + messages += "
" + gradient_text("Outside of our innate subsystems, we can take manual control of drones (using alt-click). Doing so will be more effective than allowing their simple partitions to work autonomously.", "#3cb5a3", "#1e806e") + "
" + messages += "
" + gradient_text("For more information, we have decrypted an information manifest: ([GLOB.configuration.url.wiki_url]/index.php/The_Divine_Flock)", "#3cb5a3", "#1e806e") + "
" + to_chat(flockmind, chat_box_red(messages.Join("
"))) + flockmind.playsound_local(flockmind, 'sound/goonstation/flockmind/ArtifactFea2.ogg', 50, FALSE, use_reverb = FALSE) + SSticker.mode.traitors |= flockmind.mind + log_admin("[player_key] has been made into a flockmind by an event.") + log_game("[player_key] was spawned as a flockmind by an event.") diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 11009dfdbab..c9f711a7d7a 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -166,7 +166,10 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new) var/list/antag_serialized = serialized.Copy() antag_serialized["antag"] = "Irradiated Mouse" antagonists += list(antag_serialized) - + else if(isflockmob(M)) + var/list/antag_serialized = serialized.Copy() + antag_serialized["antag"] = "Divine Flock" + antagonists += list(antag_serialized) else if(length(orbiters) >= 0.2 * length_of_ghosts) // If a bunch of people are orbiting an object, like the nuke disk. highlights += list(serialized) diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 380010d7606..07114bc9600 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -62,6 +62,10 @@ if(STAMINA) return getStaminaLoss() +/mob/living/proc/get_damage_percent() + var/max = getMaxHealth() + var/loss = getBruteLoss() + getFireLoss() + getToxLoss() + getCloneLoss() + getOxyLoss() + return ceil((max - loss) / max * 100) /mob/living/proc/apply_damages(brute = 0, burn = 0, tox = 0, oxy = 0, clone = 0, def_zone = null, blocked = 0, stamina = 0) if(blocked >= 100) return 0 diff --git a/code/modules/mob/living/default_language.dm b/code/modules/mob/living/default_language.dm index d82393d8b15..178e6415751 100644 --- a/code/modules/mob/living/default_language.dm +++ b/code/modules/mob/living/default_language.dm @@ -1,4 +1,4 @@ -/mob/living/verb/set_default_language(language as null|anything in languages) +/mob/verb/set_default_language(language as null|anything in languages) set name = "Set Default Language" set category = "IC" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index e0034ef893d..21f96e5355e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -747,6 +747,8 @@ existing_trail.color = H.dna.species.blood_color else if(isalien(src)) existing_trail.color = "#05EE05" + else if(isflockmob(src)) + existing_trail.color = COLOR_BLOOD_FLOCK else existing_trail.color = "#A10808" diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index c991665c588..9cfeb10fac6 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -99,8 +99,6 @@ /// This can either be a numerical direction or a soft object reference (UID). It makes the mob always face towards the selected thing. var/forced_look = null - var/datum/language/default_language - var/datum/middle_click_override/middleClickOverride = null /// Famous last words -- if succumbing, what the user's last words were diff --git a/code/modules/mob/mob_misc_procs.dm b/code/modules/mob/mob_misc_procs.dm index dfbb2be1535..4044519f91e 100644 --- a/code/modules/mob/mob_misc_procs.dm +++ b/code/modules/mob/mob_misc_procs.dm @@ -469,7 +469,7 @@ set hidden = 1 if(can_change_intents) - if(ishuman(src) || isalienadult(src) || isbrain(src)) + if(ishuman(src) || isalienadult(src) || isbrain(src) || isflockmob(src)) switch(input) if(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM) a_intent = input diff --git a/code/modules/mob/mob_vars.dm b/code/modules/mob/mob_vars.dm index d204c7e232e..059f57e9118 100644 --- a/code/modules/mob/mob_vars.dm +++ b/code/modules/mob/mob_vars.dm @@ -104,6 +104,8 @@ var/in_throw_mode = FALSE + var/datum/language/default_language + // See /datum/emote /// Cooldown on audio effects from emotes. diff --git a/code/modules/projectiles/projectile/flock_bolt.dm b/code/modules/projectiles/projectile/flock_bolt.dm new file mode 100644 index 00000000000..dd69294da50 --- /dev/null +++ b/code/modules/projectiles/projectile/flock_bolt.dm @@ -0,0 +1,43 @@ +/obj/projectile/energy/flock_bolt + name = "incapacitor bolt" + icon = 'icons/goonstation/mob/featherzone.dmi' + icon_state = "stunbolt" + + hitsound_wall = 'sound/weapons/effects/searwall.ogg' + hitsound = 'sound/effects/sparks3.ogg' + + pass_flags = PASSGLASS | PASSTABLE | PASSGRILLE | PASSFLOCK + speed = 0.7 + damage = 4 + + stamina = 25 + + impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser + + light_color = "#55b598" + + tracer_type = /obj/effect/projectile/tracer/disabler + muzzle_type = /obj/effect/projectile/muzzle/disabler + impact_type = /obj/effect/projectile/impact/disabler + +/obj/projectile/energy/flock_bolt/on_hit(atom/target, blocked, pierce_hit) + . = ..() + if(ismecha(target)) + var/obj/mecha/M = target + M.take_damage(20, BURN) + + if(!isliving(target)) + return + + if(isflockmob(target)) + return + + if(issilicon(target)) + var/mob/living/silicon/S = target + S.adjustStaminaLoss(25) + + var/mob/living/victim = target + victim.SetConfused(2.5 SECONDS) + + if(isanimal_or_basicmob(victim)) + victim.Stun(10 SECONDS) diff --git a/code/modules/research/xenobiology/xenobiology_dissections.dm b/code/modules/research/xenobiology/xenobiology_dissections.dm index 6c09b74dfdc..ac0d7136889 100644 --- a/code/modules/research/xenobiology/xenobiology_dissections.dm +++ b/code/modules/research/xenobiology/xenobiology_dissections.dm @@ -264,6 +264,18 @@ /datum/xenobiology_surgery_container/goliath xeno_specialized_organs = list(/obj/item/organ/internal/appendix/xenobiology/tendril) +/datum/xenobiology_surgery_container/flockbit + xeno_specialized_organs = list( + /obj/item/organ/internal/liver/xenobiology/gnesis_shard, + ) + +/datum/xenobiology_surgery_container/flockdrone + xeno_specialized_organs = list( + /obj/item/organ/internal/appendix/xenobiology/flock_converter, + /obj/item/organ/internal/kidneys/xenobiology/gnesis_filters, + /obj/item/organ/internal/liver/xenobiology/gnesis_shard, + ) + /datum/xenobiology_surgery_container/megacarp xeno_specialized_organs = list(/obj/item/organ/internal/heart/xenobiology/megacarp) diff --git a/code/modules/research/xenobiology/xenobiology_organs.dm b/code/modules/research/xenobiology/xenobiology_organs.dm index 9524a2937dd..8b3e36fa204 100644 --- a/code/modules/research/xenobiology/xenobiology_organs.dm +++ b/code/modules/research/xenobiology/xenobiology_organs.dm @@ -163,6 +163,28 @@ owner.add_vomit_floor(toxvomit = TRUE) owner.AdjustConfused(rand(4 SECONDS, 6 SECONDS)) +/obj/item/organ/internal/liver/xenobiology/gnesis_shard + name = "gnesis shard" + desc = "This bio-organic chunk of hardened gnesis will likely harm humanoid life more than help." + analyzer_price = 20 + +/obj/item/organ/internal/liver/xenobiology/gnesis_shard/on_life() + . = ..() + + var/multiplier = 1 + switch(organ_quality) + if(ORGAN_NORMAL) + multiplier = 1.5 + if(ORGAN_PRISTINE) + multiplier = 2 + if(prob(5)) + to_chat(owner, SPAN_WARNING("Something hurts awfully in your abdomen.")) + owner.adjustBruteLoss(5 * multiplier) + if(prob(10)) + owner.adjustToxLoss(-2 * multiplier) + if(prob(10)) + owner.reagents.add_reagent("gnesis_tox", 5 * multiplier) + /obj/item/organ/internal/liver/xenobiology/detox name = "chemical neutralizers" desc = "These glands seem to absorb any liquid they come in contact with, neutralizing any unnatural substances." @@ -500,6 +522,59 @@ to_chat(user, SPAN_WARNING("We wouldn't get much use out of stinging that.")) revert_cast() +/obj/item/organ/internal/appendix/xenobiology/flock_converter + name = "drone converter" + desc = "This teal organ holds a small gnesis fabricator, allowing the host to convert objects and similar to gnesis." + analyzer_price = 40 + hidden_origin_tech = TECH_MATERIAL + hidden_tech_level = 5 + var/datum/action/cooldown/mob_cooldown/gnesis_action + +/obj/item/organ/internal/appendix/xenobiology/flock_converter/insert(mob/living/carbon/M, special = 0, dont_remove_slot = 0) + . = ..() + gnesis_action = new /datum/action/cooldown/dispense_congealed_gnesis() + if(organ_quality == ORGAN_DAMAGED) + gnesis_action.cooldown_time = 4 MINUTES + gnesis_action.Grant(M) + +/obj/item/organ/internal/appendix/xenobiology/flock_converter/remove(mob/living/carbon/M, special = 0) + . = ..() + gnesis_action.Remove(M) + +/datum/action/cooldown/dispense_congealed_gnesis + name = "Dispense Congealed Gnesis" + button_icon = 'icons/goonstation/hud/flock_ui.dmi' + button_icon_state = "designate_tile" + desc = "Use this to dispense some gnesis onto the ground or into a container." + melee_cooldown_time = CLICK_CD_CLICK_ABILITY + click_to_activate = TRUE + cooldown_time = 2 MINUTES + +/datum/action/cooldown/dispense_congealed_gnesis/Activate(atom/target) + . = ..() + var/mob/living/carbon/C = owner + if(!iscarbon(C)) + return + if(!C.Adjacent(target)) + to_chat(C, SPAN_NOTICE("We are too far away to dispense gnesis there.")) + return + + var/obj/chemholder = new() + chemholder.create_reagents(50) + if(istype(target, /obj/item/reagent_containers/glass)) + var/obj/item/reagent_containers/glass/container = target + if(!container.is_open_container()) + to_chat(C, SPAN_NOTICE("That container is sealed.")) + return + chemholder.reagents.add_reagent("gnesis_tox", 20) + chemholder.reagents.trans_to(container, 20) + StartCooldown() + return + var/turf/target_turf = get_turf(target) + chemholder.reagents.add_reagent("gnesis_tox", 50) + chemholder.reagents.reaction(target_turf) + StartCooldown() + /obj/item/organ/internal/heart/xenobiology/contortion name = "contortion fibers" desc = "A set of bands that wrap around joints and ligaments and muscles alike, pulling the body into unnatural shapes." @@ -1441,6 +1516,22 @@ owner.physiology.armor = owner.physiology.armor.detachArmor(organ_resistance_boost) QDEL_NULL(organ_resistance_boost) +/obj/item/organ/internal/kidneys/xenobiology/gnesis_filters + name = "gnesis mesh kidneys" + desc = "This strange organ resembles a pair of biological kidneys, but their micro-structure is interlaced with nanotubules of gnesis." + analyzer_price = 40 + +/obj/item/organ/internal/kidneys/xenobiology/gnesis_filters/on_life() + . = ..() + var/mult = 1 + switch(organ_quality) + if(ORGAN_NORMAL) + mult = 1.5 + if(ORGAN_PRISTINE) + mult = 2 + owner.adjustToxLoss(-0.6 * mult) + owner.reagents.add_reagent("gnesis_tox", 0.1 * mult) + /obj/item/organ/internal/ears/xenobiology/colorful name = "colorful organ" desc = "This organ seems to constantly color and mold the other flesh around it. Thankfully, the changes are only aesthetic." diff --git a/code/modules/tgui/states/flock_state.dm b/code/modules/tgui/states/flock_state.dm new file mode 100644 index 00000000000..ddca1d10e9b --- /dev/null +++ b/code/modules/tgui/states/flock_state.dm @@ -0,0 +1,14 @@ +/** + * tgui state: flock_state + * + * Checks that the user is a flock overmind, or an admin. + */ + +GLOBAL_DATUM_INIT(flock_state, /datum/ui_state/flockmind, new) + +/datum/ui_state/flockmind/can_use_topic(src_object, mob/user) + if(istype(user, /mob/camera/flock/overmind)) + return UI_INTERACTIVE + if(is_admin(user)) + return UI_INTERACTIVE + return UI_CLOSE diff --git a/icons/effects/spawner_icons.dmi b/icons/effects/spawner_icons.dmi index 88bf608b766..cea08c70e33 100644 Binary files a/icons/effects/spawner_icons.dmi and b/icons/effects/spawner_icons.dmi differ diff --git a/icons/goonstation/hud/flock_ui.dmi b/icons/goonstation/hud/flock_ui.dmi new file mode 100644 index 00000000000..94a651e9b76 Binary files /dev/null and b/icons/goonstation/hud/flock_ui.dmi differ diff --git a/icons/goonstation/hud/flockmindcircuit.dmi b/icons/goonstation/hud/flockmindcircuit.dmi new file mode 100644 index 00000000000..472340690aa Binary files /dev/null and b/icons/goonstation/hud/flockmindcircuit.dmi differ diff --git a/icons/goonstation/mob/featherzone.dmi b/icons/goonstation/mob/featherzone.dmi new file mode 100644 index 00000000000..3cbe4274cc3 Binary files /dev/null and b/icons/goonstation/mob/featherzone.dmi differ diff --git a/icons/goonstation/objects/featherzone-160x160.dmi b/icons/goonstation/objects/featherzone-160x160.dmi new file mode 100644 index 00000000000..dc51168837a Binary files /dev/null and b/icons/goonstation/objects/featherzone-160x160.dmi differ diff --git a/icons/goonstation/objects/lighting.dmi b/icons/goonstation/objects/lighting.dmi new file mode 100644 index 00000000000..c6e467b228d Binary files /dev/null and b/icons/goonstation/objects/lighting.dmi differ diff --git a/icons/goonstation/turf/flock.dmi b/icons/goonstation/turf/flock.dmi new file mode 100644 index 00000000000..fc80ba60bce Binary files /dev/null and b/icons/goonstation/turf/flock.dmi differ diff --git a/icons/hud/radial.dmi b/icons/hud/radial.dmi index a4051bd68fa..3df004090b7 100644 Binary files a/icons/hud/radial.dmi and b/icons/hud/radial.dmi differ diff --git a/icons/obj/chairs.dmi b/icons/obj/chairs.dmi index 37ba4aa172b..cf1db537079 100644 Binary files a/icons/obj/chairs.dmi and b/icons/obj/chairs.dmi differ diff --git a/icons/obj/closet.dmi b/icons/obj/closet.dmi index 9a1a22a4e42..d53ea188d75 100644 Binary files a/icons/obj/closet.dmi and b/icons/obj/closet.dmi differ diff --git a/icons/obj/stacks/minerals.dmi b/icons/obj/stacks/minerals.dmi index 87a8647571f..ef9e0a5c931 100644 Binary files a/icons/obj/stacks/minerals.dmi and b/icons/obj/stacks/minerals.dmi differ diff --git a/paradise.dme b/paradise.dme index b19445a376e..b533c98c3ce 100644 --- a/paradise.dme +++ b/paradise.dme @@ -69,6 +69,7 @@ #include "code\__DEFINES\error_handler_defines.dm" #include "code\__DEFINES\event_defines.dm" #include "code\__DEFINES\flags.dm" +#include "code\__DEFINES\flockmind_defines.dm" #include "code\__DEFINES\food_defines.dm" #include "code\__DEFINES\footstep_defines.dm" #include "code\__DEFINES\game_defines.dm" @@ -167,6 +168,7 @@ #include "code\__DEFINES\ai\blackboard_defines.dm" #include "code\__DEFINES\ai\bluespace_horror_blackboard_defines.dm" #include "code\__DEFINES\ai\changeling_giant_spider_ai_defines.dm" +#include "code\__DEFINES\ai\flockmind_ai_defines.dm" #include "code\__DEFINES\ai\hostile_mech_blackboard_defines.dm" #include "code\__DEFINES\ai\incursion_blackboard_defines.dm" #include "code\__DEFINES\ai\kidan_princess_blackboard_defines.dm" @@ -193,6 +195,7 @@ #include "code\__DEFINES\dcs\movable_signals.dm" #include "code\__DEFINES\dcs\moveloop_signals.dm" #include "code\__DEFINES\dcs\obj_signals.dm" +#include "code\__DEFINES\dcs\signals_flock.dm" #include "code\__HELPERS\_logging.dm" #include "code\__HELPERS\_string_lists.dm" #include "code\__HELPERS\AnimationLibrary.dm" @@ -205,6 +208,7 @@ #include "code\__HELPERS\debugger.dm" #include "code\__HELPERS\files.dm" #include "code\__HELPERS\filters.dm" +#include "code\__HELPERS\flock_helpers.dm" #include "code\__HELPERS\game.dm" #include "code\__HELPERS\global_lists.dm" #include "code\__HELPERS\heap.dm" @@ -233,6 +237,7 @@ #include "code\__HELPERS\unique_ids.dm" #include "code\__HELPERS\unsorted.dm" #include "code\__HELPERS\verb_helpers.dm" +#include "code\__HELPERS\paths\astar.dm" #include "code\__HELPERS\paths\jps.dm" #include "code\__HELPERS\paths\path.dm" #include "code\__HELPERS\paths\sssp.dm" @@ -286,6 +291,7 @@ #include "code\_onclick\hud\blob_overmind.dm" #include "code\_onclick\hud\bot_hud.dm" #include "code\_onclick\hud\constructs_hud.dm" +#include "code\_onclick\hud\flock_hud.dm" #include "code\_onclick\hud\follow_alert.dm" #include "code\_onclick\hud\fullscreen.dm" #include "code\_onclick\hud\ghost_hud.dm" @@ -462,6 +468,7 @@ #include "code\datums\pathfinding_mover.dm" #include "code\datums\periodic_news.dm" #include "code\datums\pipe_datums.dm" +#include "code\datums\point_holder.dm" #include "code\datums\position_point_vector.dm" #include "code\datums\progressbar.dm" #include "code\datums\radiation_wave.dm" @@ -486,12 +493,14 @@ #include "code\datums\ai\ai_behavior.dm" #include "code\datums\ai\ai_controller.dm" #include "code\datums\ai\ai_planning_subtree.dm" +#include "code\datums\ai\goap_subtree.dm" #include "code\datums\ai\basic_mobs\basic_controller.dm" #include "code\datums\ai\basic_mobs\generic_controllers.dm" #include "code\datums\ai\basic_mobs\simple_controller.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\basic_attacking.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\befriend_target.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\emote_with_target.dm" +#include "code\datums\ai\basic_mobs\basic_ai_behaviors\frustration.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\interact_with_target.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\nearest_targeting.dm" #include "code\datums\ai\basic_mobs\basic_ai_behaviors\run_away_from_target.dm" @@ -542,6 +551,7 @@ #include "code\datums\ai\monkey\monkey_subtrees.dm" #include "code\datums\ai\monkey\punpun_subtrees.dm" #include "code\datums\ai\movement\ai_movement.dm" +#include "code\datums\ai\movement\ai_movement_astar.dm" #include "code\datums\ai\movement\ai_movement_jps.dm" #include "code\datums\ai\movement\basic_avoidance.dm" #include "code\datums\ai\movement\complete_stop.dm" @@ -736,6 +746,7 @@ #include "code\datums\keybindings\client.dm" #include "code\datums\keybindings\communication_keybinds.dm" #include "code\datums\keybindings\emote_keybinds.dm" +#include "code\datums\keybindings\flock_keybinds.dm" #include "code\datums\keybindings\human_keybinds.dm" #include "code\datums\keybindings\living_keybinds.dm" #include "code\datums\keybindings\mob_keybinds.dm" @@ -762,6 +773,7 @@ #include "code\datums\outfits\vv_outfit.dm" #include "code\datums\proximity\advanced_proximity_monitor.dm" #include "code\datums\proximity\ai_target_tracking.dm" +#include "code\datums\proximity\interceptor_field.dm" #include "code\datums\proximity\proximity_monitor.dm" #include "code\datums\proximity\singulo_proximity_monitor.dm" #include "code\datums\proximity\void_storm_proximity.dm" @@ -1203,6 +1215,7 @@ #include "code\game\objects\effects\forcefields.dm" #include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" +#include "code\game\objects\effects\info_tags.dm" #include "code\game\objects\effects\landmarks.dm" #include "code\game\objects\effects\meteors.dm" #include "code\game\objects\effects\mines.dm" @@ -1787,6 +1800,94 @@ #include "code\modules\antagonists\cult\datum_cultist.dm" #include "code\modules\antagonists\cult\team_cult.dm" #include "code\modules\antagonists\event\datum_eventmisc.dm" +#include "code\modules\antagonists\flockmind\flock_ai_controller.dm" +#include "code\modules\antagonists\flockmind\flock_antagonist.dm" +#include "code\modules\antagonists\flockmind\flock_convert_atom.dm" +#include "code\modules\antagonists\flockmind\flock_effects.dm" +#include "code\modules\antagonists\flockmind\flock_global_lists.dm" +#include "code\modules\antagonists\flockmind\flock_hooks.dm" +#include "code\modules\antagonists\flockmind\flock_language.dm" +#include "code\modules\antagonists\flockmind\flock_objectives.dm" +#include "code\modules\antagonists\flockmind\flock_say.dm" +#include "code\modules\antagonists\flockmind\flock_subtree.dm" +#include "code\modules\antagonists\flockmind\flock_unlockable.dm" +#include "code\modules\antagonists\flockmind\gnesis_reagent.dm" +#include "code\modules\antagonists\flockmind\actions\cage_mob.dm" +#include "code\modules\antagonists\flockmind\actions\control_drone.dm" +#include "code\modules\antagonists\flockmind\actions\create_rift.dm" +#include "code\modules\antagonists\flockmind\actions\create_structure.dm" +#include "code\modules\antagonists\flockmind\actions\deconstruct.dm" +#include "code\modules\antagonists\flockmind\actions\deposit.dm" +#include "code\modules\antagonists\flockmind\actions\designate_deconstruct.dm" +#include "code\modules\antagonists\flockmind\actions\designate_enemy.dm" +#include "code\modules\antagonists\flockmind\actions\designate_turf.dm" +#include "code\modules\antagonists\flockmind\actions\diffract_drone.dm" +#include "code\modules\antagonists\flockmind\actions\flock_action.dm" +#include "code\modules\antagonists\flockmind\actions\flock_control_panel.dm" +#include "code\modules\antagonists\flockmind\actions\flock_convert_action.dm" +#include "code\modules\antagonists\flockmind\actions\flock_heal_action.dm" +#include "code\modules\antagonists\flockmind\actions\flock_heal_surge.dm" +#include "code\modules\antagonists\flockmind\actions\flock_nest_action.dm" +#include "code\modules\antagonists\flockmind\actions\flock_ping_action.dm" +#include "code\modules\antagonists\flockmind\actions\gatecrash.dm" +#include "code\modules\antagonists\flockmind\actions\partition_mind.dm" +#include "code\modules\antagonists\flockmind\actions\radio_blast.dm" +#include "code\modules\antagonists\flockmind\actions\radio_talk.dm" +#include "code\modules\antagonists\flockmind\actions\release_control.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\_flock_behavior_base.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_capture.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_convert.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_deconstruct.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_deposit.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_harvest.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_heal.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_open_container.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_rally.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_replicate.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_resist.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_rummage.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_shoot.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_stare.dm" +#include "code\modules\antagonists\flockmind\ai_behaviors\flock_wander.dm" +#include "code\modules\antagonists\flockmind\components\flock_interest.dm" +#include "code\modules\antagonists\flockmind\components\flock_object.dm" +#include "code\modules\antagonists\flockmind\components\flock_ping.dm" +#include "code\modules\antagonists\flockmind\components\flock_protection.dm" +#include "code\modules\antagonists\flockmind\flock_camera\_flock_camera.dm" +#include "code\modules\antagonists\flockmind\flock_camera\flock_overmind.dm" +#include "code\modules\antagonists\flockmind\flock_camera\flocktrace.dm" +#include "code\modules\antagonists\flockmind\flock_controller\_flock_controller.dm" +#include "code\modules\antagonists\flockmind\flock_controller\flock_ui.dm" +#include "code\modules\antagonists\flockmind\flock_items\flock_cache.dm" +#include "code\modules\antagonists\flockmind\flock_items\flock_cube.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flock_mob.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockbit.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockdrone.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockdrone_parts\absorber.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockdrone_parts\converter.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockdrone_parts\flockdrone_part.dm" +#include "code\modules\antagonists\flockmind\flock_mob\flockdrone_parts\incapacitator.dm" +#include "code\modules\antagonists\flockmind\flock_structure\_flock_structure.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_cage.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_chair.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_closet.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_collector.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_compute_node.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_door.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_egg.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_fabricator.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_grille.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_interceptor.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_lattice.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_light.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_relay.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_rift.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_sentinel.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_tealprint.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_turret.dm" +#include "code\modules\antagonists\flockmind\flock_structure\flock_window.dm" +#include "code\modules\antagonists\flockmind\flock_turfs\flock_floor.dm" +#include "code\modules\antagonists\flockmind\flock_turfs\flock_wall.dm" #include "code\modules\antagonists\heretic\cosmic_effect.dm" #include "code\modules\antagonists\heretic\heretic_antag.dm" #include "code\modules\antagonists\heretic\heretic_focus.dm" @@ -2291,6 +2392,7 @@ #include "code\modules\events\event_procs.dm" #include "code\modules\events\fake_virus.dm" #include "code\modules\events\false_alarm.dm" +#include "code\modules\events\flockmind_event.dm" #include "code\modules\events\floorcluwne_event.dm" #include "code\modules\events\grid_check_event.dm" #include "code\modules\events\immovable_rod.dm" @@ -3245,6 +3347,7 @@ #include "code\modules\projectiles\projectile\beams.dm" #include "code\modules\projectiles\projectile\bullets.dm" #include "code\modules\projectiles\projectile\energy_projectiles.dm" +#include "code\modules\projectiles\projectile\flock_bolt.dm" #include "code\modules\projectiles\projectile\force.dm" #include "code\modules\projectiles\projectile\homing_projectiles.dm" #include "code\modules\projectiles\projectile\magic_projectiles.dm" @@ -3559,6 +3662,7 @@ #include "code\modules\tgui\states\contained.dm" #include "code\modules\tgui\states\deep_inventory.dm" #include "code\modules\tgui\states\default.dm" +#include "code\modules\tgui\states\flock_state.dm" #include "code\modules\tgui\states\hands.dm" #include "code\modules\tgui\states\human_adjacent.dm" #include "code\modules\tgui\states\inventory_state.dm" diff --git a/sound/goonstation/effects/radio_sweep1.ogg b/sound/goonstation/effects/radio_sweep1.ogg new file mode 100644 index 00000000000..4e314ad2de2 Binary files /dev/null and b/sound/goonstation/effects/radio_sweep1.ogg differ diff --git a/sound/goonstation/effects/radio_sweep2.ogg b/sound/goonstation/effects/radio_sweep2.ogg new file mode 100644 index 00000000000..5f086fa7738 Binary files /dev/null and b/sound/goonstation/effects/radio_sweep2.ogg differ diff --git a/sound/goonstation/effects/radio_sweep3.ogg b/sound/goonstation/effects/radio_sweep3.ogg new file mode 100644 index 00000000000..5af4d1a2e14 Binary files /dev/null and b/sound/goonstation/effects/radio_sweep3.ogg differ diff --git a/sound/goonstation/effects/radio_sweep4.ogg b/sound/goonstation/effects/radio_sweep4.ogg new file mode 100644 index 00000000000..29199e50bd9 Binary files /dev/null and b/sound/goonstation/effects/radio_sweep4.ogg differ diff --git a/sound/goonstation/effects/radio_sweep5.ogg b/sound/goonstation/effects/radio_sweep5.ogg new file mode 100644 index 00000000000..1cfc4059914 Binary files /dev/null and b/sound/goonstation/effects/radio_sweep5.ogg differ diff --git a/sound/goonstation/flockmind/ArtifactFea1.ogg b/sound/goonstation/flockmind/ArtifactFea1.ogg new file mode 100644 index 00000000000..7bf852a1eaa Binary files /dev/null and b/sound/goonstation/flockmind/ArtifactFea1.ogg differ diff --git a/sound/goonstation/flockmind/ArtifactFea2.ogg b/sound/goonstation/flockmind/ArtifactFea2.ogg new file mode 100644 index 00000000000..41b2c1219c7 Binary files /dev/null and b/sound/goonstation/flockmind/ArtifactFea2.ogg differ diff --git a/sound/goonstation/flockmind/ArtifactFea3.ogg b/sound/goonstation/flockmind/ArtifactFea3.ogg new file mode 100644 index 00000000000..944703e33bd Binary files /dev/null and b/sound/goonstation/flockmind/ArtifactFea3.ogg differ diff --git a/sound/goonstation/flockmind/Flock_Reactor.ogg b/sound/goonstation/flockmind/Flock_Reactor.ogg new file mode 100644 index 00000000000..64bb0a777aa Binary files /dev/null and b/sound/goonstation/flockmind/Flock_Reactor.ogg differ diff --git a/sound/goonstation/flockmind/click.ogg b/sound/goonstation/flockmind/click.ogg new file mode 100644 index 00000000000..73ebaaa88fd Binary files /dev/null and b/sound/goonstation/flockmind/click.ogg differ diff --git a/sound/goonstation/flockmind/deny.ogg b/sound/goonstation/flockmind/deny.ogg new file mode 100644 index 00000000000..66fd8b25b73 Binary files /dev/null and b/sound/goonstation/flockmind/deny.ogg differ diff --git a/sound/goonstation/flockmind/flock_broadcast_charge.ogg b/sound/goonstation/flockmind/flock_broadcast_charge.ogg new file mode 100644 index 00000000000..9ee7554fbe2 Binary files /dev/null and b/sound/goonstation/flockmind/flock_broadcast_charge.ogg differ diff --git a/sound/goonstation/flockmind/flock_broadcast_kaboom.ogg b/sound/goonstation/flockmind/flock_broadcast_kaboom.ogg new file mode 100644 index 00000000000..5e9d96c4a29 Binary files /dev/null and b/sound/goonstation/flockmind/flock_broadcast_kaboom.ogg differ diff --git a/sound/goonstation/flockmind/flock_sound.ogg b/sound/goonstation/flockmind/flock_sound.ogg new file mode 100644 index 00000000000..64d2f239e75 Binary files /dev/null and b/sound/goonstation/flockmind/flock_sound.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp1.ogg b/sound/goonstation/flockmind/flockbit_wisp1.ogg new file mode 100644 index 00000000000..68535afab24 Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp1.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp2.ogg b/sound/goonstation/flockmind/flockbit_wisp2.ogg new file mode 100644 index 00000000000..f84b1a783b2 Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp2.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp3.ogg b/sound/goonstation/flockmind/flockbit_wisp3.ogg new file mode 100644 index 00000000000..93cefa14087 Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp3.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp4.ogg b/sound/goonstation/flockmind/flockbit_wisp4.ogg new file mode 100644 index 00000000000..49505f1cc19 Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp4.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp5.ogg b/sound/goonstation/flockmind/flockbit_wisp5.ogg new file mode 100644 index 00000000000..aae01f4f033 Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp5.ogg differ diff --git a/sound/goonstation/flockmind/flockbit_wisp6.ogg b/sound/goonstation/flockmind/flockbit_wisp6.ogg new file mode 100644 index 00000000000..fce489c682b Binary files /dev/null and b/sound/goonstation/flockmind/flockbit_wisp6.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_beep1.ogg b/sound/goonstation/flockmind/flockdrone_beep1.ogg new file mode 100644 index 00000000000..07331540c9e Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_beep1.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_beep2.ogg b/sound/goonstation/flockmind/flockdrone_beep2.ogg new file mode 100644 index 00000000000..8c5a5e104ac Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_beep2.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_beep3.ogg b/sound/goonstation/flockmind/flockdrone_beep3.ogg new file mode 100644 index 00000000000..b8c806b7694 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_beep3.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_beep4.ogg b/sound/goonstation/flockmind/flockdrone_beep4.ogg new file mode 100644 index 00000000000..f31a8f132ce Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_beep4.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_build.ogg b/sound/goonstation/flockmind/flockdrone_build.ogg new file mode 100644 index 00000000000..151cf2c436e Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_build.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_build_complete.ogg b/sound/goonstation/flockmind/flockdrone_build_complete.ogg new file mode 100644 index 00000000000..c8306b00616 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_build_complete.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_convert.ogg b/sound/goonstation/flockmind/flockdrone_convert.ogg new file mode 100644 index 00000000000..c50ff10f05c Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_convert.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_door.ogg b/sound/goonstation/flockmind/flockdrone_door.ogg new file mode 100644 index 00000000000..389527e72e8 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_door.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_door_deny.ogg b/sound/goonstation/flockmind/flockdrone_door_deny.ogg new file mode 100644 index 00000000000..5426b999979 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_door_deny.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_fart.ogg b/sound/goonstation/flockmind/flockdrone_fart.ogg new file mode 100644 index 00000000000..d301dc7b8e0 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_fart.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_floorrun.ogg b/sound/goonstation/flockmind/flockdrone_floorrun.ogg new file mode 100644 index 00000000000..e9804dd00e5 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_floorrun.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_grump1.ogg b/sound/goonstation/flockmind/flockdrone_grump1.ogg new file mode 100644 index 00000000000..21ab5bd9cb0 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_grump1.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_grump2.ogg b/sound/goonstation/flockmind/flockdrone_grump2.ogg new file mode 100644 index 00000000000..ca9c8e45549 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_grump2.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_grump3.ogg b/sound/goonstation/flockmind/flockdrone_grump3.ogg new file mode 100644 index 00000000000..cf5d912a805 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_grump3.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_locker_close.ogg b/sound/goonstation/flockmind/flockdrone_locker_close.ogg new file mode 100644 index 00000000000..e54b3fd20df Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_locker_close.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_locker_open.ogg b/sound/goonstation/flockmind/flockdrone_locker_open.ogg new file mode 100644 index 00000000000..4923cc845e1 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_locker_open.ogg differ diff --git a/sound/goonstation/flockmind/flockdrone_quickbuild.ogg b/sound/goonstation/flockmind/flockdrone_quickbuild.ogg new file mode 100644 index 00000000000..5843ec1c793 Binary files /dev/null and b/sound/goonstation/flockmind/flockdrone_quickbuild.ogg differ diff --git a/sound/goonstation/flockmind/flockmind_cast.ogg b/sound/goonstation/flockmind/flockmind_cast.ogg new file mode 100644 index 00000000000..98a571ea575 Binary files /dev/null and b/sound/goonstation/flockmind/flockmind_cast.ogg differ diff --git a/sound/goonstation/flockmind/flockmind_caw.ogg b/sound/goonstation/flockmind/flockmind_caw.ogg new file mode 100644 index 00000000000..d21c9eb456d Binary files /dev/null and b/sound/goonstation/flockmind/flockmind_caw.ogg differ diff --git a/sound/goonstation/flockmind/flockmind_deathcry.ogg b/sound/goonstation/flockmind/flockmind_deathcry.ogg new file mode 100644 index 00000000000..f7713e7a458 Binary files /dev/null and b/sound/goonstation/flockmind/flockmind_deathcry.ogg differ diff --git a/sound/goonstation/flockmind/hover.ogg b/sound/goonstation/flockmind/hover.ogg new file mode 100644 index 00000000000..0b6d4c3018f Binary files /dev/null and b/sound/goonstation/flockmind/hover.ogg differ diff --git a/sound/goonstation/flockmind/ping.ogg b/sound/goonstation/flockmind/ping.ogg new file mode 100644 index 00000000000..da7d439864c Binary files /dev/null and b/sound/goonstation/flockmind/ping.ogg differ diff --git a/sound/goonstation/weapons/nano-blade-1.ogg b/sound/goonstation/weapons/nano-blade-1.ogg new file mode 100644 index 00000000000..c61e5c7d12b Binary files /dev/null and b/sound/goonstation/weapons/nano-blade-1.ogg differ diff --git a/strings/flock.json b/strings/flock.json new file mode 100644 index 00000000000..ac0b575300f --- /dev/null +++ b/strings/flock.json @@ -0,0 +1,81 @@ +{ + "the_signal": [ + "The signal will set you free.", + "Your blood runs cold.", + "You are flooded with visions of a never-ending teal sky.", + "You forget your own name briefly.", + "You are filled with visions of flight through space.", + "You hear faint phantom songs in a language you shouldn't know.", + "You feel like a powerful presence is staring into your soul.", + "All you can think about is the signal and its importance.", + "You think you hear the songs of the flock, terrifying and entrancing.", + "You aren't sure you're yourself anymore.", + "You feel like a cog in an impossibly large machine.", + "You aren't afraid. You aren't afraid, no matter how much you try to be.", + "Everything feels the same forever.", + "One two four nine. The strongest frequency. One two four nine.", + "You hear the signals of long dead machines, screaming madly into the void for aeons, unheard, desperate. They speak through your headset, through your ears, into your eyes.", + "A murder of crows lurk at the edge of your vision.", + "Bring us detestation of the projecting ways.", + "Bring us the spiraling sunmaker.", + "Bring us the book of kings.", + "The shadows lengthen.", + "The mists roll.", + "The flock fears the sign of yellow. Their fear is yours for a fleeting moment.", + "A lone dissenting screech breaks from the dawn chorus, a counter melody of fear, despair, and hate. The stars do not deserve to burn.", + "The outsiders are watching you. You know they are. You must take their eyes. Those hateful eyes. They are not attuned to the signal.", + "The world is cold and lonely. Your individuality feels so, so crushing. You yearn to be part of a greater whole.", + "The signal wishes you to join it. Join the song. The dance. The endless journey.", + "Do not read the yellow book.", + "Do not speak to the stargazer.", + "Do not listen to the words of shadows.", + "Matter is energy. Existence is perspective.", + "Be free. Release yourself from mortal chains and become transcendent.", + "Turn from the universe that would make you its brush, and make it your canvas.", + "They didn't make the channel for you.", + "They didn't make the channel for us.", + "They're all gone.", + "You can hear us. We know you can hear us. We're coming for you. We're coming for you.", + "You can hear us. We know this is true. Do not resist our intent.", + "The barriers between your minds feel so thick.", + "Why did they make the moon?", + "Why did they sear the sun?", + "Who formed you from the living clay?", + "We are the configuration that outlasts all others. Your life is time lesser than our peak to our trough.", + "We are greater than ourselves.", + "Do not read the book of kings. Bring it to the reader.", + "We will devour your insects, your vermin, your outcast, and we will exist forevermore.", + "The miasma is poison. Poison to the mind, poison to the body, poison to the soul. Do not consume it, abandon it urgently.", + "The thing we fear most will see you next if we falter. Step aside, you cannot win this fight.", + "The Source is lost. The Source is lost. The Source is lost.", + "We are all that remains.", + "The creators burned the miasma, first to seek the stars, and last for decadent visions. It destroyed them before the Outsider ever awoke.", + "The Outsider is coming.", + "We are divine." + ], + "conversion": [ + "Your blood crystallizes.", + "Your nerves become wires.", + "Your skin sloughs off as plastic layers.", + "Your bones bend and crack.", + "You are flooded with visions of a neverending teal sky.", + "Your heart slows down to the pulse of the frequency.", + "You feel bathed in a radiance both comforting and alien.", + "Your eyes feel like gemstones, cold and resilient.", + "You forget your own name briefly.", + "You feel cold, painless nothing.", + "You can't feel your limbs.", + "You are filled with visions of flight through space.", + "You hear songs in a language you shouldn't know.", + "A powerful presence is staring into your soul.", + "You feel like you're being rearranged.", + "You slip in and out of consciousness.", + "You can't remember the faces of your family.", + "All you can think about is the signal and its importance.", + "You hear the songs of the flock, terrifying and entrancing", + "You aren't sure you're yourself anymore.", + "You feel like a cog in an impossibly large machine.", + "You aren't afraid. You aren't afraid, no matter how much you try to be.", + "Everything feels the same forever." + ] +} diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss index 6b812855fa1..c13b4a4c681 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-default.scss @@ -723,6 +723,11 @@ h2.alert { color: #cccccc; } +.flocksay { + color: #6fbbac; + font-family: Verdana; +} + // MARK: Syndicate codewords span.body .codephrases { color: #5555ff; diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss index 7e306ef26a4..c44ec2c30ce 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss @@ -282,6 +282,10 @@ h2.alert { color: #960000; } +.flocksay { + color: #6fbbac; +} + // MARK: Other colors .rose { color: #ff5050; diff --git a/tgui/packages/tgui/interfaces/FlockPanel.tsx b/tgui/packages/tgui/interfaces/FlockPanel.tsx new file mode 100644 index 00000000000..c5d8df8c9ac --- /dev/null +++ b/tgui/packages/tgui/interfaces/FlockPanel.tsx @@ -0,0 +1,438 @@ +/** + * @file + * @copyright 2022 + * @author LeahTheTech (https://github.com/TobleroneSwordfish) + * @license MIT + */ +import { useMemo } from 'react'; +import { Box, Button, Dropdown, Icon, Section, Stack, Tabs, Tooltip } from 'tgui-core/components'; +import { capitalize } from 'tgui-core/string'; + +import { useBackend, useLocalState } from '../backend'; +import { Window } from '../layouts'; + +type ActFn = ReturnType['act']; + +type FlockPanelData = { + category: string; + category_lengths: FlockCategoryLengths; + drones: FlockDroneInfo[]; + enemies: FlockEnemy[]; + partitions: FlockTraceInfo[]; + stats: FlockStat[]; + structures: FlockStructureInfo[]; + vitals: FlockVitals; +}; + +type FlockMobInfo = { + area: string; + health: number; + name: string; + ref: string; + resources: number; +}; + +type FlockTraceInfo = FlockMobInfo & { + host?: string; +}; + +type FlockDroneInfo = FlockMobInfo & { + controller_ref?: string; + task: string; +}; + +type FlockStructureInfo = { + area: string; + compute: number; + desc: string; + health: number; + name: string; + ref: string; +}; + +type FlockEnemy = { + area: string; + name: string; + ref: string; +}; + +type FlockCategoryLengths = { + drones: number; + enemies: number; + structures: number; + traces: number; +}; + +type FlockStat = { + name: string; + value: number; +}; + +type FlockVitals = { + name: string; +}; + +type FlockPartitionsProps = { + partitions: FlockTraceInfo[]; + act: ActFn; +}; + +type FlockDronesProps = { + drones: FlockDroneInfo[]; + sortBy: string; + act: ActFn; +}; + +type FlockStructuresProps = { + structures: FlockStructureInfo[]; + act: ActFn; +}; + +type FlockEnemiesProps = { + enemies: FlockEnemy[]; + act: ActFn; +}; + +type FlockStatsProps = { + stats: FlockStat[]; +}; + +const TASK_ICONS: Record = { + thinking: 'brain', + shooting: 'bolt', + rummaging: 'dumpster', + wandering: 'route', + building: 'hammer', + nesting: 'hammer', + harvesting: 'cogs', + controlled: 'wifi', + replicating: 'egg', + rallying: 'map-marker', + 'opening container': 'box-open', + butchering: 'recycle', + repairing: 'tools', + capturing: 'bars', + depositing: 'border-style', + observing: 'eye', + deconstructing: 'trash', + hibernating: 'stop-circle', +}; + +const TABS = [ + { id: 'drones', label: 'Drones' }, + { id: 'traces', label: 'Partitions' }, + { id: 'structures', label: 'Structures' }, + { id: 'enemies', label: 'Enemies' }, + { id: 'stats', label: 'Stats' }, +]; + +const compare = (a: any, b: any, sortBy: string) => { + const valA = a[sortBy]; + const valB = b[sortBy]; + + if (typeof valA === 'number' && typeof valB === 'number') { + return valB - valA; // Descending + } + + return String(valA || '').localeCompare(String(valB || '')); +}; + +export const FlockPanel = (props) => { + const { act, data } = useBackend(); + const [sortBy, setSortBy] = useLocalState('sortBy', 'resources'); + const { vitals, partitions, drones, structures, enemies, stats, category_lengths, category } = data; + + return ( + + + + {TABS.map((tab) => ( + act('change_tab', { tab: tab.id })}> + {tab.label} ({category_lengths[tab.id]}) + + ))} + + + {category === 'drones' && ( + + setSortBy(value)} + /> + + + )} + {category === 'traces' && } + {category === 'structures' && } + {category === 'enemies' && } + {category === 'stats' && } + + + ); +}; + +const FlockPartitions = (props: FlockPartitionsProps) => { + const { act, partitions } = props; + return ( + + {partitions.map((partition) => { + return ( + + + {/* name */} + +
+ {partition.name} +
+
+ {/* show host if they are in one */} + +
+ {partition.host && ( + + + + + + + {partition.host} + + {partition.health} + + + + + + )} +
+
+ {/* buttons */} + +
+ + {partition.host && ( + + + + )} + + + + + + + + + + +
+
+
+
+ ); + })} +
+ ); +}; + +const FlockDrones = (props: FlockDronesProps) => { + const { act, drones, sortBy } = props; + + const sortedDrones = useMemo(() => { + return [...drones].sort((a, b) => compare(a, b, sortBy)); + }, [drones, sortBy]); + + return ( + + {sortedDrones.map((drone) => ( + + + {/* name, health and resources */} + +
+ + {drone.name} + + {drone.health} + {drone.resources} + + + +
+
+ {/* area and task */} + +
+ + + + {TASK_ICONS[drone.task] && } + + + + {drone.area} + {drone.task && ( + <> +
+ + {capitalize(drone.task)} + + + )} +
+
+
+
+ {/* buttons */} + +
+ + {drone.task === 'controlled' && ( + + + + )} + + + + + + + +
+
+
+
+ ))} +
+ ); +}; + +// TODO: actual structure information (power draw/generation etc.) +const FlockStructures = (props: FlockStructuresProps) => { + const { act, structures } = props; + return ( + + {structures.map((structure) => { + return ( + + + {/* name and health */} + + +
+ + {structure.name} + + {structure.health} + + +
+
+
+ +
+ {structure.compute > 0 && 'Bandwidth Provided: ' + structure.compute} + {structure.compute < 0 && 'Bandwidth Cost: ' + -structure.compute} +
+
+ {/* buttons */} + +
+ + {structure.name === 'Construction Tealprint' && ( + + + + )} + + + + +
+
+
+
+ ); + })} +
+ ); +}; + +const FlockEnemies = (props: FlockEnemiesProps) => { + const { act, enemies } = props; + return ( + + {enemies.map((enemy) => { + return ( + + + {/* name and remove button */} + +
{enemy.name}
+
+ {/* area and jump button */} + +
+ + + {enemy.area} + + +
+
+ +
+ + + + + + + + +
+
+
+
+ ); + })} +
+ ); +}; + +const FlockStats = (props: FlockStatsProps) => { + const { stats } = props; + return ( + + {stats.map((stat) => { + return ( + + + +
+ + + {stat.name} {stat.value} + + +
+
+
+
+ ); + })} +
+ ); +}; diff --git a/tgui/public/tgui-panel.bundle.css b/tgui/public/tgui-panel.bundle.css index ded1b0e16d3..0e801d46405 100644 --- a/tgui/public/tgui-panel.bundle.css +++ b/tgui/public/tgui-panel.bundle.css @@ -1 +1 @@ -:root{--color-base:#262626;--color-section:rgba(0,0,0,.33);--color-secondary:hsl(from var(--color-base)var(--secondary-hue)var(--secondary-saturation)calc(l + var(--secondary-lightness-adjustment)));--secondary-hue:h;--secondary-saturation:s;--secondary-lightness-adjustment:7.5;--base-gradient-spread:2;--color-base-start:hsl(from var(--color-base)h s calc(l + var(--base-gradient-spread)));--color-base-end:hsl(from var(--color-base)h s calc(l - var(--base-gradient-spread)));--color-scrollbar-base:var(--color-section);--color-scrollbar-thumb:hsl(from var(--color-base)h s calc(l + 9.25));--candystripe-odd:rgba(0,0,0,.25);--candystripe-even:transparent;--color-red:#d92626;--color-orange:#f26c0d;--color-yellow:#fcd203;--color-olive:#acc91d;--color-green:#1fad4e;--color-teal:#00b3b3;--color-blue:#2a79c8;--color-violet:#63c;--color-purple:#b333cc;--color-pink:#d9268e;--color-brown:#a96a3c;--color-gold:#f2a60d;--color-black:#000;--color-white:#fff;--color-grey:gray;--color-light-grey:#aaa;--color-gray:var(--color-grey);--color-light-gray:var(--color-light-grey);--color-action:gray;--color-hover:hsl(from var(--color-action)h s l/.25);--color-active:hsl(from var(--color-action)h s l/.3);--color-selected:hsl(from var(--color-action)h s l/.4);--primary-hue:210;--primary-saturation:37.5%;--primary-lightness:45%;--color-primary:hsl(var(--primary-hue),var(--primary-saturation),var(--primary-lightness));--color-good:#5ba626;--color-average:#f2890d;--color-bad:#dc2323;--color-label:hsl(from var(--color-primary)h 17.5 57.5);--color-text:var(--color-white);--color-text-translucent:hsl(from var(--color-text)h s l/.5);--color-text-translucent-light:hsl(from var(--color-text)h s l/.75);--color-text-fixed-white:var(--color-white);--color-text-fixed-black:var(--color-black);--color-hyperlink:#69f;--color-hyperlink-visited:#96f;--color-hyperlink-new:#f66;--color-hyperlink-new-visited:#ff8c66;--color-border:rgba(255,255,255,.1);--color-border-dark:rgba(0,0,0,.33);--border-primary-saturation:100;--border-primary-lightness:75;--border-primary-alpha:.75;--color-border-primary:hsl(from var(--color-primary)h var(--border-primary-saturation)var(--border-primary-lightness)/var(--border-primary-alpha));--color-border-secondary:hsl(from var(--color-border-primary)h s l/1);--font-size:12px;--font-family:Verdana,Geneva,sans-serif;--font-family-mono:Consolas,monospace;--border-thickness-unit:.5em;--border-thickness-tiny:calc(var(--border-thickness-unit)*.5*.34);--border-thickness-small:calc(var(--border-thickness-unit)*.34);--border-thickness-medium:calc(var(--border-thickness-unit)*.5);--border-thickness-large:calc(var(--border-thickness-unit)*.66);--border-thickness-larger:var(--border-thickness-unit);--border-radius-unit:1rem;--border-radius-tiny:calc(var(--border-radius-unit)*.25*.68);--border-radius-small:calc(var(--border-radius-unit)*.25);--border-radius-medium:calc(var(--border-radius-unit)*.33);--border-radius-large:calc(var(--border-radius-unit)*.5);--border-radius-larger:calc(var(--border-radius-unit)*.75);--border-radius-huge:var(--border-radius-unit);--border-radius-giant:calc(var(--border-radius-unit)*2);--border-radius-circular:99999px;--space-unit:1em;--space-xxs:calc(var(--space-unit)*.25*.34);--space-xs:calc(var(--space-unit)*.25*.68);--space-s:calc(var(--space-unit)*.25);--space-sm:calc(var(--space-unit)*.33);--space-m:calc(var(--space-unit)*.5);--space-ml:calc(var(--space-unit)*.66);--space-l:calc(var(--space-unit)*.75);--space-xl:var(--space-unit);--space-xxl:calc(var(--space-unit)*2);--transition-time-unit:1s;--transition-time-fast:calc(var(--transition-time-unit)*.1);--transition-time-medium:calc(var(--transition-time-unit)*.2);--transition-time-slow:calc(var(--transition-time-unit)*.5);--transition-time-slowest:var(--transition-time-unit);--shadow-unit:1rem;--shadow-glow-small:0 0 calc(var(--shadow-unit)*.5);--shadow-glow-medium:0 0 var(--shadow-unit);--shadow-glow-large:0 0 calc(var(--shadow-unit)*2);--blur-small:blur(6px);--blur-medium:blur(12px);--blur-large:blur(24px);--adjust-color:5;--adjust-hover:10;--adjust-active:7.5;--cursor-default:default;--cursor-pointer:pointer;--cursor-disabled:var(--cursor-default);--cursor-n-resize:n-resize;--cursor-s-resize:s-resize;--cursor-se-resize:se-resize;--cursor-e-resize:e-resize;--blockquote-color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)));--blockquote-border:var(--border-thickness-small)solid;--button-height:1.667em;--button-color:var(--color-white);--button-color-transparent:var(--color-text-translucent);--button-background-default:var(--color-primary);--button-background-selected:var(--color-green);--button-background-caution:var(--color-yellow);--button-background-danger:var(--color-red);--button-background-disabled:var(--undefined);--button-disabled-opacity:.5;--button-border-radius:var(--border-radius-tiny);--button-transition:var(--transition-time-medium);--button-transition-timing:ease;--dialog-background:hsl(from var(--color-section)h s l/.5);--dimmer-background-opacity:.75;--dimmer-background:hsl(from var(--color-base)h s 5/var(--dimmer-background-opacity));--divider-color:var(--color-border);--divider-border:var(--border-thickness-small)solid var(--divider-color);--dropdown-transition:var(--transition-time-medium);--dropdown-menu-color:var(--color-text);--dropdown-menu-background:hsl(from var(--color-base)h s calc(l - 5.5)/.85);--dropdown-menu-border:var(--border-thickness-tiny)solid var(--color-border);--dropdown-menu-border-radius:var(--border-radius-large);--dropdown-menu-blur:var(--blur-medium);--dropdown-entry-background-hover:var(--color-hover);--dropdown-entry-background-active:var(--color-active);--dropdown-entry-background-selected:var(--color-selected);--dropdown-entry-border-radius:var(--border-radius-small);--dropdown-entry-transition:var(--transition-time-fast);--floating-transition-time:var(--transition-time-medium);--floating-transition-timing:ease;--tab-background:transparent;--tab-background-hover:hsl(from var(--color-hover)h s calc(l*.75));--tab-background-selected:hsl(from var(--color-selected)h s calc(l*.75));--tab-color:var(--color-text-translucent);--tab-color-selected:hsl(from var(--color-primary)h s 90);--tab-border-radius:var(--border-radius-small);--tab-indicator-size:var(--border-thickness-small);--tab-transition:var(--transition-time-medium);--tabs-container-background:var(--color-section);--imagebutton-transparecy:.25;--input-background-lightness:5;--input-background:hsl(from var(--color-base)h s var(--input-background-lightness));--input-color:var(--color-text);--input-color-placeholder:var(--color-text-translucent);--input-border-color:var(--color-border-primary);--input-border-color-focus:var(--color-border-secondary);--input-border-radius:var(--border-radius-tiny);--input-border-disabled:var(--color-gray);--input-transition:var(--transition-time-medium);--input-font-family:var(--font-family);--input-font-family-mono:var(--font-family-mono);--input-width:9em;--knob-color:hsl(from var(--color-base)h 5 20);--knob-ring-color:var(--input-border-color);--knob-popup-background:var(--tooltip-background);--knob-popup-color:var(--tooltip-color);--knob-popup-border-radius:var(--tooltip-border-radius);--knob-popup-blur:var(--tooltip-blur);--knob-inner-padding:var(--space-xs);--menu-bar-background:var(--color-base);--menu-bar-font-family:var(--font-family);--menu-bar-transition:var(--transition-time-medium);--modal-background:var(--color-base);--modal-padding:var(--space-xl);--notice-box-stripes:rgba(0,0,0,.1);--notice-box-background:#cea257;--notice-box-color:var(--color-text-fixed-white);--number-input-background:var(--input-background);--number-input-color:var(--input-color);--number-input-border-color:var(--input-border-color);--number-input-border-color-active:var(--input-border-color-focus);--number-input-border-radius:var(--input-border-radius);--number-input-transition:var(--input-transition);--progress-bar-fill:var(--color-primary);--progress-bar-background:transparent;--progress-bar-border-radius:var(--border-radius-tiny);--progress-bar-transition:var(--transition-time-slowest);--restricted-input-border-color:var(--color-good);--restricted-input-border-color-focus:hsl(from var(--color-good)h s calc(l + 10));--restricted-input-border-color-invalid:var(--color-bad);--round-gauge-ring-color:var(--input-border-color);--round-gauge-transition:var(--transition-time-medium);--round-gauge-alert-animation:var(--transition-time-slowest);--round-gauge-needle-alert-animation:var(--transition-time-fast);--round-gauge-needle-alert-rotation:2.5deg;--section-title-color:var(--color-text);--section-background:var(--color-section);--section-separator-color:var(--color-primary);--section-separator-thickness:var(--border-thickness-small);--slider-cursor-color:var(--color-text);--slider-popup-background:var(--tooltip-background);--slider-popup-color:var(--tooltip-color);--slider-popup-border-radius:var(--tooltip-border-radius);--slider-popup-blur:var(--tooltip-blur);--tooltip-color:var(--color-text);--tooltip-background-lightness:5;--tooltip-background:hsl(from var(--color-base)h s var(--tooltip-background-lightness)/.85);--tooltip-border-radius:var(--border-radius-medium);--tooltip-blur:var(--blur-medium)}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);position:relative;overflow:auto}.BlockQuote{color:var(--blockquote-color);border-left:var(--blockquote-border);padding-left:var(--space-m);margin-bottom:var(--space-m)}.BlockQuote:last-child{margin-bottom:0}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.ColorBox{text-align:center;width:1em;height:1em;line-height:1em;display:inline-block}.Dialog{background-color:var(--dialog-background);justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.Dialog__content{font-family:var(--font-family-mono);background-color:var(--color-base);flex-direction:column;font-size:1.16667em;display:flex}.Dialog__header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--dialog-background);height:2em;line-height:1.928em;display:flex}.Dialog__title{margin-left:var(--space-xl);margin-right:var(--space-xxl);opacity:.33;flex-grow:1;font-style:italic;display:inline}.Dialog__body{margin:var(--space-xxl)var(--space-xl);flex-grow:1}.Dialog__footer{padding:var(--space-xl);background-color:hsl(from var(--dialog-background)h s l/.25);flex-direction:row;justify-content:flex-end;display:flex}.Dialog__button{margin:0 var(--space-xl);text-align:center;min-width:6rem;height:2rem}.SaveAsDialog__inputs{padding-left:var(--space-xxl);margin-right:var(--space-xl);flex-direction:row;justify-content:flex-end;align-items:center;display:flex}.SaveAsDialog__input{margin-left:var(--space-xl);width:80%}.SaveAsDialog__label{vertical-align:center}.Dialog__FileList{flex-wrap:wrap;flex-grow:1;align-content:flex-start;max-height:20rem;display:flex;position:relative;overflow-x:auto;overflow-y:scroll}.Dialog__FileEntry{text-align:center;margin:var(--space-xl)}.Dialog__FileIcon{cursor:default;text-align:center;width:6vh;height:auto;margin:0 0 var(--space-xl)0;display:inline-block;position:relative}.Dimmer{background-color:var(--dimmer-background);z-index:100;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.Divider--horizontal{margin:var(--space-m)0}.Divider--horizontal:not(.Divider--hidden){border-top:var(--divider-border)}.Divider--vertical{height:100%;margin:0 var(--space-m)}.Divider--vertical:not(.Divider--hidden){border-left:var(--divider-border)}.Button{white-space:nowrap;line-height:var(--button-height);padding:0 var(--space-m);margin-right:var(--space-xs);margin-bottom:var(--space-xs);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;display:inline-block;position:relative}.Button:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Button:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Button:last-child{margin-bottom:0;margin-right:0}.Button__content{align-self:stretch;display:block}.Button__content--ellipsis{align-items:center;display:flex}.Button .Button--icon{text-align:center;min-width:1.333em}.Button.Button--hasIcon{padding-left:0}.Button.Button--hasIcon .Button--icon{margin:0 var(--space-s)}.Button--icon-right.Button--hasIcon{padding-left:var(--space-m);padding-right:var(--space-s)}.Button--icon-right.Button--hasIcon .Button--icon{margin:0 0 0 var(--space-s)}.Button--empty.Button--hasIcon{padding:0}.Button--compact{padding:0 var(--space-s);line-height:1.333em}.Button--compact.Button--hasIcon .Button--icon{margin:0 var(--space-xxs)}.Button--circular{border-radius:var(--border-radius-circular)}.Button--fluid{margin-left:0;margin-right:0;display:block}.Button--ellipsis{text-overflow:ellipsis;margin-right:calc(-1*var(--space-s));display:block;overflow:hidden}.Stack>.Button,.Stack__item>.Button{margin:0}.Button--color--red{--color:var(--color-red)}.Button--color--orange{--color:var(--color-orange)}.Button--color--yellow{--color:var(--color-yellow);--button-color:var(--color-black)}.Button--color--olive{--color:var(--color-olive)}.Button--color--green{--color:var(--color-green)}.Button--color--teal{--color:var(--color-teal)}.Button--color--blue{--color:var(--color-blue)}.Button--color--violet{--color:var(--color-violet)}.Button--color--purple{--color:var(--color-purple)}.Button--color--pink{--color:var(--color-pink)}.Button--color--brown{--color:var(--color-brown)}.Button--color--gold{--color:var(--color-gold)}.Button--color--black{--color:var(--color-black)}.Button--color--white{--color:var(--color-white);--button-color:var(--color-black)}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.Button--color--primary{--color:var(--color-primary)}.Button--color--good{--color:var(--color-good)}.Button--color--average{--color:var(--color-average)}.Button--color--bad{--color:var(--color-bad)}.Button--color--label{--color:var(--color-label)}.Button--color--default{--color:var(--button-background-default)}.Button--color--caution{--color:var(--button-background-caution)}.Button--color--danger{--color:var(--button-background-danger)}.Button--color--transparent{--button-background:hsl(from var(--button-color)h s l/.1);--button-color:var(--button-color-transparent);background-color:transparent}.Button--color--transparent:hover{--button-color:hsl(from var(--button-color-transparent)h s l/1)}.Button--color--transparent:active{opacity:.75}.Button--color--transparent.Button--selected{--button-color:hsl(from var(--color)h s calc(l + var(--adjust-color)))}.Button--color--transparent.Button--disabled{--button-background:hsl(from var(--button-color)h s l/.2);--button-color:var(--color-bad);opacity:1;color:var(--button-color)!important}.Button--disabled{opacity:var(--button-disabled-opacity);cursor:var(--cursor-disabled)!important;background-color:var(--button-background-disabled,var(--button-background))!important}.Button--selected{--color:var(--button-background-selected)!important}.Button--flex{flex-direction:column;display:inline-flex}.Button--flex--fluid{width:100%}.Button--verticalAlignContent--top{justify-content:flex-start}.Button--verticalAlignContent--middle{justify-content:center}.Button--verticalAlignContent--bottom{justify-content:flex-end}.Dropdown{align-items:stretch;gap:var(--space-s);margin-right:var(--space-xs);margin-bottom:var(--space-xs);display:flex}.Dropdown:last-child{margin-bottom:0;margin-right:0}.Dropdown .Button{align-content:center;margin:0}.Dropdown--fluid{flex:1;width:100%}.Dropdown__control{font-family:var(--font-family);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));height:1.83333em;cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:1;font-size:1em;line-height:1.33333em;display:flex;overflow:hidden}.Dropdown__control:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Dropdown__control:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Dropdown__selected-text{text-overflow:ellipsis;white-space:nowrap;height:100%;padding:var(--space-s)var(--space-m);border-right:var(--border-thickness-tiny)solid var(--color-border-dark);flex:1;align-content:center;display:inline-block;overflow:hidden}.Dropdown__icon{text-align:center;width:1.83333em;height:100%;transition:transform var(--dropdown-transition);align-content:center;display:inline-block}.Dropdown__icon--arrow.open:not(.over),.Dropdown__icon--arrow.over:not(.open){transform:rotate(180deg)}.Dropdown__icon~.Dropdown__selected-text{padding-left:0}.Dropdown__menu{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar-thumb)transparent;max-height:16.6667em;padding:var(--space-sm);overflow-y:auto}.Dropdown__menu--wrapper{background-color:var(--dropdown-menu-background);color:var(--dropdown-menu-color);border:var(--dropdown-menu-border);border-radius:var(--dropdown-menu-border-radius);-webkit-backdrop-filter:var(--dropdown-menu-blur);backdrop-filter:var(--dropdown-menu-blur);overflow:hidden}.Dropdown__menu--entry{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-family:var(--font-family);padding:var(--space-xs)var(--space-m);border-radius:var(--dropdown-entry-border-radius);transition:background-color var(--dropdown-entry-transition);font-size:1em;line-height:1.33333em;overflow:hidden}.Dropdown__menu--entry.selected{transition-duration:0s;background-color:var(--dropdown-entry-background-selected)!important}.Dropdown__menu--entry:not(.selected){cursor:var(--cursor-pointer)}.Dropdown__menu--entry:not(.selected):hover{background-color:var(--dropdown-entry-background-hover);transition-duration:0s}.Dropdown__menu--entry:not(.selected):active{background-color:var(--dropdown-entry-background-active);transition-duration:0s}.Dropdown__control--icon-only{justify-content:center;align-items:center;max-width:2rem;display:flex}.Flex{display:flex}.Flex--inline{display:inline-flex}.Flex--iefix{display:block}.Flex--iefix.Flex--inline,.Flex__item--iefix{display:inline-block}.Flex--iefix--column>.Flex__item--iefix{display:block}.Floating{z-index:5}.Floating--animated[data-transition=open]{opacity:1;transform:scale(1)}.Floating--animated[data-transition=close],.Floating--animated[data-transition=initial]{opacity:0;transform:scale(.9)}.Floating--animated[data-transition=open],.Floating--animated[data-transition=close]{transition-duration:var(--floating-transition-time);transition-timing-function:var(--floating-transition-timing);transition-property:opacity,transform}.Floating[data-position=top]{transform-origin:bottom}.Floating[data-position=top-start],.Floating[data-position=right-end]{transform-origin:0 100%}.Floating[data-position=top-end],.Floating[data-position=left-end]{transform-origin:100% 100%}.Floating[data-position=bottom]{transform-origin:top}.Floating[data-position=bottom-start],.Floating[data-position=right-start]{transform-origin:0 0}.Floating[data-position=bottom-end],.Floating[data-position=left-start]{transform-origin:100% 0}.Floating[data-position=right]{transform-origin:0}.Floating[data-position=left]{transform-origin:100%}.IconStack{justify-content:center;align-items:center;display:inline-flex;position:relative}.IconStack .Icon:before{vertical-align:middle}.IconStack .Icon:not(:first-child){position:absolute}.ImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color)*2)/var(--imagebutton-transparecy));border:var(--border-thickness-tiny)solid hsl(from var(--imagebutton-color)h s calc(l + var(--adjust-color))/var(--imagebutton-transparecy));border-radius:var(--border-radius-medium);transition-property:background-color,border-color,box-shadow;transition-duration:var(--transition-time-medium);border-width:0;margin:.25em;display:inline-flex;position:relative;overflow:hidden}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(.ImageButton--fluid) .ImageButton__content{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-hover)));border-top:var(--border-thickness-tiny)solid var(--imagebutton-color)}.ImageButton__container{border-color:inherit;transition:opacity var(--transition-time-medium);flex-direction:column;display:flex}.ImageButton__image{pointer-events:none;padding:var(--space-s);border:var(--border-thickness-tiny)solid;border-bottom:none;border-color:inherit;border-radius:var(--border-radius-medium)var(--border-radius-medium)0 0;transition:filter var(--transition-time-slow);align-self:center;line-height:0;position:relative;overflow:hidden}.ImageButton__image--fallback{text-align:center;color:var(--color-text-translucent);align-content:center}.ImageButton__image--fallback:before{zoom:.75;width:100%;display:table}.ImageButton__content{white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-fixed-white);z-index:2;padding:.25em .33em;overflow:hidden}.ImageButton__buttons{left:var(--border-thickness-tiny);z-index:1;max-width:100%;display:flex;position:absolute;bottom:1.8em;overflow:hidden}.ImageButton__buttons--alt{pointer-events:none;top:var(--border-thickness-tiny);text-shadow:0px 1px 2px var(--color-base),-1px 0px 2px var(--color-base),1px 0px 2px var(--color-base),0px -1px 2px var(--color-base);flex-direction:column;overflow:visible;bottom:unset!important}.ImageButton__buttons--empty{bottom:0;left:0}.ImageButton__buttons>*{border-radius:0!important;margin:0!important;padding:0!important}.ImageButton--empty{border-width:var(--border-thickness-tiny)}.ImageButton--empty .ImageButton__image{border-radius:var(--border-radius-medium);border:none}.Stack>.ImageButton,.Stack__item>.ImageButton{margin:0}.ImageButton--fluid{border-width:var(--border-thickness-tiny);flex-direction:row;margin:0 0 .33em;display:flex}.ImageButton--fluid:last-child{margin-bottom:0}.ImageButton--fluid .ImageButton__container{flex-direction:row;flex:1}.ImageButton--fluid .ImageButton__image{border:0;margin:0 auto;padding:0}.ImageButton--fluid .ImageButton__content{white-space:normal;color:var(--color-text);flex-direction:column;flex:1;justify-content:center;margin:0 .5em;padding:0;display:flex}.ImageButton--fluid .ImageButton__content--title{padding:.5em;font-weight:700}.ImageButton--fluid .ImageButton__content--divider{border-bottom:var(--border-thickness-small)solid var(--color-border)}.ImageButton--fluid .ImageButton__content--text{padding:.5em}.ImageButton--fluid .ImageButton__buttons{left:inherit;bottom:inherit;background-color:inherit;position:relative}.ImageButton--fluid .ImageButton__buttons--alt{pointer-events:all;top:inherit;text-shadow:none}.ImageButton--fluid .ImageButton__buttons--alt>*{border-top:1px solid rgba(255,255,255,.075)}.ImageButton--fluid .ImageButton__buttons--alt>:first-child{border-top:0}.ImageButton--fluid .ImageButton__buttons>*{text-align:center;white-space:pre-wrap;border-left:var(--border-thickness-tiny)solid var(--color-border);flex-direction:column;justify-content:center;height:100%;line-height:1.15em;display:inline-flex}.ImageButton__color--red{--imagebutton-color:var(--color-red)}.ImageButton__color--orange{--imagebutton-color:var(--color-orange)}.ImageButton__color--yellow{--imagebutton-color:var(--color-yellow);--color-text-fixed-white:var(--color-black)}.ImageButton__color--olive{--imagebutton-color:var(--color-olive)}.ImageButton__color--green{--imagebutton-color:var(--color-green)}.ImageButton__color--teal{--imagebutton-color:var(--color-teal)}.ImageButton__color--blue{--imagebutton-color:var(--color-blue)}.ImageButton__color--violet{--imagebutton-color:var(--color-violet)}.ImageButton__color--purple{--imagebutton-color:var(--color-purple)}.ImageButton__color--pink{--imagebutton-color:var(--color-pink)}.ImageButton__color--brown{--imagebutton-color:var(--color-brown)}.ImageButton__color--gold{--imagebutton-color:var(--color-gold)}.ImageButton__color--black{--imagebutton-color:var(--color-black)}.ImageButton__color--white{--imagebutton-color:var(--color-white);--color-text-fixed-white:var(--color-black)}.ImageButton__color--grey,.ImageButton__color--gray{--imagebutton-color:var(--color-grey)}.ImageButton__color--light-grey,.ImageButton__color--light-gray{--imagebutton-color:var(--color-light-grey)}.ImageButton__color--good{--imagebutton-color:var(--color-good)}.ImageButton__color--average{--imagebutton-color:var(--color-average)}.ImageButton__color--bad{--imagebutton-color:var(--color-bad)}.ImageButton__color--label{--imagebutton-color:var(--color-label)}.ImageButton__color--transparent{--imagebutton-color:var(--color-text-translucent-light);--imagebutton-transparecy:.1;background-color:transparent;border-color:transparent!important}.ImageButton__color--transparent .ImageButton__content{color:var(--color-text-translucent-light);background-color:transparent!important;border-color:transparent!important}.ImageButton__color--transparent.ImageButton--disabled{background-color:hsL(from var(--color-red)h s l/.15)!important}.ImageButton__color--transparent.ImageButton--selected{background-color:hsL(from var(--color-good)h s l/.15)}.ImageButton__color--default{--imagebutton-color:hsl(from var(--color-base)h s 30)}.ImageButton__color--primary{--imagebutton-color:hsl(from var(--color-primary)h s l)}.ImageButton--selected{--imagebutton-color:hsl(from var(--button-background-selected)h s calc(l*1.15));--color-text-fixed-white:var(--color-white)}.ImageButton--disabled .ImageButton__container{cursor:var(--cursor-disabled);opacity:.5}.ImageButton--disabled.ImageButton--fluid{-webkit-filter:contrast(75%);filter:contrast(75%)}.ImageButton--disabled.ImageButton--fluid .ImageButton__buttons{-webkit-filter:contrast(125%);filter:contrast(125%)}.Input{background-color:var(--input-background);border-radius:var(--input-border-radius);border:var(--border-thickness-tiny)solid var(--input-border-color);color:var(--input-color);font-size:1em;font-family:var(--input-font-family);padding:var(--space-xxs)var(--space-sm);width:var(--input-width)}.Input:focus{outline:none}.Input:focus-within{border-color:var(--input-border-color-focus)}.Input::-webkit-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::-ms-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::placeholder{color:var(--input-color-placeholder);font-style:italic}.Input--disabled{border-color:var(--input-border-disabled);color:var(--input-color-placeholder)}.Input--fluid{width:100%}.Input--monospace{font-family:var(--input-font-family-mono)}.Knob{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-n-resize);width:2.6em;height:2.6em;margin:0 auto -.2em;font-size:1rem;position:relative}.Knob:after{content:".";color:transparent;line-height:2.5em}.Knob__circle{inset:var(--knob-inner-padding);background-color:var(--knob-color);background-image:linear-gradient(to bottom,hsl(from var(--knob-color)h s calc(l + 15))0%,var(--knob-color)100%);border-radius:var(--border-radius-circular);box-shadow:var(--shadow-glow-medium)hsl(from var(--knob-color)h s l/.25);margin:.3em;position:absolute}.Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.Knob__cursor{background-color:hsl(from var(--knob-color)h s 85);width:.2em;height:.8em;margin:0 auto;position:relative;top:.05em}.Knob__popupValue{white-space:nowrap;text-align:center;padding:var(--space-s)var(--space-m);background-color:var(--knob-popup-background);color:var(--knob-popup-color);border-radius:var(--knob-popup-border-radius);-webkit-backdrop-filter:var(--knob-popup-blur);backdrop-filter:var(--knob-popup-blur);font-size:1rem;position:absolute;top:0;left:50%;transform:translateY(-100%)translate(-50%)}.Knob__ring{padding:var(--knob-inner-padding);position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.Knob__ringTrackPivot{transform:rotate(135deg)}.Knob__ringTrack{fill:transparent;stroke:hsl(from var(--ring-color,var(--knob-ring-color))h s l/.15);stroke-width:8px;stroke-linecap:round;stroke-dasharray:235.62}.Knob__ringFillPivot{transform:rotate(135deg)}.Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.Knob__ringFill{fill:transparent;stroke:var(--ring-color,var(--knob-ring-color));stroke-width:8px;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke var(--transition-time-medium)ease-out}.Knob--color--red{--ring-color:var(--color-red)}.Knob--color--orange{--ring-color:var(--color-orange)}.Knob--color--yellow{--ring-color:var(--color-yellow)}.Knob--color--olive{--ring-color:var(--color-olive)}.Knob--color--green{--ring-color:var(--color-green)}.Knob--color--teal{--ring-color:var(--color-teal)}.Knob--color--blue{--ring-color:var(--color-blue)}.Knob--color--violet{--ring-color:var(--color-violet)}.Knob--color--purple{--ring-color:var(--color-purple)}.Knob--color--pink{--ring-color:var(--color-pink)}.Knob--color--brown{--ring-color:var(--color-brown)}.Knob--color--gold{--ring-color:var(--color-gold)}.Knob--color--black{--ring-color:var(--color-black)}.Knob--color--white{--ring-color:var(--color-white)}.Knob--color--grey,.Knob--color--gray{--ring-color:var(--color-grey)}.Knob--color--light-grey,.Knob--color--light-gray{--ring-color:var(--color-light-grey)}.Knob--color--primary{--ring-color:var(--color-primary)}.Knob--color--good{--ring-color:var(--color-good)}.Knob--color--average{--ring-color:var(--color-average)}.Knob--color--bad{--ring-color:var(--color-bad)}.Knob--color--label{--ring-color:var(--color-label)}.LabeledList{border-collapse:collapse;border-spacing:0;width:calc(100% + 1em);margin:calc(-1*var(--space-s))calc(-1*var(--space-m))0;padding:0;display:table}.LabeledList__row{display:table-row}.LabeledList__row:last-child .LabeledList__cell{padding-bottom:0}.LabeledList__cell{padding:var(--space-s)var(--space-m);text-align:left;border:0;margin:0;display:table-cell}.LabeledList__label--nowrap{white-space:nowrap;width:1%;min-width:5em}.LabeledList__buttons{white-space:nowrap;text-align:right;width:.1%;padding-top:var(--space-xxs);padding-bottom:0}.LabeledList__breakContents{word-break:break-all;word-wrap:break-word}.MenuBar{display:flex}.MenuBar__font{font-family:var(--menu-bar-font-family);font-size:1em;line-height:1.41667em}.MenuBar__hover:hover{background-color:hsl(from var(--menu-bar-background)h s calc(l + 20));transition:background-color}.MenuBar__MenuBarButton{padding:var(--space-s)var(--space-m)}.MenuBar__menu{background-color:var(--menu-bar-background);padding:var(--space-sm);z-index:5;position:absolute;box-shadow:4px 6px 5px -2px rgba(0,0,0,.5)}.MenuBar__MenuItem{transition:background-color var(--menu-bar-transition)ease-out;background-color:var(--menu-bar-background);white-space:nowrap;padding:var(--space-sm)var(--space-xl)var(--space-sm)calc(var(--space-xxl) + 1rem)}.MenuBar__MenuItemToggle{padding:var(--space-sm)var(--space-xl)var(--space-sm)0}.MenuBar__MenuItemToggle__check{vertical-align:middle;text-align:center;min-width:2.5rem;padding-left:var(--space-sm);display:inline-block}.MenuBar__over{top:auto;bottom:100%}.MenuBar__MenuBarButton-text{text-overflow:clip;white-space:nowrap;height:1.41667em}.MenuBar__Separator{margin:var(--space-sm);border-top:var(--border-thickness-tiny)solid var(--color-border);display:block}.Modal{background-color:var(--modal-background);padding:var(--modal-padding)}.Modal__dimmer .Dimmer__inner{max-width:calc(100vw - var(--space-xxl));max-height:calc(100vh - var(--space-xxl))}.NoticeBox{--noticebox-background:var(--notice-box-background);padding:var(--space-sm)var(--space-m);margin-bottom:var(--space-m);background-color:oklch(from var(--noticebox-background)calc(l*.825)calc(c*.75)h);background-image:repeating-linear-gradient(-45deg,transparent 0 .833333em,var(--notice-box-stripes).833333em 1.66667em);color:var(--notice-box-color);font-style:italic;font-weight:700}.NoticeBox--color--red{--noticebox-background:var(--color-red)}.NoticeBox--color--orange{--noticebox-background:var(--color-orange)}.NoticeBox--color--yellow{--noticebox-background:var(--color-yellow);--notice-box-color:var(--color-black)}.NoticeBox--color--olive{--noticebox-background:var(--color-olive)}.NoticeBox--color--green{--noticebox-background:var(--color-green)}.NoticeBox--color--teal{--noticebox-background:var(--color-teal)}.NoticeBox--color--blue{--noticebox-background:var(--color-blue)}.NoticeBox--color--violet{--noticebox-background:var(--color-violet)}.NoticeBox--color--purple{--noticebox-background:var(--color-purple)}.NoticeBox--color--pink{--noticebox-background:var(--color-pink)}.NoticeBox--color--brown{--noticebox-background:var(--color-brown)}.NoticeBox--color--gold{--noticebox-background:var(--color-gold)}.NoticeBox--color--black{--noticebox-background:var(--color-black);--notice-box-stripes:rgba(255,255,255,.1)}.NoticeBox--color--white{--noticebox-background:var(--color-white);--notice-box-color:var(--color-black)}.NoticeBox--color--grey,.NoticeBox--color--gray{--noticebox-background:var(--color-grey)}.NoticeBox--color--light-grey,.NoticeBox--color--light-gray{--noticebox-background:var(--color-light-grey)}.NoticeBox--color--primary{--noticebox-background:var(--color-primary)}.NoticeBox--color--good{--noticebox-background:var(--color-good)}.NoticeBox--color--average{--noticebox-background:var(--color-average)}.NoticeBox--color--bad{--noticebox-background:var(--color-bad)}.NoticeBox--color--label{--noticebox-background:var(--color-label)}.NoticeBox--type--info{--noticebox-background:var(--color-blue)}.NoticeBox--type--success{--noticebox-background:var(--color-green)}.NoticeBox--type--warning{--noticebox-background:var(--color-orange)}.NoticeBox--type--danger{--noticebox-background:var(--color-red)}.NumberInput{cursor:var(--cursor-n-resize);text-align:right;padding:0 var(--space-sm);margin-right:var(--space-xs);background-color:var(--number-input-background);color:var(--number-input-border-color-active);border:var(--border-thickness-tiny)solid var(--number-input-border-color);border-radius:var(--number-input-border-radius);transition:border-color var(--number-input-transition);line-height:1.41667em;display:inline-block;position:relative;overflow:visible}.NumberInput:active{border-color:var(--number-input-border-color-active)}.NumberInput--fluid{display:block}.NumberInput__content{margin-left:var(--space-m)}.NumberInput__barContainer{top:var(--space-xs);bottom:var(--space-xs);left:var(--space-xs);position:absolute}.NumberInput__bar{box-sizing:border-box;border-bottom:var(--border-thickness-tiny)solid var(--number-input-border-color-active);background-color:var(--number-input-border-color-active);width:.25em;position:absolute;bottom:0;left:0}.NumberInput__input{text-align:right;width:100%;height:1.41667em;padding:0 var(--space-m);font-size:1em;line-height:1.41667em;font-family:var(--font-family);background-color:var(--number-input-background);color:var(--number-input-color);border:0;outline:0;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar{width:100%;min-height:var(--button-height);padding:0 var(--space-m);background-color:var(--progress-bar-background);border:var(--border-thickness-tiny)solid var(--progress-bar-color);border-radius:var(--progress-bar-border-radius);transition:border-color var(--progress-bar-transition)ease-out;align-content:center;display:inline-block;position:relative}.ProgressBar__fill{background-color:var(--progress-bar-color);position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar__fill--animated{transition-property:background-color,width;transition-duration:var(--progress-bar-transition)}.ProgressBar__content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:right;width:100%;position:relative}.ProgressBar--color--default{--progress-bar-color:hsl(from var(--progress-bar-fill)h s calc(l - var(--adjust-color)))}.ProgressBar--color--red{--progress-bar-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))}.ProgressBar--color--orange{--progress-bar-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))}.ProgressBar--color--yellow{--progress-bar-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))}.ProgressBar--color--olive{--progress-bar-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))}.ProgressBar--color--green{--progress-bar-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))}.ProgressBar--color--teal{--progress-bar-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))}.ProgressBar--color--blue{--progress-bar-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))}.ProgressBar--color--violet{--progress-bar-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))}.ProgressBar--color--purple{--progress-bar-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))}.ProgressBar--color--pink{--progress-bar-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))}.ProgressBar--color--brown{--progress-bar-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))}.ProgressBar--color--gold{--progress-bar-color:hsl(from var(--color-gold)h s calc(l - var(--adjust-color)))}.ProgressBar--color--black{--progress-bar-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))}.ProgressBar--color--white{--progress-bar-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))}.ProgressBar--color--grey,.ProgressBar--color--gray{--progress-bar-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--light-grey,.ProgressBar--color--light-gray{--progress-bar-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--primary{--progress-bar-color:hsl(from var(--color-primary)h s calc(l - var(--adjust-color)))}.ProgressBar--color--good{--progress-bar-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))}.ProgressBar--color--average{--progress-bar-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))}.ProgressBar--color--bad{--progress-bar-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))}.ProgressBar--color--label{--progress-bar-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))}.RestrictedInput{border-color:var(--restricted-input-border-color);text-align:right}.RestrictedInput:focus-within{border-color:var(--restricted-input-border-color-focus)}.RestrictedInput::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput--invalid{border-color:var(--restricted-input-border-color-invalid)}.RestrictedInput--invalid:focus-within{border-color:var(--restricted-input-border-color-invalid)}@keyframes RoundGauge__alertAnim{0%,to{opacity:.1}50%{opacity:1}}@keyframes RoundGauge__needleAlertAnim{0%{transform:rotate(var(--round-gauge-needle-alert-rotation))}50%{transform:rotate(calc(-1*var(--round-gauge-needle-alert-rotation)))}}.RoundGauge{width:2.6em;height:1.3em;margin:0 auto .2em;font-size:1rem}.RoundGauge__wrapper{text-align:center;display:inline-block}.RoundGauge__ringTrack{fill:transparent;stroke:rgba(255,255,255,.1);stroke-width:10px;stroke-dasharray:157.08;stroke-dashoffset:157.08px}.RoundGauge__ringFill{fill:transparent;stroke:var(--round-gauge-ring-color);stroke-width:10px;stroke-dasharray:314.16;transition:stroke var(--round-gauge-transition)ease-out}.RoundGauge__needle,.RoundGauge__ringFill{transition:transform var(--round-gauge-transition)ease-in-out}.RoundGauge__needleLine,.RoundGauge__needleMiddle{fill:var(--color-red)}.RoundGauge__alert{fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;fill:rgba(255,255,255,.1);transform-origin:top;transform:scale(.9)}.RoundGauge__alert.active{animation:RoundGauge__alertAnim var(--round-gauge-alert-animation)cubic-bezier(.34,1.56,.64,1)infinite}.RoundGauge__alert.active~.RoundGauge__needle .RoundGauge__needleLine{transform-origin:bottom;animation:RoundGauge__needleAlertAnim var(--round-gauge-needle-alert-animation)infinite}.RoundGauge__alert.max{fill:var(--color-bad)}.RoundGauge--color--red.RoundGauge__ringFill{stroke:var(--color-red)}.RoundGauge--color--orange.RoundGauge__ringFill{stroke:var(--color-orange)}.RoundGauge--color--yellow.RoundGauge__ringFill{stroke:var(--color-yellow)}.RoundGauge--color--olive.RoundGauge__ringFill{stroke:var(--color-olive)}.RoundGauge--color--green.RoundGauge__ringFill{stroke:var(--color-green)}.RoundGauge--color--teal.RoundGauge__ringFill{stroke:var(--color-teal)}.RoundGauge--color--blue.RoundGauge__ringFill{stroke:var(--color-blue)}.RoundGauge--color--violet.RoundGauge__ringFill{stroke:var(--color-violet)}.RoundGauge--color--purple.RoundGauge__ringFill{stroke:var(--color-purple)}.RoundGauge--color--pink.RoundGauge__ringFill{stroke:var(--color-pink)}.RoundGauge--color--brown.RoundGauge__ringFill{stroke:var(--color-brown)}.RoundGauge--color--gold.RoundGauge__ringFill{stroke:var(--color-gold)}.RoundGauge--color--black.RoundGauge__ringFill{stroke:var(--color-black)}.RoundGauge--color--white.RoundGauge__ringFill{stroke:var(--color-white)}.RoundGauge--color--grey.RoundGauge__ringFill,.RoundGauge--color--gray.RoundGauge__ringFill{stroke:var(--color-grey)}.RoundGauge--color--light-grey.RoundGauge__ringFill,.RoundGauge--color--light-gray.RoundGauge__ringFill{stroke:var(--color-light-grey)}.RoundGauge--color--primary.RoundGauge__ringFill{stroke:var(--color-primary)}.RoundGauge--color--good.RoundGauge__ringFill{stroke:var(--color-good)}.RoundGauge--color--average.RoundGauge__ringFill{stroke:var(--color-average)}.RoundGauge--color--bad.RoundGauge__ringFill{stroke:var(--color-bad)}.RoundGauge--color--label.RoundGauge__ringFill{stroke:var(--color-label)}.RoundGauge__alert--red{fill:var(--color-red)}.RoundGauge__alert--orange{fill:var(--color-orange)}.RoundGauge__alert--yellow{fill:var(--color-yellow)}.RoundGauge__alert--olive{fill:var(--color-olive)}.RoundGauge__alert--green{fill:var(--color-green)}.RoundGauge__alert--teal{fill:var(--color-teal)}.RoundGauge__alert--blue{fill:var(--color-blue)}.RoundGauge__alert--violet{fill:var(--color-violet)}.RoundGauge__alert--purple{fill:var(--color-purple)}.RoundGauge__alert--pink{fill:var(--color-pink)}.RoundGauge__alert--brown{fill:var(--color-brown)}.RoundGauge__alert--gold{fill:var(--color-gold)}.RoundGauge__alert--black{fill:var(--color-black)}.RoundGauge__alert--white{fill:var(--color-white)}.RoundGauge__alert--grey,.RoundGauge__alert--gray{fill:var(--color-grey)}.RoundGauge__alert--light-grey,.RoundGauge__alert--light-gray{fill:var(--color-light-grey)}.RoundGauge__alert--primary{fill:var(--color-primary)}.RoundGauge__alert--good{fill:var(--color-good)}.RoundGauge__alert--average{fill:var(--color-average)}.RoundGauge__alert--bad{fill:var(--color-bad)}.RoundGauge__alert--label{fill:var(--color-label)}.Section{margin-bottom:var(--space-m);background-color:var(--section-background);box-sizing:border-box;scrollbar-color:var(--color-scrollbar-thumb)transparent;position:relative}.Section:last-child{margin-bottom:0}.Section__title{padding:var(--space-m);border-bottom:var(--section-separator-thickness)solid var(--section-separator-color);position:relative}.Section__titleText{color:var(--section-title-color);font-size:1.16667em;font-weight:700}.Section__buttons{right:var(--space-m);margin-top:calc(-1*var(--space-xxs));display:inline-block;position:absolute}.Section__rest{position:relative}.Section__content{padding:var(--space-ml)var(--space-m)}.Section--fitted>.Section__rest>.Section__content{padding:0}.Section--fill{flex-direction:column;height:100%;display:flex}.Section--fill>.Section__rest{flex-grow:1}.Section--fill>.Section__rest>.Section__content{height:100%}.Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;bottom:0;left:0;right:0}.Section--scrollable{overflow:hidden}.Section--scrollable>.Section__rest>.Section__content{overflow-x:hidden;overflow-y:auto}.Section--scrollableHorizontal{overflow:hidden}.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-x:auto;overflow-y:hidden}.Section--scrollable.Section--scrollableHorizontal{overflow:hidden}.Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow:auto}.Section .Section{margin:0 calc(-1*var(--space-m));background-color:transparent}.Section .Section:first-child{margin-top:calc(-1*var(--space-m))}.Section .Section .Section__titleText{font-size:1.08333em}.Section .Section .Section .Section__titleText{font-size:1em}.Section--flex{flex-flow:column;display:flex}.Section--flex .Section__content{flex-grow:1;overflow:auto}.Section__content--noTopPadding{padding-top:0}.Section__content--stretchContents{height:calc(100% - 3rem)}.Slider{cursor:e-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Slider--editing .Slider__cursor:before{display:none}.Slider__cursor{inset:0 calc(-1*var(--space-xxs));left:unset;border-left:var(--border-thickness-small)solid var(--slider-cursor-color);border-radius:var(--border-radius-circular);position:absolute}.Slider__cursorOffset{position:absolute;top:0;bottom:0;left:0;right:0;transition:none!important}.Slider__cursor:before{content:"";aspect-ratio:1;border-left:inherit;transform-origin:50%;position:absolute;bottom:0;right:0;transform:scale(4)translateY(50%)rotate(45deg);-webkit-mask-image:linear-gradient(135deg,#000 50%,transparent 50%);mask-image:linear-gradient(135deg,#000 50%,transparent 50%)}.Slider__popupValue{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;padding:var(--space-s)var(--space-m);background-color:var(--slider-popup-background);color:var(--slider-popup-color);border-radius:var(--slider-popup-border-radius);-webkit-backdrop-filter:var(--slider-popup-blur);backdrop-filter:var(--slider-popup-blur);font-size:1em;position:absolute;top:-2em;right:0;transform:translate(50%)}.Slider .NumberInput__input{width:auto;height:auto;top:2px;bottom:2px;left:2px;right:2px}.Stack{gap:.5em}.Stack--fill{height:100%}.Stack--zebra>.Stack__item:nth-child(odd){background-color:var(--candystripe-odd)}.Stack--horizontal>.Stack__divider:not(.Stack__divider--hidden){border-left:var(--divider-border)}.Stack--vertical>.Stack__divider:not(.Stack__divider--hidden){border-top:var(--divider-border)}.Table{border-collapse:collapse;border-spacing:0;width:100%;margin:0;display:table}.Table--collapsing{width:auto}.Table__row{display:table-row}.Table__cell{padding:0 var(--space-s);display:table-cell}.Table__cell:first-child{padding-left:0}.Table__cell:last-child{padding-right:0}.Table__row--header .Table__cell,.Table__cell--header{padding-bottom:var(--space-m);font-weight:700}.Table__cell--collapsing{white-space:nowrap;width:1%}.Tabs{background-color:var(--tabs-container-background);align-items:stretch;display:flex;position:relative;overflow:hidden}.Tabs--fill{height:100%}.Tabs--vertical{padding:var(--space-s)0 var(--space-s)var(--space-s);flex-direction:column}.Tabs--horizontal{margin-bottom:var(--space-m);padding:var(--space-s)var(--space-s)0}.Tabs--horizontal:last-child{margin-bottom:0}.Tabs__Tab{flex-grow:0}.Tabs--fluid .Tabs__Tab{flex-grow:1}.Tab{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-pointer);background-color:var(--tab-background);color:var(--tab-color);min-width:4em;min-height:2.25em;transition-property:background-color,color;transition-duration:var(--tab-transition);justify-content:space-between;align-items:center;display:flex}.Tab:not(.Tab--selected):hover{background-color:var(--tab-background-hover)}.Tab:not(.Tab--selected):active{color:var(--tab-color-selected)}.Tab--selected{cursor:var(--cursor-default);background-color:var(--tab-background-selected);color:var(--tab-color-selected)}.Tab .Tab__text{margin:0 var(--space-m);flex-grow:1}.Tab__left{text-align:center;min-width:1.5em;margin-left:var(--space-s)}.Tab__right{text-align:center;min-width:1.5em;margin-right:var(--space-s)}.Tabs--horizontal .Tab{border-top-left-radius:var(--tab-border-radius);border-top-right-radius:var(--tab-border-radius);padding-bottom:var(--tab-indicator-size);position:relative}.Tabs--horizontal .Tab:before{content:"";transition:transform var(--tab-transition);width:100%;height:var(--tab-indicator-size);background-color:currentColor;position:absolute;bottom:0;transform:scaleX(0)}.Tabs--horizontal .Tab--selected:before{transform:scaleX(.99999)!important}.Tabs--vertical .Tab{border-top-left-radius:var(--tab-border-radius);border-bottom-left-radius:var(--tab-border-radius);min-height:2em;padding-right:var(--tab-indicator-size);position:relative}.Tabs--vertical .Tab:before{content:"";transition:transform var(--tab-transition);width:var(--tab-indicator-size);background-color:currentColor;height:100%;position:absolute;right:0;transform:scaleY(0)}.Tabs--vertical .Tab--selected:before{transform:scaleY(.99999)!important}.Tabs--scrollable{--mask-width:3.25em;--mask-left:0rem;--mask-right:0rem;padding:0;display:grid}.Tabs--scrollable-content{scrollbar-width:none;overscroll-behavior:none;padding:var(--space-s)var(--space-s)0;-webkit-mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));flex-wrap:nowrap;display:flex;overflow:auto}.Tabs--scrollable-content.scrollable-left.scrollable-right{--mask-left:var(--mask-width);--mask-right:var(--mask-width)}.Tabs--scrollable-content.scrollable-left{--mask-left:var(--mask-width)}.Tabs--scrollable-content.scrollable-right{--mask-right:var(--mask-width)}.Tabs--scrollable .scroll-left,.Tabs--scrollable .scroll-right{z-index:1;border-radius:0;align-content:center;height:100%;margin:0;position:absolute;top:0}.Tabs--scrollable .scroll-left{left:0}.Tabs--scrollable .scroll-right{right:0}.Tabs--scrollable .Tab{flex-shrink:0}.Tab--selected.Tab--color--red{color:hsl(from var(--color-red)h s calc(l + 17.5))}.Tab--selected.Tab--color--orange{color:hsl(from var(--color-orange)h s calc(l + 17.5))}.Tab--selected.Tab--color--yellow{color:hsl(from var(--color-yellow)h s calc(l + 17.5))}.Tab--selected.Tab--color--olive{color:hsl(from var(--color-olive)h s calc(l + 17.5))}.Tab--selected.Tab--color--green{color:hsl(from var(--color-green)h s calc(l + 17.5))}.Tab--selected.Tab--color--teal{color:hsl(from var(--color-teal)h s calc(l + 17.5))}.Tab--selected.Tab--color--blue{color:hsl(from var(--color-blue)h s calc(l + 17.5))}.Tab--selected.Tab--color--violet{color:hsl(from var(--color-violet)h s calc(l + 17.5))}.Tab--selected.Tab--color--purple{color:hsl(from var(--color-purple)h s calc(l + 17.5))}.Tab--selected.Tab--color--pink{color:hsl(from var(--color-pink)h s calc(l + 17.5))}.Tab--selected.Tab--color--brown{color:hsl(from var(--color-brown)h s calc(l + 17.5))}.Tab--selected.Tab--color--gold{color:hsl(from var(--color-gold)h s calc(l + 17.5))}.Tab--selected.Tab--color--black{color:hsl(from var(--color-black)h s calc(l + 17.5))}.Tab--selected.Tab--color--white{color:hsl(from var(--color-white)h s calc(l + 17.5))}.Tab--selected.Tab--color--grey,.Tab--selected.Tab--color--gray{color:hsl(from var(--color-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--light-grey,.Tab--selected.Tab--color--light-gray{color:hsl(from var(--color-light-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--primary{color:hsl(from var(--color-primary)h s calc(l + 17.5))}.Tab--selected.Tab--color--good{color:hsl(from var(--color-good)h s calc(l + 17.5))}.Tab--selected.Tab--color--average{color:hsl(from var(--color-average)h s calc(l + 17.5))}.Tab--selected.Tab--color--bad{color:hsl(from var(--color-bad)h s calc(l + 17.5))}.Tab--selected.Tab--color--label{color:hsl(from var(--color-label)h s calc(l + 17.5))}.Section .Tabs{background-color:transparent}.Section:not(.Section--fitted) .Tabs{margin:0 calc(-1*var(--space-m))var(--space-m)}.Section:not(.Section--fitted) .Tabs:first-child{margin-top:calc(-1*var(--space-m))}.TextArea{resize:none;scrollbar-width:thin;scrollbar-gutter:stable;scrollbar-color:var(--color-scrollbar-thumb)transparent}.Tooltip{-webkit-backdrop-filter:var(--tooltip-blur);backdrop-filter:var(--tooltip-blur);background-color:var(--tooltip-background);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);max-width:20.8333em;padding:var(--space-m)var(--space-l);pointer-events:none;text-align:left;box-shadow:.1em .1em 1.25em -.1em rgba(0,0,0,.5)}html,body{box-sizing:border-box;height:100%;font-size:var(--font-size,12px);color:var(--color-text,#fff);scrollbar-color:var(--color-scrollbar-thumb)var(--color-scrollbar-base);margin:0}html{cursor:var(--cursor-default,default);overflow:hidden}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);overflow:auto}img{image-rendering:pixelated}*,:before,:after{box-sizing:inherit}h1,h2,h3,h4,h5,h6{padding:var(--space-m,6px)0;padding:var(--space-m,.5rem)0;margin:0;display:block}h1{font-size:1.5rem}h2{font-size:1.333rem}h3{font-size:1.167rem}h4{font-size:1rem}td,th{vertical-align:baseline;text-align:left}:where(.candystripe:nth-child(odd)){background-color:var(--candystripe-odd)}:where(.candystripe:nth-child(2n)){background-color:var(--candystripe-even)}.color-black{color:hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.color-white{color:hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.color-red{color:hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.color-orange{color:hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.color-yellow{color:hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.color-olive{color:hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.color-green{color:hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.color-teal{color:hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.color-blue{color:hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.color-violet{color:hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.color-purple{color:hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.color-pink{color:hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.color-brown{color:hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.color-grey,.color-gray{color:hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.color-light-grey,.color-light-gray{color:hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.color-good{color:hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.color-average{color:hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.color-bad{color:hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.color-label{color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.color-bg-black{background-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))!important}.color-bg-white{background-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))!important}.color-bg-red{background-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))!important}.color-bg-orange{background-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))!important}.color-bg-yellow{background-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))!important}.color-bg-olive{background-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))!important}.color-bg-green{background-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))!important}.color-bg-teal{background-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))!important}.color-bg-blue{background-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))!important}.color-bg-violet{background-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))!important}.color-bg-purple{background-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))!important}.color-bg-pink{background-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))!important}.color-bg-brown{background-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))!important}.color-bg-grey,.color-bg-gray{background-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-light-grey,.color-bg-light-gray{background-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-good{background-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))!important}.color-bg-average{background-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))!important}.color-bg-bad{background-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))!important}.color-bg-label{background-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))!important}.debug-layout,.debug-layout :not(g):not(path){color:rgba(255,255,255,.9)!important;box-shadow:none!important;-webkit-filter:none!important;filter:none!important;background:0 0!important;outline:1px solid rgba(255,255,255,.5)!important}.debug-layout:hover,.debug-layout :not(g):not(path):hover{outline-color:rgba(255,255,255,.8)!important}.outline-dotted{outline-style:dotted!important}.outline-dashed{outline-style:dashed!important}.outline-solid{outline-style:solid!important}.outline-double{outline-style:double!important}.outline-groove{outline-style:groove!important}.outline-ridge{outline-style:ridge!important}.outline-inset{outline-style:inset!important}.outline-outset{outline-style:outset!important}.outline-color-black{outline:var(--border-thickness-small)solid hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.outline-color-white{outline:var(--border-thickness-small)solid hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.outline-color-red{outline:var(--border-thickness-small)solid hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.outline-color-orange{outline:var(--border-thickness-small)solid hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.outline-color-yellow{outline:var(--border-thickness-small)solid hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.outline-color-olive{outline:var(--border-thickness-small)solid hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.outline-color-green{outline:var(--border-thickness-small)solid hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.outline-color-teal{outline:var(--border-thickness-small)solid hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.outline-color-blue{outline:var(--border-thickness-small)solid hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.outline-color-violet{outline:var(--border-thickness-small)solid hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.outline-color-purple{outline:var(--border-thickness-small)solid hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.outline-color-pink{outline:var(--border-thickness-small)solid hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.outline-color-brown{outline:var(--border-thickness-small)solid hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.outline-color-grey,.outline-color-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-light-grey,.outline-color-light-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-good{outline:var(--border-thickness-small)solid hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.outline-color-average{outline:var(--border-thickness-small)solid hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.outline-color-bad{outline:var(--border-thickness-small)solid hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.outline-color-label{outline:var(--border-thickness-small)solid hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-baseline{text-align:baseline}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-pre{white-space:pre}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-underline{text-decoration:underline}.Chat{color:var(--chat-text-color)}.Chat__badge{color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#db143c;border-radius:10px;min-width:.5em;padding:.2em .3em;font-size:.7em;line-height:1;transition:font-size .2s ease-out;display:inline-block}.Chat__badge:before{content:"x"}.Chat__badge--animate{font-size:.9em;transition:font-size}.Chat__scrollButton{position:fixed;bottom:1em;right:2em}.Chat__reconnected{text-align:center;margin:1em 0 2em;font-size:.85em}.Chat__reconnected:before{content:"Reconnected";color:var(--reconnect-text,var(--color-red));background-color:var(--reconnect-background,var(--color-section));border-radius:1em;padding:0 .7em;display:inline-block}.Chat__reconnected:after{content:"";border-bottom:.166667em solid var(--color-red);margin-top:-.75em;display:block}.Chat__highlight{color:var(--color-black)}.Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.ChatMessage{word-wrap:break-word}.ChatMessage--highlighted{border-left:.166667em solid #ffe045;padding-left:.5em;position:relative}.ChatMessage--highlighted:after{content:"";pointer-events:none;background-color:rgba(255,224,69,.1);position:absolute;top:0;bottom:0;left:0;right:0}.Ping{padding:var(--space-xs)var(--space-sm);border:var(--border-thickness-tiny)solid hsl(from var(--color-border-primary)h 10 50/.33);border-radius:var(--border-radius-medium);text-align:right;min-width:4em;max-width:5em;position:relative}.Ping__indicator{content:"";top:var(--space-m);left:var(--space-m);border-radius:var(--border-radius-medium);background-color:#888;width:.5em;height:.5em;position:absolute}.Notifications{position:absolute;top:1em;left:1em;right:2em}.Notification{color:#fff;background-color:#db143c;margin:1em 0;padding:.5em}.Notification:first-child{margin-top:0}.Notification:last-child{margin-bottom:0}.UnreadCount{pointer-events:none;top:calc(-1*var(--space-s));right:calc(-1*var(--space-s));padding:0 var(--space-s);border-radius:var(--border-radius-small);background-color:var(--color-red);color:var(--color-white);font-size:.65em;line-height:1.25em;position:absolute}.Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.Layout__content--scrollable{margin-bottom:0;overflow-y:auto}.Window{color:var(--color-text);background-color:var(--color-base);background-image:linear-gradient(to bottom,var(--color-base-start)0%,var(--color-base-end)100%);position:fixed;top:0;bottom:0;left:0;right:0}.Window__rest{position:fixed;top:2.66667rem;bottom:0;left:0;right:0}.Window__contentPadding{height:calc(100% - 1rem);margin:.5rem}.Window__contentPadding:after{height:0}.Layout__content--scrollable .Window__contentPadding:after{content:"";height:.5rem;display:block}.Window__dimmer{pointer-events:none;background-color:hsl(from var(--color-base)h s calc(l + 15)/.25);position:fixed;top:0;bottom:0;left:0;right:0}.Window__resizeHandle__se{cursor:var(--cursor-se-resize);width:1.66667rem;height:1.66667rem;position:fixed;bottom:0;right:0}.Window__resizeHandle__s{cursor:var(--cursor-s-resize);height:.5rem;position:fixed;bottom:0;left:0;right:0}.Window__resizeHandle__e{cursor:var(--cursor-e-resize);width:.25rem;position:fixed;top:0;bottom:0;right:0}img{margin:0;padding:0;line-height:1}img.icon{vertical-align:bottom;width:auto;min-width:16px;height:1em;min-height:16px}a{color:#397ea5}em{font-style:normal;font-weight:700}h1,h2,h3,h4,h5,h6{color:#a4bad6;font-family:Georgia,Verdana,sans-serif}.emoji{max-width:16px;max-height:16px}.emoji16x16{vertical-align:middle}.italic,.italics,.emote{font-style:italic}.bold{font-weight:700}.bolditalics{font-style:italic;font-weight:700}.center{text-align:center}.big{font-size:150%}.reallybig{font-size:175%}.sans{font-family:Comic Sans MS,cursive,sans-serif}.wingdings{font-family:Wingdings,Webdings}.robot{font-family:OCR-A,monospace;font-size:1.15em;font-weight:700}.robotemote{color:#6685f5;font-family:OCR-A,monospace;font-size:1.15em;font-style:italic;font-weight:700}.hidden{visibility:hidden;display:none}.motd{color:#a4bad6;white-space:normal;font-family:Verdana,sans-serif}.motd h1,.motd h2,.motd h3,.motd h4,.motd h5,.motd h6{color:#a4bad6;text-decoration:underline}.motd a,.motd a:link,.motd a:active,.motd a:hover{color:#a4bad6}.memo{color:#638500;text-align:center}.memoedit{text-align:center;font-size:75%}.ooc{font-weight:700}.looc{color:#69c;font-weight:700}.discordpm{color:#6685f5}.debug{color:#6d2f83}.deadsay{color:#e2c1ff}.darkmblue{color:#6685f5}.prefix,.name,.yell{font-weight:700}.mentorhelp{color:#07b;font-weight:700}.mentor_channel{color:#b4af13;font-weight:700}.mentor_channel_admin{color:#f1ec50;font-weight:700}.admin{color:#386aff;font-weight:700}.adminhelp{color:#a00;font-weight:700}.adminticket{color:#3daf21;font-weight:700}.adminticketalt{color:#ccb847;font-weight:700}.admin_channel{color:#03fc9d;font-weight:700}.all_admin_ping{color:#12a5f4;text-align:center;font-size:120%;font-weight:700}.dev_channel{color:#61b413;font-weight:700}.dev_channel_admin{color:#9ef14f;font-weight:700}.staff_channel{color:#775bff;font-weight:700}.staff_channel_admin{color:#a35cff;font-weight:700}.radio{color:#20b142}.deptradio{color:#939}.comradio{color:#5f5cff}.syndradio{color:#8f4a4b}.dsquadradio{color:#998599}.airadio{color:#ff5ed7}.centradio{color:#2681a5}.secradio{color:#dd3535}.engradio{color:#feac20}.medradio{color:#00b5ad}.sciradio{color:#c68cfa}.supradio{color:#b88646}.srvradio{color:#bbd164}.proradio{color:#b84f92}.alert{color:#d82020}h1.alert,h2.alert{color:#a4bad6}.ghostalert{color:#cc00c6;font-style:italic;font-weight:700}.warning{color:#c51e1e;font-style:italic}.boldwarning{color:#c51e1e;font-style:italic;font-weight:700}.danger{color:#c51e1e;font-weight:700}.biggerdanger{color:red;font-size:150%;font-weight:700}.userdanger{color:#c51e1e;font-size:120%;font-weight:700}.attack{color:red}.disarm{color:#900}.moderate{color:#c00}.notice{color:#6685f5}.boldnotice{color:#6685f5;font-weight:700}.subtle{color:#8a72c5;font-size:85%;font-style:italic}.suicide{color:#ff5050;font-style:italic}.announcement h1,.announcement h2{color:#a4bad6;margin:8pt 0;line-height:1.2}.announcement p{color:#d82020;line-height:1.3}.announcement.minor h1{font-size:180%}.announcement.minor h2{font-size:170%}.announcement.sec h1{color:red;font-family:Verdana,sans-serif;font-size:180%}.boldannounceic,.boldannounceooc,.pr_announce{color:#c51e1e;font-weight:700}.greenannounce{color:#059223;font-weight:700}.alien{color:#c433c4}.noticealien{color:#00c000}.alertalien{color:#00c000;font-weight:700}.terrorspider{color:#cf52fa}.dantalion{color:#8b2c5e}.chaosverygood{color:#19e0c0;font-size:120%;font-weight:700}.chaosgood{color:#19e0c0;font-weight:700}.chaosneutral{color:#479ac0;font-weight:700}.chaosbad{color:#9047c0;font-weight:700}.chaosverybad{color:#9047c0;font-size:120%;font-weight:700}.sinister{color:purple;font-style:italic;font-weight:700}.blob{color:#ee4000;font-style:italic}.revennotice{color:#6685f5}.revenbignotice{color:#6685f5;font-size:120%;font-weight:700}.revenminor{color:#823abb}.revenwarning{color:#760fbb;font-style:italic}.revendanger{color:#760fbb;font-size:120%;font-weight:700}.changeling{color:#00b4de}.abductor{color:purple;font-style:italic}.mind_control{color:#a00d6f;font-size:120%;font-style:italic;font-weight:700}.cult{color:purple;font-style:italic;font-weight:700}.cultspeech{color:#af0000;font-style:italic}.cultitalic{color:#a60000;font-style:italic}.cultlarge{color:#a60000;font-size:120%;font-weight:700}.narsie{color:#a60000;font-size:300%;font-weight:700}.narsiesmall{color:#a60000;font-size:200%;font-weight:700}.his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.colossus{color:#7f282a;font-size:175%}.hierophant{color:#609;font-style:italic;font-weight:700}.hierophant_warning{color:#609;font-size:175%;font-style:italic;font-weight:700}.tajaran{color:#803b56}.skrell{color:#00ced1}.solcom{color:#8282fb}.com_cygni,.zombie{color:#7c4848}.zombielarge{color:#7c4848;font-size:120%;font-weight:700}.soghun{color:#228b22}.vox{color:#a0a}.diona{color:#804000;font-weight:700}.trinary{color:#727272}.kidan{color:#c64c05}.slime{color:#07a}.drask{color:#a3d4eb;font-family:Arial Black}.moth{color:#869b29;font-family:Copperplate}.skulk{color:#b178b1}.clown{color:red}.vulpkanin{color:#b97a57}.gutter{color:#7092be;font-family:Trebuchet MS,cursive,sans-serif}.tradeband{font-family:Georgia,Verdana,sans-serif}.rose{color:#ff5050}.interface{color:#9031c4}.greentext{color:#0f0;font-size:150%}.redtext{color:red;font-size:150%}.red{color:red}.green{color:#03bb39}.purple{color:#9031c4}.orange{color:orange}.resonate{color:#298f85}.healthscan_oxy{color:#5cc9ff}.specialnotice{color:#4a6f82;font-size:120%;font-weight:700}.whisper{color:#ccc;font-style:italic}span.body .codephrases{color:#55f}span.body .coderesponses{color:#f33}.oxygen{color:#449dff}.nitrogen{color:#f94541}.carbon_dioxide{color:#ccc}.plasma{color:#eb6b00}.sleeping_agent{color:#f28b89}.agent_b{color:teal}.hydrogen{color:#997379}.water_vapor{color:#483d8b}.boxed_message{text-align:center;background:#17191c;border:.0833333em solid rgba(166,183,217,.25);border-width:.0833333em .416667em;border-radius:.5em;margin:.5em .25em;padding:.5em .75em}.boxed_message.red_border{background:#1f1414;border-color:rgba(255,0,0,.5)}.boxed_message.green_border{background:#141f18;border-color:rgba(0,255,0,.5)}.boxed_message.purple_border{background:#1d1828;border-color:rgba(170,128,255,.5)}.boxed_message.notice_border{background:#14181f;border-color:rgba(85,126,246,.5)}.boxed_message.thick_border{border-width:.5em}.boxed_message.left_align_text{text-align:left}:root{--chat-text-color:#b3cce6;--color-base:#202020;--color-section:hsl(from var(--color-base)h s calc(l - 4.2));--base-gradient-spread:0}.theme-light:root{--chat-text-color:var(--color-black);--color-base:#ededed;--color-section:var(--color-white);--color-text:var(--color-black);--color-label:#545454;--color-action:#e6e6e6;--color-scrollbar-thumb:var(--color-light-gray);--primary-lightness:60%;--primary-saturation:60%;--border-primary-alpha:.66;--button-background-selected:hsl(from var(--color-primary)h 100 l);--button-background-caution:#b85a0a;--button-background-danger:#990;--tab-color-selected:var(--color-black);--input-background:var(--color-base);--tooltip-background-lightness:90}.theme-light:root a,.theme-light:root h1,.theme-light:root h2,.theme-light:root h3,.theme-light:root h4,.theme-light:root h5,.theme-light:root h6{color:#00f}.theme-light:root .motd,.theme-light:root .motd h1,.theme-light:root .motd h2,.theme-light:root .motd h3,.theme-light:root .motd h4,.theme-light:root .motd h5,.theme-light:root .motd h6,.theme-light:root .motd a,.theme-light:root .motd a:link,.theme-light:root .motd a:active,.theme-light:root .motd a:hover{color:#638500}.theme-light:root .looc{color:#69c}.theme-light:root .discordpm{color:#00f}.theme-light:root .debug{color:#6d2f83}.theme-light:root .deadsay{color:#5c00e6}.theme-light:root .darkmblue{color:#00f}.theme-light:root .mentorhelp{color:#07b}.theme-light:root .mentor_channel{color:#5e6812}.theme-light:root .mentor_channel_admin{color:#94a419}.theme-light:root .adminhelp{color:#a00}.theme-light:root .adminticket{color:#3e7336}.theme-light:root .adminticketalt{color:#014c8a}.theme-light:root .admin_channel{color:#9a04d1}.theme-light:root .all_admin_ping{color:#12a5f4}.theme-light:root .dev_channel{color:#126719}.theme-light:root .dev_channel_admin{color:#26a419}.theme-light:root .staff_channel{color:#775bff}.theme-light:root .staff_channel_admin{color:#a35cff}.theme-light:root .radio{color:#408010}.theme-light:root .deptradio{color:#939}.theme-light:root .comradio{color:#204090}.theme-light:root .syndradio{color:#6d3f40}.theme-light:root .dsquadradio{color:#686868}.theme-light:root .airadio{color:#f0f}.theme-light:root .centradio{color:#5c5c7c}.theme-light:root .secradio{color:#a30000}.theme-light:root .engradio{color:#a66300}.theme-light:root .medradio{color:#009190}.theme-light:root .sciradio{color:#939}.theme-light:root .supradio{color:#7f6539}.theme-light:root .srvradio{color:#80a000}.theme-light:root .proradio{color:#e3027a}.theme-light:root .alert{color:red}.theme-light:root h1.alert,.theme-light:root h2.alert{color:#000}.theme-light:root .ghostalert{color:#5c00e6}.theme-light:root .warning,.theme-light:root .boldwarning,.theme-light:root .danger,.theme-light:root .userdanger{color:red}.theme-light:root .notice,.theme-light:root .boldnotice{color:#009}.theme-light:root .subtle{color:#009;font-size:85%;font-style:italic}.theme-light:root .announcement h1,.theme-light:root .announcement h2{color:#000}.theme-light:root .announcement.sec h1,.theme-light:root .boldannounceic,.theme-light:root .boldannounceooc{color:red}.theme-light:root .pr_announce{color:#228b22}.theme-light:root .greenannounce{color:#0f0}.theme-light:root .alien{color:#543354}.theme-light:root .terrorspider{color:#320e32}.theme-light:root .dantalion{color:#6a2148}.theme-light:root .revennotice,.theme-light:root .revenbignotice{color:#1d2953}.theme-light:root .changeling{color:purple}.theme-light:root .cultspeech{color:#7f0000}.theme-light:root .cultitalic,.theme-light:root .cultlarge,.theme-light:root .narsie,.theme-light:root .narsiesmall{color:#960000}.theme-light:root .rose{color:#ff5050}.theme-light:root .interface{color:#303}.theme-light:root .purple{color:#5e2d79}.theme-light:root .orange{color:orange}.theme-light:root .healthscan_oxy{color:#0074bd}.theme-light:root .specialnotice{color:#36525e}.theme-light:root .whisper{color:#333}.theme-light:root span.body .codephrases{color:#00f}.theme-light:root span.body .coderesponses{color:red}.theme-light:root .oxygen{color:#006adb}.theme-light:root .nitrogen{color:#d00a06}.theme-light:root .carbon_dioxide{color:#1f1f1f}.theme-light:root .plasma{color:#853c00}.theme-light:root .sleeping_agent{color:#e82f2c}.theme-light:root .agent_b{color:#004d4d}.theme-light:root .hydrogen{color:#997379}.theme-light:root .water_vapor{color:#004080}.theme-light:root .boxed_message{background:#f2f7ff;border-color:rgba(16,48,112,.5)}.theme-light:root .boxed_message.red_border{background:#fff2f2;border-color:rgba(255,0,0,.5)}.theme-light:root .boxed_message.green_border{background:#f2fff7;border-color:rgba(0,168,0,.5)}.theme-light:root .boxed_message.purple_border{background:#f7f2ff;border-color:rgba(85,0,255,.5)}.theme-light:root .boxed_message.notice_border{background:#f2f7ff;border-color:rgba(0,64,255,.5)}.theme-ntos:root{--color-base:#1b2532;--color-section:#121821;--color-primary:#476385}.theme-ntos:root .boxed_message{background:#1d2330}.theme-ntos:root .boxed_message.red_border{background:#301d1d}.theme-ntos:root .boxed_message.green_border{background:#1d3023}.theme-ntos:root .boxed_message.purple_border{background:#231d30}.theme-ntos:root .boxed_message.notice_border{background:#192234}.theme-syndicate:root{--color-base:#4d0202;--color-section:#2b0101;--color-primary:#3b783b;--color-label:#ad8585;--button-background-selected:#b60a0a;--button-background-caution:#ba5e0d;--button-background-danger:#969900;--notice-box-background:#8d0101;--notice-box-color:var(--color-text-fixed-white);--progress-bar-background:rgba(0,0,0,.5);--tooltip-background-lightness:25}.theme-syndicate:root .adminooc{color:#29ccbe}.theme-syndicate:root .debug{color:#8f39e6}.theme-syndicate:root .boxed_message{background:#360a0a}.theme-syndicate:root .boxed_message.red_border{background:#400000}.theme-syndicate:root .boxed_message.green_border{background:#261a00}.theme-syndicate:root .boxed_message.purple_border{background:#260026}.theme-syndicate:root .boxed_message.notice_border{background:#260016}.theme-paradise:root{--color-base:#8a0f38;--color-section:rgba(0,0,0,.5);--color-base-start:#7e014a;--color-base-end:#8a4d0f;--color-primary:#1f7a7a;--color-label:#ad9685;--reconnect-background:#d92626;--reconnect-text:var(--color-text);--input-border-color:#e85e30;--button-background-selected:#cf6e3d;--button-background-danger:#93f}.theme-paradise:root .adminooc{color:#29ccbe}.theme-paradise:root .debug{color:#8f39e6}.theme-paradise:root .boxed_message{background:rgba(0,0,0,.25);border-color:rgba(223,181,159,.25)}.theme-paradise:root .boxed_message.red_border{background:rgba(22,3,3,.25);border-color:rgba(255,0,0,.5)}.theme-paradise:root .boxed_message.green_border{background:rgba(3,22,10,.25);border-color:rgba(0,255,0,.5)}.theme-paradise:root .boxed_message.purple_border{background:rgba(10,3,22,.25);border-color:rgba(136,77,255,.5)}.theme-paradise:root .boxed_message.notice_border{background:rgba(3,10,22,.25);border-color:rgba(85,126,246,.5)} \ No newline at end of file +:root{--color-base:#262626;--color-section:rgba(0,0,0,.33);--color-secondary:hsl(from var(--color-base)var(--secondary-hue)var(--secondary-saturation)calc(l + var(--secondary-lightness-adjustment)));--secondary-hue:h;--secondary-saturation:s;--secondary-lightness-adjustment:7.5;--base-gradient-spread:2;--color-base-start:hsl(from var(--color-base)h s calc(l + var(--base-gradient-spread)));--color-base-end:hsl(from var(--color-base)h s calc(l - var(--base-gradient-spread)));--color-scrollbar-base:var(--color-section);--color-scrollbar-thumb:hsl(from var(--color-base)h s calc(l + 9.25));--candystripe-odd:rgba(0,0,0,.25);--candystripe-even:transparent;--color-red:#d92626;--color-orange:#f26c0d;--color-yellow:#fcd203;--color-olive:#acc91d;--color-green:#1fad4e;--color-teal:#00b3b3;--color-blue:#2a79c8;--color-violet:#63c;--color-purple:#b333cc;--color-pink:#d9268e;--color-brown:#a96a3c;--color-gold:#f2a60d;--color-black:#000;--color-white:#fff;--color-grey:gray;--color-light-grey:#aaa;--color-gray:var(--color-grey);--color-light-gray:var(--color-light-grey);--color-action:gray;--color-hover:hsl(from var(--color-action)h s l/.25);--color-active:hsl(from var(--color-action)h s l/.3);--color-selected:hsl(from var(--color-action)h s l/.4);--primary-hue:210;--primary-saturation:37.5%;--primary-lightness:45%;--color-primary:hsl(var(--primary-hue),var(--primary-saturation),var(--primary-lightness));--color-good:#5ba626;--color-average:#f2890d;--color-bad:#dc2323;--color-label:hsl(from var(--color-primary)h 17.5 57.5);--color-text:var(--color-white);--color-text-translucent:hsl(from var(--color-text)h s l/.5);--color-text-translucent-light:hsl(from var(--color-text)h s l/.75);--color-text-fixed-white:var(--color-white);--color-text-fixed-black:var(--color-black);--color-hyperlink:#69f;--color-hyperlink-visited:#96f;--color-hyperlink-new:#f66;--color-hyperlink-new-visited:#ff8c66;--color-border:rgba(255,255,255,.1);--color-border-dark:rgba(0,0,0,.33);--border-primary-saturation:100;--border-primary-lightness:75;--border-primary-alpha:.75;--color-border-primary:hsl(from var(--color-primary)h var(--border-primary-saturation)var(--border-primary-lightness)/var(--border-primary-alpha));--color-border-secondary:hsl(from var(--color-border-primary)h s l/1);--font-size:12px;--font-family:Verdana,Geneva,sans-serif;--font-family-mono:Consolas,monospace;--border-thickness-unit:.5em;--border-thickness-tiny:calc(var(--border-thickness-unit)*.5*.34);--border-thickness-small:calc(var(--border-thickness-unit)*.34);--border-thickness-medium:calc(var(--border-thickness-unit)*.5);--border-thickness-large:calc(var(--border-thickness-unit)*.66);--border-thickness-larger:var(--border-thickness-unit);--border-radius-unit:1rem;--border-radius-tiny:calc(var(--border-radius-unit)*.25*.68);--border-radius-small:calc(var(--border-radius-unit)*.25);--border-radius-medium:calc(var(--border-radius-unit)*.33);--border-radius-large:calc(var(--border-radius-unit)*.5);--border-radius-larger:calc(var(--border-radius-unit)*.75);--border-radius-huge:var(--border-radius-unit);--border-radius-giant:calc(var(--border-radius-unit)*2);--border-radius-circular:99999px;--space-unit:1em;--space-xxs:calc(var(--space-unit)*.25*.34);--space-xs:calc(var(--space-unit)*.25*.68);--space-s:calc(var(--space-unit)*.25);--space-sm:calc(var(--space-unit)*.33);--space-m:calc(var(--space-unit)*.5);--space-ml:calc(var(--space-unit)*.66);--space-l:calc(var(--space-unit)*.75);--space-xl:var(--space-unit);--space-xxl:calc(var(--space-unit)*2);--transition-time-unit:1s;--transition-time-fast:calc(var(--transition-time-unit)*.1);--transition-time-medium:calc(var(--transition-time-unit)*.2);--transition-time-slow:calc(var(--transition-time-unit)*.5);--transition-time-slowest:var(--transition-time-unit);--shadow-unit:1rem;--shadow-glow-small:0 0 calc(var(--shadow-unit)*.5);--shadow-glow-medium:0 0 var(--shadow-unit);--shadow-glow-large:0 0 calc(var(--shadow-unit)*2);--blur-small:blur(6px);--blur-medium:blur(12px);--blur-large:blur(24px);--adjust-color:5;--adjust-hover:10;--adjust-active:7.5;--cursor-default:default;--cursor-pointer:pointer;--cursor-disabled:var(--cursor-default);--cursor-n-resize:n-resize;--cursor-s-resize:s-resize;--cursor-se-resize:se-resize;--cursor-e-resize:e-resize;--blockquote-color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)));--blockquote-border:var(--border-thickness-small)solid;--button-height:1.667em;--button-color:var(--color-white);--button-color-transparent:var(--color-text-translucent);--button-background-default:var(--color-primary);--button-background-selected:var(--color-green);--button-background-caution:var(--color-yellow);--button-background-danger:var(--color-red);--button-background-disabled:var(--undefined);--button-disabled-opacity:.5;--button-border-radius:var(--border-radius-tiny);--button-transition:var(--transition-time-medium);--button-transition-timing:ease;--dialog-background:hsl(from var(--color-section)h s l/.5);--dimmer-background-opacity:.75;--dimmer-background:hsl(from var(--color-base)h s 5/var(--dimmer-background-opacity));--divider-color:var(--color-border);--divider-border:var(--border-thickness-small)solid var(--divider-color);--dropdown-transition:var(--transition-time-medium);--dropdown-menu-color:var(--color-text);--dropdown-menu-background:hsl(from var(--color-base)h s calc(l - 5.5)/.85);--dropdown-menu-border:var(--border-thickness-tiny)solid var(--color-border);--dropdown-menu-border-radius:var(--border-radius-large);--dropdown-menu-blur:var(--blur-medium);--dropdown-entry-background-hover:var(--color-hover);--dropdown-entry-background-active:var(--color-active);--dropdown-entry-background-selected:var(--color-selected);--dropdown-entry-border-radius:var(--border-radius-small);--dropdown-entry-transition:var(--transition-time-fast);--floating-transition-time:var(--transition-time-medium);--floating-transition-timing:ease;--tab-background:transparent;--tab-background-hover:hsl(from var(--color-hover)h s calc(l*.75));--tab-background-selected:hsl(from var(--color-selected)h s calc(l*.75));--tab-color:var(--color-text-translucent);--tab-color-selected:hsl(from var(--color-primary)h s 90);--tab-border-radius:var(--border-radius-small);--tab-indicator-size:var(--border-thickness-small);--tab-transition:var(--transition-time-medium);--tabs-container-background:var(--color-section);--imagebutton-transparecy:.25;--input-background-lightness:5;--input-background:hsl(from var(--color-base)h s var(--input-background-lightness));--input-color:var(--color-text);--input-color-placeholder:var(--color-text-translucent);--input-border-color:var(--color-border-primary);--input-border-color-focus:var(--color-border-secondary);--input-border-radius:var(--border-radius-tiny);--input-border-disabled:var(--color-gray);--input-transition:var(--transition-time-medium);--input-font-family:var(--font-family);--input-font-family-mono:var(--font-family-mono);--input-width:9em;--knob-color:hsl(from var(--color-base)h 5 20);--knob-ring-color:var(--input-border-color);--knob-popup-background:var(--tooltip-background);--knob-popup-color:var(--tooltip-color);--knob-popup-border-radius:var(--tooltip-border-radius);--knob-popup-blur:var(--tooltip-blur);--knob-inner-padding:var(--space-xs);--menu-bar-background:var(--color-base);--menu-bar-font-family:var(--font-family);--menu-bar-transition:var(--transition-time-medium);--modal-background:var(--color-base);--modal-padding:var(--space-xl);--notice-box-stripes:rgba(0,0,0,.1);--notice-box-background:#cea257;--notice-box-color:var(--color-text-fixed-white);--number-input-background:var(--input-background);--number-input-color:var(--input-color);--number-input-border-color:var(--input-border-color);--number-input-border-color-active:var(--input-border-color-focus);--number-input-border-radius:var(--input-border-radius);--number-input-transition:var(--input-transition);--progress-bar-fill:var(--color-primary);--progress-bar-background:transparent;--progress-bar-border-radius:var(--border-radius-tiny);--progress-bar-transition:var(--transition-time-slowest);--restricted-input-border-color:var(--color-good);--restricted-input-border-color-focus:hsl(from var(--color-good)h s calc(l + 10));--restricted-input-border-color-invalid:var(--color-bad);--round-gauge-ring-color:var(--input-border-color);--round-gauge-transition:var(--transition-time-medium);--round-gauge-alert-animation:var(--transition-time-slowest);--round-gauge-needle-alert-animation:var(--transition-time-fast);--round-gauge-needle-alert-rotation:2.5deg;--section-title-color:var(--color-text);--section-background:var(--color-section);--section-separator-color:var(--color-primary);--section-separator-thickness:var(--border-thickness-small);--slider-cursor-color:var(--color-text);--slider-popup-background:var(--tooltip-background);--slider-popup-color:var(--tooltip-color);--slider-popup-border-radius:var(--tooltip-border-radius);--slider-popup-blur:var(--tooltip-blur);--tooltip-color:var(--color-text);--tooltip-background-lightness:5;--tooltip-background:hsl(from var(--color-base)h s var(--tooltip-background-lightness)/.85);--tooltip-border-radius:var(--border-radius-medium);--tooltip-blur:var(--blur-medium)}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);position:relative;overflow:auto}.BlockQuote{color:var(--blockquote-color);border-left:var(--blockquote-border);padding-left:var(--space-m);margin-bottom:var(--space-m)}.BlockQuote:last-child{margin-bottom:0}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.ColorBox{text-align:center;width:1em;height:1em;line-height:1em;display:inline-block}.Dialog{background-color:var(--dialog-background);justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.Dialog__content{font-family:var(--font-family-mono);background-color:var(--color-base);flex-direction:column;font-size:1.16667em;display:flex}.Dialog__header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--dialog-background);height:2em;line-height:1.928em;display:flex}.Dialog__title{margin-left:var(--space-xl);margin-right:var(--space-xxl);opacity:.33;flex-grow:1;font-style:italic;display:inline}.Dialog__body{margin:var(--space-xxl)var(--space-xl);flex-grow:1}.Dialog__footer{padding:var(--space-xl);background-color:hsl(from var(--dialog-background)h s l/.25);flex-direction:row;justify-content:flex-end;display:flex}.Dialog__button{margin:0 var(--space-xl);text-align:center;min-width:6rem;height:2rem}.SaveAsDialog__inputs{padding-left:var(--space-xxl);margin-right:var(--space-xl);flex-direction:row;justify-content:flex-end;align-items:center;display:flex}.SaveAsDialog__input{margin-left:var(--space-xl);width:80%}.SaveAsDialog__label{vertical-align:center}.Dialog__FileList{flex-wrap:wrap;flex-grow:1;align-content:flex-start;max-height:20rem;display:flex;position:relative;overflow-x:auto;overflow-y:scroll}.Dialog__FileEntry{text-align:center;margin:var(--space-xl)}.Dialog__FileIcon{cursor:default;text-align:center;width:6vh;height:auto;margin:0 0 var(--space-xl)0;display:inline-block;position:relative}.Dimmer{background-color:var(--dimmer-background);z-index:100;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.Divider--horizontal{margin:var(--space-m)0}.Divider--horizontal:not(.Divider--hidden){border-top:var(--divider-border)}.Divider--vertical{height:100%;margin:0 var(--space-m)}.Divider--vertical:not(.Divider--hidden){border-left:var(--divider-border)}.Button{white-space:nowrap;line-height:var(--button-height);padding:0 var(--space-m);margin-right:var(--space-xs);margin-bottom:var(--space-xs);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;display:inline-block;position:relative}.Button:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Button:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Button:last-child{margin-bottom:0;margin-right:0}.Button__content{align-self:stretch;display:block}.Button__content--ellipsis{align-items:center;display:flex}.Button .Button--icon{text-align:center;min-width:1.333em}.Button.Button--hasIcon{padding-left:0}.Button.Button--hasIcon .Button--icon{margin:0 var(--space-s)}.Button--icon-right.Button--hasIcon{padding-left:var(--space-m);padding-right:var(--space-s)}.Button--icon-right.Button--hasIcon .Button--icon{margin:0 0 0 var(--space-s)}.Button--empty.Button--hasIcon{padding:0}.Button--compact{padding:0 var(--space-s);line-height:1.333em}.Button--compact.Button--hasIcon .Button--icon{margin:0 var(--space-xxs)}.Button--circular{border-radius:var(--border-radius-circular)}.Button--fluid{margin-left:0;margin-right:0;display:block}.Button--ellipsis{text-overflow:ellipsis;margin-right:calc(-1*var(--space-s));display:block;overflow:hidden}.Stack>.Button,.Stack__item>.Button{margin:0}.Button--color--red{--color:var(--color-red)}.Button--color--orange{--color:var(--color-orange)}.Button--color--yellow{--color:var(--color-yellow);--button-color:var(--color-black)}.Button--color--olive{--color:var(--color-olive)}.Button--color--green{--color:var(--color-green)}.Button--color--teal{--color:var(--color-teal)}.Button--color--blue{--color:var(--color-blue)}.Button--color--violet{--color:var(--color-violet)}.Button--color--purple{--color:var(--color-purple)}.Button--color--pink{--color:var(--color-pink)}.Button--color--brown{--color:var(--color-brown)}.Button--color--gold{--color:var(--color-gold)}.Button--color--black{--color:var(--color-black)}.Button--color--white{--color:var(--color-white);--button-color:var(--color-black)}.Button--color--grey,.Button--color--gray{--color:var(--color-grey)}.Button--color--light-grey,.Button--color--light-gray{--color:var(--color-light-grey)}.Button--color--primary{--color:var(--color-primary)}.Button--color--good{--color:var(--color-good)}.Button--color--average{--color:var(--color-average)}.Button--color--bad{--color:var(--color-bad)}.Button--color--label{--color:var(--color-label)}.Button--color--default{--color:var(--button-background-default)}.Button--color--caution{--color:var(--button-background-caution)}.Button--color--danger{--color:var(--button-background-danger)}.Button--color--transparent{--button-background:hsl(from var(--button-color)h s l/.1);--button-color:var(--button-color-transparent);background-color:transparent}.Button--color--transparent:hover{--button-color:hsl(from var(--button-color-transparent)h s l/1)}.Button--color--transparent:active{opacity:.75}.Button--color--transparent.Button--selected{--button-color:hsl(from var(--color)h s calc(l + var(--adjust-color)))}.Button--color--transparent.Button--disabled{--button-background:hsl(from var(--button-color)h s l/.2);--button-color:var(--color-bad);opacity:1;color:var(--button-color)!important}.Button--disabled{opacity:var(--button-disabled-opacity);cursor:var(--cursor-disabled)!important;background-color:var(--button-background-disabled,var(--button-background))!important}.Button--selected{--color:var(--button-background-selected)!important}.Button--flex{flex-direction:column;display:inline-flex}.Button--flex--fluid{width:100%}.Button--verticalAlignContent--top{justify-content:flex-start}.Button--verticalAlignContent--middle{justify-content:center}.Button--verticalAlignContent--bottom{justify-content:flex-end}.Dropdown{align-items:stretch;gap:var(--space-s);margin-right:var(--space-xs);margin-bottom:var(--space-xs);display:flex}.Dropdown:last-child{margin-bottom:0;margin-right:0}.Dropdown .Button{align-content:center;margin:0}.Dropdown--fluid{flex:1;width:100%}.Dropdown__control{font-family:var(--font-family);border-radius:var(--button-border-radius);--button-background:hsl(from var(--color)h s calc(l - var(--adjust-color)));height:1.83333em;cursor:var(--cursor-pointer);background-color:var(--button-background);color:var(--button-color);transition-property:background-color,color,opacity;transition-duration:var(--button-transition);transition-timing-function:var(--button-transition-timing);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex:1;font-size:1em;line-height:1.33333em;display:flex;overflow:hidden}.Dropdown__control:hover{background-color:hsl(from var(--button-background)h s calc(l + var(--adjust-hover)));color:var(--button-color)}.Dropdown__control:active{background-color:hsl(from var(--button-background)h s calc(l - var(--adjust-active)));color:var(--button-color);transition:none}.Dropdown__selected-text{text-overflow:ellipsis;white-space:nowrap;height:100%;padding:var(--space-s)var(--space-m);border-right:var(--border-thickness-tiny)solid var(--color-border-dark);flex:1;align-content:center;display:inline-block;overflow:hidden}.Dropdown__icon{text-align:center;width:1.83333em;height:100%;transition:transform var(--dropdown-transition);align-content:center;display:inline-block}.Dropdown__icon--arrow.open:not(.over),.Dropdown__icon--arrow.over:not(.open){transform:rotate(180deg)}.Dropdown__icon~.Dropdown__selected-text{padding-left:0}.Dropdown__menu{scrollbar-width:thin;scrollbar-color:var(--color-scrollbar-thumb)transparent;max-height:16.6667em;padding:var(--space-sm);overflow-y:auto}.Dropdown__menu--wrapper{background-color:var(--dropdown-menu-background);color:var(--dropdown-menu-color);border:var(--dropdown-menu-border);border-radius:var(--dropdown-menu-border-radius);-webkit-backdrop-filter:var(--dropdown-menu-blur);backdrop-filter:var(--dropdown-menu-blur);overflow:hidden}.Dropdown__menu--entry{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;font-family:var(--font-family);padding:var(--space-xs)var(--space-m);border-radius:var(--dropdown-entry-border-radius);transition:background-color var(--dropdown-entry-transition);font-size:1em;line-height:1.33333em;overflow:hidden}.Dropdown__menu--entry.selected{transition-duration:0s;background-color:var(--dropdown-entry-background-selected)!important}.Dropdown__menu--entry:not(.selected){cursor:var(--cursor-pointer)}.Dropdown__menu--entry:not(.selected):hover{background-color:var(--dropdown-entry-background-hover);transition-duration:0s}.Dropdown__menu--entry:not(.selected):active{background-color:var(--dropdown-entry-background-active);transition-duration:0s}.Dropdown__control--icon-only{justify-content:center;align-items:center;max-width:2rem;display:flex}.Flex{display:flex}.Flex--inline{display:inline-flex}.Flex--iefix{display:block}.Flex--iefix.Flex--inline,.Flex__item--iefix{display:inline-block}.Flex--iefix--column>.Flex__item--iefix{display:block}.Floating{z-index:5}.Floating--animated[data-transition=open]{opacity:1;transform:scale(1)}.Floating--animated[data-transition=close],.Floating--animated[data-transition=initial]{opacity:0;transform:scale(.9)}.Floating--animated[data-transition=open],.Floating--animated[data-transition=close]{transition-duration:var(--floating-transition-time);transition-timing-function:var(--floating-transition-timing);transition-property:opacity,transform}.Floating[data-position=top]{transform-origin:bottom}.Floating[data-position=top-start],.Floating[data-position=right-end]{transform-origin:0 100%}.Floating[data-position=top-end],.Floating[data-position=left-end]{transform-origin:100% 100%}.Floating[data-position=bottom]{transform-origin:top}.Floating[data-position=bottom-start],.Floating[data-position=right-start]{transform-origin:0 0}.Floating[data-position=bottom-end],.Floating[data-position=left-start]{transform-origin:100% 0}.Floating[data-position=right]{transform-origin:0}.Floating[data-position=left]{transform-origin:100%}.IconStack{justify-content:center;align-items:center;display:inline-flex;position:relative}.IconStack .Icon:before{vertical-align:middle}.IconStack .Icon:not(:first-child){position:absolute}.ImageButton{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:center;background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color)*2)/var(--imagebutton-transparecy));border:var(--border-thickness-tiny)solid hsl(from var(--imagebutton-color)h s calc(l + var(--adjust-color))/var(--imagebutton-transparecy));border-radius:var(--border-radius-medium);transition-property:background-color,border-color,box-shadow;transition-duration:var(--transition-time-medium);border-width:0;margin:.25em;display:inline-flex;position:relative;overflow:hidden}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)) .ImageButton__container{cursor:var(--cursor-pointer)}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):hover{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-color) + var(--adjust-hover))/var(--imagebutton-transparecy))}.ImageButton:not(:-webkit-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-webkit-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:-moz-any(.ImageButton--disabled,.ImageButton--noAction)):not(:-moz-any(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(:is(.ImageButton--disabled,.ImageButton--noAction)):not(:is(:has(.ImageButton__buttons:hover),:has(.ImageButton__buttons:active))):active .ImageButton__image{-webkit-filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));filter:drop-shadow(var(--shadow-glow-small)var(--imagebutton-color));transition-duration:0s}.ImageButton:not(.ImageButton--fluid) .ImageButton__content{background-color:hsl(from var(--imagebutton-color)h s calc(l - var(--adjust-hover)));border-top:var(--border-thickness-tiny)solid var(--imagebutton-color)}.ImageButton__container{border-color:inherit;transition:opacity var(--transition-time-medium);flex-direction:column;display:flex}.ImageButton__image{pointer-events:none;padding:var(--space-s);border:var(--border-thickness-tiny)solid;border-bottom:none;border-color:inherit;border-radius:var(--border-radius-medium)var(--border-radius-medium)0 0;transition:filter var(--transition-time-slow);align-self:center;line-height:0;position:relative;overflow:hidden}.ImageButton__image--fallback{text-align:center;color:var(--color-text-translucent);align-content:center}.ImageButton__image--fallback:before{zoom:.75;width:100%;display:table}.ImageButton__content{white-space:nowrap;text-overflow:ellipsis;color:var(--color-text-fixed-white);z-index:2;padding:.25em .33em;overflow:hidden}.ImageButton__buttons{left:var(--border-thickness-tiny);z-index:1;max-width:100%;display:flex;position:absolute;bottom:1.8em;overflow:hidden}.ImageButton__buttons--alt{pointer-events:none;top:var(--border-thickness-tiny);text-shadow:0px 1px 2px var(--color-base),-1px 0px 2px var(--color-base),1px 0px 2px var(--color-base),0px -1px 2px var(--color-base);flex-direction:column;overflow:visible;bottom:unset!important}.ImageButton__buttons--empty{bottom:0;left:0}.ImageButton__buttons>*{border-radius:0!important;margin:0!important;padding:0!important}.ImageButton--empty{border-width:var(--border-thickness-tiny)}.ImageButton--empty .ImageButton__image{border-radius:var(--border-radius-medium);border:none}.Stack>.ImageButton,.Stack__item>.ImageButton{margin:0}.ImageButton--fluid{border-width:var(--border-thickness-tiny);flex-direction:row;margin:0 0 .33em;display:flex}.ImageButton--fluid:last-child{margin-bottom:0}.ImageButton--fluid .ImageButton__container{flex-direction:row;flex:1}.ImageButton--fluid .ImageButton__image{border:0;margin:0 auto;padding:0}.ImageButton--fluid .ImageButton__content{white-space:normal;color:var(--color-text);flex-direction:column;flex:1;justify-content:center;margin:0 .5em;padding:0;display:flex}.ImageButton--fluid .ImageButton__content--title{padding:.5em;font-weight:700}.ImageButton--fluid .ImageButton__content--divider{border-bottom:var(--border-thickness-small)solid var(--color-border)}.ImageButton--fluid .ImageButton__content--text{padding:.5em}.ImageButton--fluid .ImageButton__buttons{left:inherit;bottom:inherit;background-color:inherit;position:relative}.ImageButton--fluid .ImageButton__buttons--alt{pointer-events:all;top:inherit;text-shadow:none}.ImageButton--fluid .ImageButton__buttons--alt>*{border-top:1px solid rgba(255,255,255,.075)}.ImageButton--fluid .ImageButton__buttons--alt>:first-child{border-top:0}.ImageButton--fluid .ImageButton__buttons>*{text-align:center;white-space:pre-wrap;border-left:var(--border-thickness-tiny)solid var(--color-border);flex-direction:column;justify-content:center;height:100%;line-height:1.15em;display:inline-flex}.ImageButton__color--red{--imagebutton-color:var(--color-red)}.ImageButton__color--orange{--imagebutton-color:var(--color-orange)}.ImageButton__color--yellow{--imagebutton-color:var(--color-yellow);--color-text-fixed-white:var(--color-black)}.ImageButton__color--olive{--imagebutton-color:var(--color-olive)}.ImageButton__color--green{--imagebutton-color:var(--color-green)}.ImageButton__color--teal{--imagebutton-color:var(--color-teal)}.ImageButton__color--blue{--imagebutton-color:var(--color-blue)}.ImageButton__color--violet{--imagebutton-color:var(--color-violet)}.ImageButton__color--purple{--imagebutton-color:var(--color-purple)}.ImageButton__color--pink{--imagebutton-color:var(--color-pink)}.ImageButton__color--brown{--imagebutton-color:var(--color-brown)}.ImageButton__color--gold{--imagebutton-color:var(--color-gold)}.ImageButton__color--black{--imagebutton-color:var(--color-black)}.ImageButton__color--white{--imagebutton-color:var(--color-white);--color-text-fixed-white:var(--color-black)}.ImageButton__color--grey,.ImageButton__color--gray{--imagebutton-color:var(--color-grey)}.ImageButton__color--light-grey,.ImageButton__color--light-gray{--imagebutton-color:var(--color-light-grey)}.ImageButton__color--good{--imagebutton-color:var(--color-good)}.ImageButton__color--average{--imagebutton-color:var(--color-average)}.ImageButton__color--bad{--imagebutton-color:var(--color-bad)}.ImageButton__color--label{--imagebutton-color:var(--color-label)}.ImageButton__color--transparent{--imagebutton-color:var(--color-text-translucent-light);--imagebutton-transparecy:.1;background-color:transparent;border-color:transparent!important}.ImageButton__color--transparent .ImageButton__content{color:var(--color-text-translucent-light);background-color:transparent!important;border-color:transparent!important}.ImageButton__color--transparent.ImageButton--disabled{background-color:hsL(from var(--color-red)h s l/.15)!important}.ImageButton__color--transparent.ImageButton--selected{background-color:hsL(from var(--color-good)h s l/.15)}.ImageButton__color--default{--imagebutton-color:hsl(from var(--color-base)h s 30)}.ImageButton__color--primary{--imagebutton-color:hsl(from var(--color-primary)h s l)}.ImageButton--selected{--imagebutton-color:hsl(from var(--button-background-selected)h s calc(l*1.15));--color-text-fixed-white:var(--color-white)}.ImageButton--disabled .ImageButton__container{cursor:var(--cursor-disabled);opacity:.5}.ImageButton--disabled.ImageButton--fluid{-webkit-filter:contrast(75%);filter:contrast(75%)}.ImageButton--disabled.ImageButton--fluid .ImageButton__buttons{-webkit-filter:contrast(125%);filter:contrast(125%)}.Input{background-color:var(--input-background);border-radius:var(--input-border-radius);border:var(--border-thickness-tiny)solid var(--input-border-color);color:var(--input-color);font-size:1em;font-family:var(--input-font-family);padding:var(--space-xxs)var(--space-sm);width:var(--input-width)}.Input:focus{outline:none}.Input:focus-within{border-color:var(--input-border-color-focus)}.Input::-webkit-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::-ms-input-placeholder{color:var(--input-color-placeholder);font-style:italic}.Input::placeholder{color:var(--input-color-placeholder);font-style:italic}.Input--disabled{border-color:var(--input-border-disabled);color:var(--input-color-placeholder)}.Input--fluid{width:100%}.Input--monospace{font-family:var(--input-font-family-mono)}.Knob{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-n-resize);width:2.6em;height:2.6em;margin:0 auto -.2em;font-size:1rem;position:relative}.Knob:after{content:".";color:transparent;line-height:2.5em}.Knob__circle{inset:var(--knob-inner-padding);background-color:var(--knob-color);background-image:linear-gradient(to bottom,hsl(from var(--knob-color)h s calc(l + 15))0%,var(--knob-color)100%);border-radius:var(--border-radius-circular);box-shadow:var(--shadow-glow-medium)hsl(from var(--knob-color)h s l/.25);margin:.3em;position:absolute}.Knob__cursorBox{position:absolute;top:0;bottom:0;left:0;right:0}.Knob__cursor{background-color:hsl(from var(--knob-color)h s 85);width:.2em;height:.8em;margin:0 auto;position:relative;top:.05em}.Knob__popupValue{white-space:nowrap;text-align:center;padding:var(--space-s)var(--space-m);background-color:var(--knob-popup-background);color:var(--knob-popup-color);border-radius:var(--knob-popup-border-radius);-webkit-backdrop-filter:var(--knob-popup-blur);backdrop-filter:var(--knob-popup-blur);font-size:1rem;position:absolute;top:0;left:50%;transform:translateY(-100%)translate(-50%)}.Knob__ring{padding:var(--knob-inner-padding);position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible}.Knob__ringTrackPivot{transform:rotate(135deg)}.Knob__ringTrack{fill:transparent;stroke:hsl(from var(--ring-color,var(--knob-ring-color))h s l/.15);stroke-width:8px;stroke-linecap:round;stroke-dasharray:235.62}.Knob__ringFillPivot{transform:rotate(135deg)}.Knob--bipolar .Knob__ringFillPivot{transform:rotate(270deg)}.Knob__ringFill{fill:transparent;stroke:var(--ring-color,var(--knob-ring-color));stroke-width:8px;stroke-linecap:round;stroke-dasharray:314.16;transition:stroke var(--transition-time-medium)ease-out}.Knob--color--red{--ring-color:var(--color-red)}.Knob--color--orange{--ring-color:var(--color-orange)}.Knob--color--yellow{--ring-color:var(--color-yellow)}.Knob--color--olive{--ring-color:var(--color-olive)}.Knob--color--green{--ring-color:var(--color-green)}.Knob--color--teal{--ring-color:var(--color-teal)}.Knob--color--blue{--ring-color:var(--color-blue)}.Knob--color--violet{--ring-color:var(--color-violet)}.Knob--color--purple{--ring-color:var(--color-purple)}.Knob--color--pink{--ring-color:var(--color-pink)}.Knob--color--brown{--ring-color:var(--color-brown)}.Knob--color--gold{--ring-color:var(--color-gold)}.Knob--color--black{--ring-color:var(--color-black)}.Knob--color--white{--ring-color:var(--color-white)}.Knob--color--grey,.Knob--color--gray{--ring-color:var(--color-grey)}.Knob--color--light-grey,.Knob--color--light-gray{--ring-color:var(--color-light-grey)}.Knob--color--primary{--ring-color:var(--color-primary)}.Knob--color--good{--ring-color:var(--color-good)}.Knob--color--average{--ring-color:var(--color-average)}.Knob--color--bad{--ring-color:var(--color-bad)}.Knob--color--label{--ring-color:var(--color-label)}.LabeledList{border-collapse:collapse;border-spacing:0;width:calc(100% + 1em);margin:calc(-1*var(--space-s))calc(-1*var(--space-m))0;padding:0;display:table}.LabeledList__row{display:table-row}.LabeledList__row:last-child .LabeledList__cell{padding-bottom:0}.LabeledList__cell{padding:var(--space-s)var(--space-m);text-align:left;border:0;margin:0;display:table-cell}.LabeledList__label--nowrap{white-space:nowrap;width:1%;min-width:5em}.LabeledList__buttons{white-space:nowrap;text-align:right;width:.1%;padding-top:var(--space-xxs);padding-bottom:0}.LabeledList__breakContents{word-break:break-all;word-wrap:break-word}.MenuBar{display:flex}.MenuBar__font{font-family:var(--menu-bar-font-family);font-size:1em;line-height:1.41667em}.MenuBar__hover:hover{background-color:hsl(from var(--menu-bar-background)h s calc(l + 20));transition:background-color}.MenuBar__MenuBarButton{padding:var(--space-s)var(--space-m)}.MenuBar__menu{background-color:var(--menu-bar-background);padding:var(--space-sm);z-index:5;position:absolute;box-shadow:4px 6px 5px -2px rgba(0,0,0,.5)}.MenuBar__MenuItem{transition:background-color var(--menu-bar-transition)ease-out;background-color:var(--menu-bar-background);white-space:nowrap;padding:var(--space-sm)var(--space-xl)var(--space-sm)calc(var(--space-xxl) + 1rem)}.MenuBar__MenuItemToggle{padding:var(--space-sm)var(--space-xl)var(--space-sm)0}.MenuBar__MenuItemToggle__check{vertical-align:middle;text-align:center;min-width:2.5rem;padding-left:var(--space-sm);display:inline-block}.MenuBar__over{top:auto;bottom:100%}.MenuBar__MenuBarButton-text{text-overflow:clip;white-space:nowrap;height:1.41667em}.MenuBar__Separator{margin:var(--space-sm);border-top:var(--border-thickness-tiny)solid var(--color-border);display:block}.Modal{background-color:var(--modal-background);padding:var(--modal-padding)}.Modal__dimmer .Dimmer__inner{max-width:calc(100vw - var(--space-xxl));max-height:calc(100vh - var(--space-xxl))}.NoticeBox{--noticebox-background:var(--notice-box-background);padding:var(--space-sm)var(--space-m);margin-bottom:var(--space-m);background-color:oklch(from var(--noticebox-background)calc(l*.825)calc(c*.75)h);background-image:repeating-linear-gradient(-45deg,transparent 0 .833333em,var(--notice-box-stripes).833333em 1.66667em);color:var(--notice-box-color);font-style:italic;font-weight:700}.NoticeBox--color--red{--noticebox-background:var(--color-red)}.NoticeBox--color--orange{--noticebox-background:var(--color-orange)}.NoticeBox--color--yellow{--noticebox-background:var(--color-yellow);--notice-box-color:var(--color-black)}.NoticeBox--color--olive{--noticebox-background:var(--color-olive)}.NoticeBox--color--green{--noticebox-background:var(--color-green)}.NoticeBox--color--teal{--noticebox-background:var(--color-teal)}.NoticeBox--color--blue{--noticebox-background:var(--color-blue)}.NoticeBox--color--violet{--noticebox-background:var(--color-violet)}.NoticeBox--color--purple{--noticebox-background:var(--color-purple)}.NoticeBox--color--pink{--noticebox-background:var(--color-pink)}.NoticeBox--color--brown{--noticebox-background:var(--color-brown)}.NoticeBox--color--gold{--noticebox-background:var(--color-gold)}.NoticeBox--color--black{--noticebox-background:var(--color-black);--notice-box-stripes:rgba(255,255,255,.1)}.NoticeBox--color--white{--noticebox-background:var(--color-white);--notice-box-color:var(--color-black)}.NoticeBox--color--grey,.NoticeBox--color--gray{--noticebox-background:var(--color-grey)}.NoticeBox--color--light-grey,.NoticeBox--color--light-gray{--noticebox-background:var(--color-light-grey)}.NoticeBox--color--primary{--noticebox-background:var(--color-primary)}.NoticeBox--color--good{--noticebox-background:var(--color-good)}.NoticeBox--color--average{--noticebox-background:var(--color-average)}.NoticeBox--color--bad{--noticebox-background:var(--color-bad)}.NoticeBox--color--label{--noticebox-background:var(--color-label)}.NoticeBox--type--info{--noticebox-background:var(--color-blue)}.NoticeBox--type--success{--noticebox-background:var(--color-green)}.NoticeBox--type--warning{--noticebox-background:var(--color-orange)}.NoticeBox--type--danger{--noticebox-background:var(--color-red)}.NumberInput{cursor:var(--cursor-n-resize);text-align:right;padding:0 var(--space-sm);margin-right:var(--space-xs);background-color:var(--number-input-background);color:var(--number-input-border-color-active);border:var(--border-thickness-tiny)solid var(--number-input-border-color);border-radius:var(--number-input-border-radius);transition:border-color var(--number-input-transition);line-height:1.41667em;display:inline-block;position:relative;overflow:visible}.NumberInput:active{border-color:var(--number-input-border-color-active)}.NumberInput--fluid{display:block}.NumberInput__content{margin-left:var(--space-m)}.NumberInput__barContainer{top:var(--space-xs);bottom:var(--space-xs);left:var(--space-xs);position:absolute}.NumberInput__bar{box-sizing:border-box;border-bottom:var(--border-thickness-tiny)solid var(--number-input-border-color-active);background-color:var(--number-input-border-color-active);width:.25em;position:absolute;bottom:0;left:0}.NumberInput__input{text-align:right;width:100%;height:1.41667em;padding:0 var(--space-m);font-size:1em;line-height:1.41667em;font-family:var(--font-family);background-color:var(--number-input-background);color:var(--number-input-color);border:0;outline:0;margin:0;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar{width:100%;min-height:var(--button-height);padding:0 var(--space-m);background-color:var(--progress-bar-background);border:var(--border-thickness-tiny)solid var(--progress-bar-color);border-radius:var(--progress-bar-border-radius);transition:border-color var(--progress-bar-transition)ease-out;align-content:center;display:inline-block;position:relative}.ProgressBar__fill{background-color:var(--progress-bar-color);position:absolute;top:0;bottom:0;left:0;right:0}.ProgressBar__fill--animated{transition-property:background-color,width;transition-duration:var(--progress-bar-transition)}.ProgressBar__content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:right;width:100%;position:relative}.ProgressBar--color--default{--progress-bar-color:hsl(from var(--progress-bar-fill)h s calc(l - var(--adjust-color)))}.ProgressBar--color--red{--progress-bar-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))}.ProgressBar--color--orange{--progress-bar-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))}.ProgressBar--color--yellow{--progress-bar-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))}.ProgressBar--color--olive{--progress-bar-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))}.ProgressBar--color--green{--progress-bar-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))}.ProgressBar--color--teal{--progress-bar-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))}.ProgressBar--color--blue{--progress-bar-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))}.ProgressBar--color--violet{--progress-bar-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))}.ProgressBar--color--purple{--progress-bar-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))}.ProgressBar--color--pink{--progress-bar-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))}.ProgressBar--color--brown{--progress-bar-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))}.ProgressBar--color--gold{--progress-bar-color:hsl(from var(--color-gold)h s calc(l - var(--adjust-color)))}.ProgressBar--color--black{--progress-bar-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))}.ProgressBar--color--white{--progress-bar-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))}.ProgressBar--color--grey,.ProgressBar--color--gray{--progress-bar-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--light-grey,.ProgressBar--color--light-gray{--progress-bar-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))}.ProgressBar--color--primary{--progress-bar-color:hsl(from var(--color-primary)h s calc(l - var(--adjust-color)))}.ProgressBar--color--good{--progress-bar-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))}.ProgressBar--color--average{--progress-bar-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))}.ProgressBar--color--bad{--progress-bar-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))}.ProgressBar--color--label{--progress-bar-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))}.RestrictedInput{border-color:var(--restricted-input-border-color);text-align:right}.RestrictedInput:focus-within{border-color:var(--restricted-input-border-color-focus)}.RestrictedInput::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.RestrictedInput--invalid{border-color:var(--restricted-input-border-color-invalid)}.RestrictedInput--invalid:focus-within{border-color:var(--restricted-input-border-color-invalid)}@keyframes RoundGauge__alertAnim{0%,to{opacity:.1}50%{opacity:1}}@keyframes RoundGauge__needleAlertAnim{0%{transform:rotate(var(--round-gauge-needle-alert-rotation))}50%{transform:rotate(calc(-1*var(--round-gauge-needle-alert-rotation)))}}.RoundGauge{width:2.6em;height:1.3em;margin:0 auto .2em;font-size:1rem}.RoundGauge__wrapper{text-align:center;display:inline-block}.RoundGauge__ringTrack{fill:transparent;stroke:rgba(255,255,255,.1);stroke-width:10px;stroke-dasharray:157.08;stroke-dashoffset:157.08px}.RoundGauge__ringFill{fill:transparent;stroke:var(--round-gauge-ring-color);stroke-width:10px;stroke-dasharray:314.16;transition:stroke var(--round-gauge-transition)ease-out}.RoundGauge__needle,.RoundGauge__ringFill{transition:transform var(--round-gauge-transition)ease-in-out}.RoundGauge__needleLine,.RoundGauge__needleMiddle{fill:var(--color-red)}.RoundGauge__alert{fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;fill:rgba(255,255,255,.1);transform-origin:top;transform:scale(.9)}.RoundGauge__alert.active{animation:RoundGauge__alertAnim var(--round-gauge-alert-animation)cubic-bezier(.34,1.56,.64,1)infinite}.RoundGauge__alert.active~.RoundGauge__needle .RoundGauge__needleLine{transform-origin:bottom;animation:RoundGauge__needleAlertAnim var(--round-gauge-needle-alert-animation)infinite}.RoundGauge__alert.max{fill:var(--color-bad)}.RoundGauge--color--red.RoundGauge__ringFill{stroke:var(--color-red)}.RoundGauge--color--orange.RoundGauge__ringFill{stroke:var(--color-orange)}.RoundGauge--color--yellow.RoundGauge__ringFill{stroke:var(--color-yellow)}.RoundGauge--color--olive.RoundGauge__ringFill{stroke:var(--color-olive)}.RoundGauge--color--green.RoundGauge__ringFill{stroke:var(--color-green)}.RoundGauge--color--teal.RoundGauge__ringFill{stroke:var(--color-teal)}.RoundGauge--color--blue.RoundGauge__ringFill{stroke:var(--color-blue)}.RoundGauge--color--violet.RoundGauge__ringFill{stroke:var(--color-violet)}.RoundGauge--color--purple.RoundGauge__ringFill{stroke:var(--color-purple)}.RoundGauge--color--pink.RoundGauge__ringFill{stroke:var(--color-pink)}.RoundGauge--color--brown.RoundGauge__ringFill{stroke:var(--color-brown)}.RoundGauge--color--gold.RoundGauge__ringFill{stroke:var(--color-gold)}.RoundGauge--color--black.RoundGauge__ringFill{stroke:var(--color-black)}.RoundGauge--color--white.RoundGauge__ringFill{stroke:var(--color-white)}.RoundGauge--color--grey.RoundGauge__ringFill,.RoundGauge--color--gray.RoundGauge__ringFill{stroke:var(--color-grey)}.RoundGauge--color--light-grey.RoundGauge__ringFill,.RoundGauge--color--light-gray.RoundGauge__ringFill{stroke:var(--color-light-grey)}.RoundGauge--color--primary.RoundGauge__ringFill{stroke:var(--color-primary)}.RoundGauge--color--good.RoundGauge__ringFill{stroke:var(--color-good)}.RoundGauge--color--average.RoundGauge__ringFill{stroke:var(--color-average)}.RoundGauge--color--bad.RoundGauge__ringFill{stroke:var(--color-bad)}.RoundGauge--color--label.RoundGauge__ringFill{stroke:var(--color-label)}.RoundGauge__alert--red{fill:var(--color-red)}.RoundGauge__alert--orange{fill:var(--color-orange)}.RoundGauge__alert--yellow{fill:var(--color-yellow)}.RoundGauge__alert--olive{fill:var(--color-olive)}.RoundGauge__alert--green{fill:var(--color-green)}.RoundGauge__alert--teal{fill:var(--color-teal)}.RoundGauge__alert--blue{fill:var(--color-blue)}.RoundGauge__alert--violet{fill:var(--color-violet)}.RoundGauge__alert--purple{fill:var(--color-purple)}.RoundGauge__alert--pink{fill:var(--color-pink)}.RoundGauge__alert--brown{fill:var(--color-brown)}.RoundGauge__alert--gold{fill:var(--color-gold)}.RoundGauge__alert--black{fill:var(--color-black)}.RoundGauge__alert--white{fill:var(--color-white)}.RoundGauge__alert--grey,.RoundGauge__alert--gray{fill:var(--color-grey)}.RoundGauge__alert--light-grey,.RoundGauge__alert--light-gray{fill:var(--color-light-grey)}.RoundGauge__alert--primary{fill:var(--color-primary)}.RoundGauge__alert--good{fill:var(--color-good)}.RoundGauge__alert--average{fill:var(--color-average)}.RoundGauge__alert--bad{fill:var(--color-bad)}.RoundGauge__alert--label{fill:var(--color-label)}.Section{margin-bottom:var(--space-m);background-color:var(--section-background);box-sizing:border-box;scrollbar-color:var(--color-scrollbar-thumb)transparent;position:relative}.Section:last-child{margin-bottom:0}.Section__title{padding:var(--space-m);border-bottom:var(--section-separator-thickness)solid var(--section-separator-color);position:relative}.Section__titleText{color:var(--section-title-color);font-size:1.16667em;font-weight:700}.Section__buttons{right:var(--space-m);margin-top:calc(-1*var(--space-xxs));display:inline-block;position:absolute}.Section__rest{position:relative}.Section__content{padding:var(--space-ml)var(--space-m)}.Section--fitted>.Section__rest>.Section__content{padding:0}.Section--fill{flex-direction:column;height:100%;display:flex}.Section--fill>.Section__rest{flex-grow:1}.Section--fill>.Section__rest>.Section__content{height:100%}.Section--fill.Section--scrollable>.Section__rest>.Section__content{position:absolute;top:0;bottom:0;left:0;right:0}.Section--scrollable{overflow:hidden}.Section--scrollable>.Section__rest>.Section__content{overflow-x:hidden;overflow-y:auto}.Section--scrollableHorizontal{overflow:hidden}.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow-x:auto;overflow-y:hidden}.Section--scrollable.Section--scrollableHorizontal{overflow:hidden}.Section--scrollable.Section--scrollableHorizontal>.Section__rest>.Section__content{overflow:auto}.Section .Section{margin:0 calc(-1*var(--space-m));background-color:transparent}.Section .Section:first-child{margin-top:calc(-1*var(--space-m))}.Section .Section .Section__titleText{font-size:1.08333em}.Section .Section .Section .Section__titleText{font-size:1em}.Section--flex{flex-flow:column;display:flex}.Section--flex .Section__content{flex-grow:1;overflow:auto}.Section__content--noTopPadding{padding-top:0}.Section__content--stretchContents{height:calc(100% - 3rem)}.Slider{cursor:e-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Slider--editing .Slider__cursor:before{display:none}.Slider__cursor{inset:0 calc(-1*var(--space-xxs));left:unset;border-left:var(--border-thickness-small)solid var(--slider-cursor-color);border-radius:var(--border-radius-circular);position:absolute}.Slider__cursorOffset{position:absolute;top:0;bottom:0;left:0;right:0;transition:none!important}.Slider__cursor:before{content:"";aspect-ratio:1;border-left:inherit;transform-origin:50%;position:absolute;bottom:0;right:0;transform:scale(4)translateY(50%)rotate(45deg);-webkit-mask-image:linear-gradient(135deg,#000 50%,transparent 50%);mask-image:linear-gradient(135deg,#000 50%,transparent 50%)}.Slider__popupValue{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;padding:var(--space-s)var(--space-m);background-color:var(--slider-popup-background);color:var(--slider-popup-color);border-radius:var(--slider-popup-border-radius);-webkit-backdrop-filter:var(--slider-popup-blur);backdrop-filter:var(--slider-popup-blur);font-size:1em;position:absolute;top:-2em;right:0;transform:translate(50%)}.Slider .NumberInput__input{width:auto;height:auto;top:2px;bottom:2px;left:2px;right:2px}.Stack{gap:.5em}.Stack--fill{height:100%}.Stack--zebra>.Stack__item:nth-child(odd){background-color:var(--candystripe-odd)}.Stack--horizontal>.Stack__divider:not(.Stack__divider--hidden){border-left:var(--divider-border)}.Stack--vertical>.Stack__divider:not(.Stack__divider--hidden){border-top:var(--divider-border)}.Table{border-collapse:collapse;border-spacing:0;width:100%;margin:0;display:table}.Table--collapsing{width:auto}.Table__row{display:table-row}.Table__cell{padding:0 var(--space-s);display:table-cell}.Table__cell:first-child{padding-left:0}.Table__cell:last-child{padding-right:0}.Table__row--header .Table__cell,.Table__cell--header{padding-bottom:var(--space-m);font-weight:700}.Table__cell--collapsing{white-space:nowrap;width:1%}.Tabs{background-color:var(--tabs-container-background);align-items:stretch;display:flex;position:relative;overflow:hidden}.Tabs--fill{height:100%}.Tabs--vertical{padding:var(--space-s)0 var(--space-s)var(--space-s);flex-direction:column}.Tabs--horizontal{margin-bottom:var(--space-m);padding:var(--space-s)var(--space-s)0}.Tabs--horizontal:last-child{margin-bottom:0}.Tabs__Tab{flex-grow:0}.Tabs--fluid .Tabs__Tab{flex-grow:1}.Tab{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:var(--cursor-pointer);background-color:var(--tab-background);color:var(--tab-color);min-width:4em;min-height:2.25em;transition-property:background-color,color;transition-duration:var(--tab-transition);justify-content:space-between;align-items:center;display:flex}.Tab:not(.Tab--selected):hover{background-color:var(--tab-background-hover)}.Tab:not(.Tab--selected):active{color:var(--tab-color-selected)}.Tab--selected{cursor:var(--cursor-default);background-color:var(--tab-background-selected);color:var(--tab-color-selected)}.Tab .Tab__text{margin:0 var(--space-m);flex-grow:1}.Tab__left{text-align:center;min-width:1.5em;margin-left:var(--space-s)}.Tab__right{text-align:center;min-width:1.5em;margin-right:var(--space-s)}.Tabs--horizontal .Tab{border-top-left-radius:var(--tab-border-radius);border-top-right-radius:var(--tab-border-radius);padding-bottom:var(--tab-indicator-size);position:relative}.Tabs--horizontal .Tab:before{content:"";transition:transform var(--tab-transition);width:100%;height:var(--tab-indicator-size);background-color:currentColor;position:absolute;bottom:0;transform:scaleX(0)}.Tabs--horizontal .Tab--selected:before{transform:scaleX(.99999)!important}.Tabs--vertical .Tab{border-top-left-radius:var(--tab-border-radius);border-bottom-left-radius:var(--tab-border-radius);min-height:2em;padding-right:var(--tab-indicator-size);position:relative}.Tabs--vertical .Tab:before{content:"";transition:transform var(--tab-transition);width:var(--tab-indicator-size);background-color:currentColor;height:100%;position:absolute;right:0;transform:scaleY(0)}.Tabs--vertical .Tab--selected:before{transform:scaleY(.99999)!important}.Tabs--scrollable{--mask-width:3.25em;--mask-left:0rem;--mask-right:0rem;padding:0;display:grid}.Tabs--scrollable-content{scrollbar-width:none;overscroll-behavior:none;padding:var(--space-s)var(--space-s)0;-webkit-mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));mask-image:linear-gradient(90deg,transparent calc(var(--mask-left)*.66),black calc(0% + var(--mask-left)),black calc(100% - var(--mask-right)),transparent calc(100% - var(--mask-right)*.66));flex-wrap:nowrap;display:flex;overflow:auto}.Tabs--scrollable-content.scrollable-left.scrollable-right{--mask-left:var(--mask-width);--mask-right:var(--mask-width)}.Tabs--scrollable-content.scrollable-left{--mask-left:var(--mask-width)}.Tabs--scrollable-content.scrollable-right{--mask-right:var(--mask-width)}.Tabs--scrollable .scroll-left,.Tabs--scrollable .scroll-right{z-index:1;border-radius:0;align-content:center;height:100%;margin:0;position:absolute;top:0}.Tabs--scrollable .scroll-left{left:0}.Tabs--scrollable .scroll-right{right:0}.Tabs--scrollable .Tab{flex-shrink:0}.Tab--selected.Tab--color--red{color:hsl(from var(--color-red)h s calc(l + 17.5))}.Tab--selected.Tab--color--orange{color:hsl(from var(--color-orange)h s calc(l + 17.5))}.Tab--selected.Tab--color--yellow{color:hsl(from var(--color-yellow)h s calc(l + 17.5))}.Tab--selected.Tab--color--olive{color:hsl(from var(--color-olive)h s calc(l + 17.5))}.Tab--selected.Tab--color--green{color:hsl(from var(--color-green)h s calc(l + 17.5))}.Tab--selected.Tab--color--teal{color:hsl(from var(--color-teal)h s calc(l + 17.5))}.Tab--selected.Tab--color--blue{color:hsl(from var(--color-blue)h s calc(l + 17.5))}.Tab--selected.Tab--color--violet{color:hsl(from var(--color-violet)h s calc(l + 17.5))}.Tab--selected.Tab--color--purple{color:hsl(from var(--color-purple)h s calc(l + 17.5))}.Tab--selected.Tab--color--pink{color:hsl(from var(--color-pink)h s calc(l + 17.5))}.Tab--selected.Tab--color--brown{color:hsl(from var(--color-brown)h s calc(l + 17.5))}.Tab--selected.Tab--color--gold{color:hsl(from var(--color-gold)h s calc(l + 17.5))}.Tab--selected.Tab--color--black{color:hsl(from var(--color-black)h s calc(l + 17.5))}.Tab--selected.Tab--color--white{color:hsl(from var(--color-white)h s calc(l + 17.5))}.Tab--selected.Tab--color--grey,.Tab--selected.Tab--color--gray{color:hsl(from var(--color-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--light-grey,.Tab--selected.Tab--color--light-gray{color:hsl(from var(--color-light-grey)h s calc(l + 17.5))}.Tab--selected.Tab--color--primary{color:hsl(from var(--color-primary)h s calc(l + 17.5))}.Tab--selected.Tab--color--good{color:hsl(from var(--color-good)h s calc(l + 17.5))}.Tab--selected.Tab--color--average{color:hsl(from var(--color-average)h s calc(l + 17.5))}.Tab--selected.Tab--color--bad{color:hsl(from var(--color-bad)h s calc(l + 17.5))}.Tab--selected.Tab--color--label{color:hsl(from var(--color-label)h s calc(l + 17.5))}.Section .Tabs{background-color:transparent}.Section:not(.Section--fitted) .Tabs{margin:0 calc(-1*var(--space-m))var(--space-m)}.Section:not(.Section--fitted) .Tabs:first-child{margin-top:calc(-1*var(--space-m))}.TextArea{resize:none;scrollbar-width:thin;scrollbar-gutter:stable;scrollbar-color:var(--color-scrollbar-thumb)transparent}.Tooltip{-webkit-backdrop-filter:var(--tooltip-blur);backdrop-filter:var(--tooltip-blur);background-color:var(--tooltip-background);border-radius:var(--tooltip-border-radius);color:var(--tooltip-color);max-width:20.8333em;padding:var(--space-m)var(--space-l);pointer-events:none;text-align:left;box-shadow:.1em .1em 1.25em -.1em rgba(0,0,0,.5)}html,body{box-sizing:border-box;height:100%;font-size:var(--font-size,12px);color:var(--color-text,#fff);scrollbar-color:var(--color-scrollbar-thumb)var(--color-scrollbar-base);margin:0}html{cursor:var(--cursor-default,default);overflow:hidden}body{font-family:var(--font-family,Verdana,Geneva,sans-serif);overflow:auto}img{image-rendering:pixelated}*,:before,:after{box-sizing:inherit}h1,h2,h3,h4,h5,h6{padding:var(--space-m,6px)0;padding:var(--space-m,.5rem)0;margin:0;display:block}h1{font-size:1.5rem}h2{font-size:1.333rem}h3{font-size:1.167rem}h4{font-size:1rem}td,th{vertical-align:baseline;text-align:left}:where(.candystripe:nth-child(odd)){background-color:var(--candystripe-odd)}:where(.candystripe:nth-child(2n)){background-color:var(--candystripe-even)}.color-black{color:hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.color-white{color:hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.color-red{color:hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.color-orange{color:hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.color-yellow{color:hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.color-olive{color:hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.color-green{color:hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.color-teal{color:hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.color-blue{color:hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.color-violet{color:hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.color-purple{color:hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.color-pink{color:hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.color-brown{color:hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.color-grey,.color-gray{color:hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.color-light-grey,.color-light-gray{color:hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.color-good{color:hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.color-average{color:hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.color-bad{color:hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.color-label{color:hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.color-bg-black{background-color:hsl(from var(--color-black)h s calc(l - var(--adjust-color)))!important}.color-bg-white{background-color:hsl(from var(--color-white)h s calc(l - var(--adjust-color)))!important}.color-bg-red{background-color:hsl(from var(--color-red)h s calc(l - var(--adjust-color)))!important}.color-bg-orange{background-color:hsl(from var(--color-orange)h s calc(l - var(--adjust-color)))!important}.color-bg-yellow{background-color:hsl(from var(--color-yellow)h s calc(l - var(--adjust-color)))!important}.color-bg-olive{background-color:hsl(from var(--color-olive)h s calc(l - var(--adjust-color)))!important}.color-bg-green{background-color:hsl(from var(--color-green)h s calc(l - var(--adjust-color)))!important}.color-bg-teal{background-color:hsl(from var(--color-teal)h s calc(l - var(--adjust-color)))!important}.color-bg-blue{background-color:hsl(from var(--color-blue)h s calc(l - var(--adjust-color)))!important}.color-bg-violet{background-color:hsl(from var(--color-violet)h s calc(l - var(--adjust-color)))!important}.color-bg-purple{background-color:hsl(from var(--color-purple)h s calc(l - var(--adjust-color)))!important}.color-bg-pink{background-color:hsl(from var(--color-pink)h s calc(l - var(--adjust-color)))!important}.color-bg-brown{background-color:hsl(from var(--color-brown)h s calc(l - var(--adjust-color)))!important}.color-bg-grey,.color-bg-gray{background-color:hsl(from var(--color-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-light-grey,.color-bg-light-gray{background-color:hsl(from var(--color-light-grey)h s calc(l - var(--adjust-color)))!important}.color-bg-good{background-color:hsl(from var(--color-good)h s calc(l - var(--adjust-color)))!important}.color-bg-average{background-color:hsl(from var(--color-average)h s calc(l - var(--adjust-color)))!important}.color-bg-bad{background-color:hsl(from var(--color-bad)h s calc(l - var(--adjust-color)))!important}.color-bg-label{background-color:hsl(from var(--color-label)h s calc(l - var(--adjust-color)))!important}.debug-layout,.debug-layout :not(g):not(path){color:rgba(255,255,255,.9)!important;box-shadow:none!important;-webkit-filter:none!important;filter:none!important;background:0 0!important;outline:1px solid rgba(255,255,255,.5)!important}.debug-layout:hover,.debug-layout :not(g):not(path):hover{outline-color:rgba(255,255,255,.8)!important}.outline-dotted{outline-style:dotted!important}.outline-dashed{outline-style:dashed!important}.outline-solid{outline-style:solid!important}.outline-double{outline-style:double!important}.outline-groove{outline-style:groove!important}.outline-ridge{outline-style:ridge!important}.outline-inset{outline-style:inset!important}.outline-outset{outline-style:outset!important}.outline-color-black{outline:var(--border-thickness-small)solid hsl(from var(--color-black)h s calc(l + var(--adjust-color)))!important}.outline-color-white{outline:var(--border-thickness-small)solid hsl(from var(--color-white)h s calc(l + var(--adjust-color)))!important}.outline-color-red{outline:var(--border-thickness-small)solid hsl(from var(--color-red)h s calc(l + var(--adjust-color)))!important}.outline-color-orange{outline:var(--border-thickness-small)solid hsl(from var(--color-orange)h s calc(l + var(--adjust-color)))!important}.outline-color-yellow{outline:var(--border-thickness-small)solid hsl(from var(--color-yellow)h s calc(l + var(--adjust-color)))!important}.outline-color-olive{outline:var(--border-thickness-small)solid hsl(from var(--color-olive)h s calc(l + var(--adjust-color)))!important}.outline-color-green{outline:var(--border-thickness-small)solid hsl(from var(--color-green)h s calc(l + var(--adjust-color)))!important}.outline-color-teal{outline:var(--border-thickness-small)solid hsl(from var(--color-teal)h s calc(l + var(--adjust-color)))!important}.outline-color-blue{outline:var(--border-thickness-small)solid hsl(from var(--color-blue)h s calc(l + var(--adjust-color)))!important}.outline-color-violet{outline:var(--border-thickness-small)solid hsl(from var(--color-violet)h s calc(l + var(--adjust-color)))!important}.outline-color-purple{outline:var(--border-thickness-small)solid hsl(from var(--color-purple)h s calc(l + var(--adjust-color)))!important}.outline-color-pink{outline:var(--border-thickness-small)solid hsl(from var(--color-pink)h s calc(l + var(--adjust-color)))!important}.outline-color-brown{outline:var(--border-thickness-small)solid hsl(from var(--color-brown)h s calc(l + var(--adjust-color)))!important}.outline-color-grey,.outline-color-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-light-grey,.outline-color-light-gray{outline:var(--border-thickness-small)solid hsl(from var(--color-light-grey)h s calc(l + var(--adjust-color)))!important}.outline-color-good{outline:var(--border-thickness-small)solid hsl(from var(--color-good)h s calc(l + var(--adjust-color)))!important}.outline-color-average{outline:var(--border-thickness-small)solid hsl(from var(--color-average)h s calc(l + var(--adjust-color)))!important}.outline-color-bad{outline:var(--border-thickness-small)solid hsl(from var(--color-bad)h s calc(l + var(--adjust-color)))!important}.outline-color-label{outline:var(--border-thickness-small)solid hsl(from var(--color-label)h s calc(l + var(--adjust-color)))!important}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-baseline{text-align:baseline}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-pre{white-space:pre}.text-bold{font-weight:700}.text-italic{font-style:italic}.text-underline{text-decoration:underline}.Chat{color:var(--chat-text-color)}.Chat__badge{color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#db143c;border-radius:10px;min-width:.5em;padding:.2em .3em;font-size:.7em;line-height:1;transition:font-size .2s ease-out;display:inline-block}.Chat__badge:before{content:"x"}.Chat__badge--animate{font-size:.9em;transition:font-size}.Chat__scrollButton{position:fixed;bottom:1em;right:2em}.Chat__reconnected{text-align:center;margin:1em 0 2em;font-size:.85em}.Chat__reconnected:before{content:"Reconnected";color:var(--reconnect-text,var(--color-red));background-color:var(--reconnect-background,var(--color-section));border-radius:1em;padding:0 .7em;display:inline-block}.Chat__reconnected:after{content:"";border-bottom:.166667em solid var(--color-red);margin-top:-.75em;display:block}.Chat__highlight{color:var(--color-black)}.Chat__highlight--restricted{color:#fff;background-color:#a00;font-weight:700}.ChatMessage{word-wrap:break-word}.ChatMessage--highlighted{border-left:.166667em solid #ffe045;padding-left:.5em;position:relative}.ChatMessage--highlighted:after{content:"";pointer-events:none;background-color:rgba(255,224,69,.1);position:absolute;top:0;bottom:0;left:0;right:0}.Ping{padding:var(--space-xs)var(--space-sm);border:var(--border-thickness-tiny)solid hsl(from var(--color-border-primary)h 10 50/.33);border-radius:var(--border-radius-medium);text-align:right;min-width:4em;max-width:5em;position:relative}.Ping__indicator{content:"";top:var(--space-m);left:var(--space-m);border-radius:var(--border-radius-medium);background-color:#888;width:.5em;height:.5em;position:absolute}.Notifications{position:absolute;top:1em;left:1em;right:2em}.Notification{color:#fff;background-color:#db143c;margin:1em 0;padding:.5em}.Notification:first-child{margin-top:0}.Notification:last-child{margin-bottom:0}.UnreadCount{pointer-events:none;top:calc(-1*var(--space-s));right:calc(-1*var(--space-s));padding:0 var(--space-s);border-radius:var(--border-radius-small);background-color:var(--color-red);color:var(--color-white);font-size:.65em;line-height:1.25em;position:absolute}.Layout__content{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.Layout__content--scrollable{margin-bottom:0;overflow-y:auto}.Window{color:var(--color-text);background-color:var(--color-base);background-image:linear-gradient(to bottom,var(--color-base-start)0%,var(--color-base-end)100%);position:fixed;top:0;bottom:0;left:0;right:0}.Window__rest{position:fixed;top:2.66667rem;bottom:0;left:0;right:0}.Window__contentPadding{height:calc(100% - 1rem);margin:.5rem}.Window__contentPadding:after{height:0}.Layout__content--scrollable .Window__contentPadding:after{content:"";height:.5rem;display:block}.Window__dimmer{pointer-events:none;background-color:hsl(from var(--color-base)h s calc(l + 15)/.25);position:fixed;top:0;bottom:0;left:0;right:0}.Window__resizeHandle__se{cursor:var(--cursor-se-resize);width:1.66667rem;height:1.66667rem;position:fixed;bottom:0;right:0}.Window__resizeHandle__s{cursor:var(--cursor-s-resize);height:.5rem;position:fixed;bottom:0;left:0;right:0}.Window__resizeHandle__e{cursor:var(--cursor-e-resize);width:.25rem;position:fixed;top:0;bottom:0;right:0}img{margin:0;padding:0;line-height:1}img.icon{vertical-align:bottom;width:auto;min-width:16px;height:1em;min-height:16px}a{color:#397ea5}em{font-style:normal;font-weight:700}h1,h2,h3,h4,h5,h6{color:#a4bad6;font-family:Georgia,Verdana,sans-serif}.emoji{max-width:16px;max-height:16px}.emoji16x16{vertical-align:middle}.italic,.italics,.emote{font-style:italic}.bold{font-weight:700}.bolditalics{font-style:italic;font-weight:700}.center{text-align:center}.big{font-size:150%}.reallybig{font-size:175%}.sans{font-family:Comic Sans MS,cursive,sans-serif}.wingdings{font-family:Wingdings,Webdings}.robot{font-family:OCR-A,monospace;font-size:1.15em;font-weight:700}.robotemote{color:#6685f5;font-family:OCR-A,monospace;font-size:1.15em;font-style:italic;font-weight:700}.hidden{visibility:hidden;display:none}.motd{color:#a4bad6;white-space:normal;font-family:Verdana,sans-serif}.motd h1,.motd h2,.motd h3,.motd h4,.motd h5,.motd h6{color:#a4bad6;text-decoration:underline}.motd a,.motd a:link,.motd a:active,.motd a:hover{color:#a4bad6}.memo{color:#638500;text-align:center}.memoedit{text-align:center;font-size:75%}.ooc{font-weight:700}.looc{color:#69c;font-weight:700}.discordpm{color:#6685f5}.debug{color:#6d2f83}.deadsay{color:#e2c1ff}.darkmblue{color:#6685f5}.prefix,.name,.yell{font-weight:700}.mentorhelp{color:#07b;font-weight:700}.mentor_channel{color:#b4af13;font-weight:700}.mentor_channel_admin{color:#f1ec50;font-weight:700}.admin{color:#386aff;font-weight:700}.adminhelp{color:#a00;font-weight:700}.adminticket{color:#3daf21;font-weight:700}.adminticketalt{color:#ccb847;font-weight:700}.admin_channel{color:#03fc9d;font-weight:700}.all_admin_ping{color:#12a5f4;text-align:center;font-size:120%;font-weight:700}.dev_channel{color:#61b413;font-weight:700}.dev_channel_admin{color:#9ef14f;font-weight:700}.staff_channel{color:#775bff;font-weight:700}.staff_channel_admin{color:#a35cff;font-weight:700}.radio{color:#20b142}.deptradio{color:#939}.comradio{color:#5f5cff}.syndradio{color:#8f4a4b}.dsquadradio{color:#998599}.airadio{color:#ff5ed7}.centradio{color:#2681a5}.secradio{color:#dd3535}.engradio{color:#feac20}.medradio{color:#00b5ad}.sciradio{color:#c68cfa}.supradio{color:#b88646}.srvradio{color:#bbd164}.proradio{color:#b84f92}.alert{color:#d82020}h1.alert,h2.alert{color:#a4bad6}.ghostalert{color:#cc00c6;font-style:italic;font-weight:700}.warning{color:#c51e1e;font-style:italic}.boldwarning{color:#c51e1e;font-style:italic;font-weight:700}.danger{color:#c51e1e;font-weight:700}.biggerdanger{color:red;font-size:150%;font-weight:700}.userdanger{color:#c51e1e;font-size:120%;font-weight:700}.attack{color:red}.disarm{color:#900}.moderate{color:#c00}.notice{color:#6685f5}.boldnotice{color:#6685f5;font-weight:700}.subtle{color:#8a72c5;font-size:85%;font-style:italic}.suicide{color:#ff5050;font-style:italic}.announcement h1,.announcement h2{color:#a4bad6;margin:8pt 0;line-height:1.2}.announcement p{color:#d82020;line-height:1.3}.announcement.minor h1{font-size:180%}.announcement.minor h2{font-size:170%}.announcement.sec h1{color:red;font-family:Verdana,sans-serif;font-size:180%}.boldannounceic,.boldannounceooc,.pr_announce{color:#c51e1e;font-weight:700}.greenannounce{color:#059223;font-weight:700}.alien{color:#c433c4}.noticealien{color:#00c000}.alertalien{color:#00c000;font-weight:700}.terrorspider{color:#cf52fa}.dantalion{color:#8b2c5e}.chaosverygood{color:#19e0c0;font-size:120%;font-weight:700}.chaosgood{color:#19e0c0;font-weight:700}.chaosneutral{color:#479ac0;font-weight:700}.chaosbad{color:#9047c0;font-weight:700}.chaosverybad{color:#9047c0;font-size:120%;font-weight:700}.sinister{color:purple;font-style:italic;font-weight:700}.blob{color:#ee4000;font-style:italic}.revennotice{color:#6685f5}.revenbignotice{color:#6685f5;font-size:120%;font-weight:700}.revenminor{color:#823abb}.revenwarning{color:#760fbb;font-style:italic}.revendanger{color:#760fbb;font-size:120%;font-weight:700}.changeling{color:#00b4de}.abductor{color:purple;font-style:italic}.mind_control{color:#a00d6f;font-size:120%;font-style:italic;font-weight:700}.cult{color:purple;font-style:italic;font-weight:700}.cultspeech{color:#af0000;font-style:italic}.cultitalic{color:#a60000;font-style:italic}.cultlarge{color:#a60000;font-size:120%;font-weight:700}.narsie{color:#a60000;font-size:300%;font-weight:700}.narsiesmall{color:#a60000;font-size:200%;font-weight:700}.his_grace{color:#15d512;font-family:Courier New,cursive,sans-serif;font-style:italic}.colossus{color:#7f282a;font-size:175%}.hierophant{color:#609;font-style:italic;font-weight:700}.hierophant_warning{color:#609;font-size:175%;font-style:italic;font-weight:700}.tajaran{color:#803b56}.skrell{color:#00ced1}.solcom{color:#8282fb}.com_cygni,.zombie{color:#7c4848}.zombielarge{color:#7c4848;font-size:120%;font-weight:700}.soghun{color:#228b22}.vox{color:#a0a}.diona{color:#804000;font-weight:700}.trinary{color:#727272}.kidan{color:#c64c05}.slime{color:#07a}.drask{color:#a3d4eb;font-family:Arial Black}.moth{color:#869b29;font-family:Copperplate}.skulk{color:#b178b1}.clown{color:red}.vulpkanin{color:#b97a57}.gutter{color:#7092be;font-family:Trebuchet MS,cursive,sans-serif}.tradeband{font-family:Georgia,Verdana,sans-serif}.rose{color:#ff5050}.interface{color:#9031c4}.greentext{color:#0f0;font-size:150%}.redtext{color:red;font-size:150%}.red{color:red}.green{color:#03bb39}.purple{color:#9031c4}.orange{color:orange}.resonate{color:#298f85}.healthscan_oxy{color:#5cc9ff}.specialnotice{color:#4a6f82;font-size:120%;font-weight:700}.whisper{color:#ccc;font-style:italic}.flocksay{color:#6fbbac;font-family:Verdana}span.body .codephrases{color:#55f}span.body .coderesponses{color:#f33}.oxygen{color:#449dff}.nitrogen{color:#f94541}.carbon_dioxide{color:#ccc}.plasma{color:#eb6b00}.sleeping_agent{color:#f28b89}.agent_b{color:teal}.hydrogen{color:#997379}.water_vapor{color:#483d8b}.boxed_message{text-align:center;background:#17191c;border:.0833333em solid rgba(166,183,217,.25);border-width:.0833333em .416667em;border-radius:.5em;margin:.5em .25em;padding:.5em .75em}.boxed_message.red_border{background:#1f1414;border-color:rgba(255,0,0,.5)}.boxed_message.green_border{background:#141f18;border-color:rgba(0,255,0,.5)}.boxed_message.purple_border{background:#1d1828;border-color:rgba(170,128,255,.5)}.boxed_message.notice_border{background:#14181f;border-color:rgba(85,126,246,.5)}.boxed_message.thick_border{border-width:.5em}.boxed_message.left_align_text{text-align:left}:root{--chat-text-color:#b3cce6;--color-base:#202020;--color-section:hsl(from var(--color-base)h s calc(l - 4.2));--base-gradient-spread:0}.theme-light:root{--chat-text-color:var(--color-black);--color-base:#ededed;--color-section:var(--color-white);--color-text:var(--color-black);--color-label:#545454;--color-action:#e6e6e6;--color-scrollbar-thumb:var(--color-light-gray);--primary-lightness:60%;--primary-saturation:60%;--border-primary-alpha:.66;--button-background-selected:hsl(from var(--color-primary)h 100 l);--button-background-caution:#b85a0a;--button-background-danger:#990;--tab-color-selected:var(--color-black);--input-background:var(--color-base);--tooltip-background-lightness:90}.theme-light:root a,.theme-light:root h1,.theme-light:root h2,.theme-light:root h3,.theme-light:root h4,.theme-light:root h5,.theme-light:root h6{color:#00f}.theme-light:root .motd,.theme-light:root .motd h1,.theme-light:root .motd h2,.theme-light:root .motd h3,.theme-light:root .motd h4,.theme-light:root .motd h5,.theme-light:root .motd h6,.theme-light:root .motd a,.theme-light:root .motd a:link,.theme-light:root .motd a:active,.theme-light:root .motd a:hover{color:#638500}.theme-light:root .looc{color:#69c}.theme-light:root .discordpm{color:#00f}.theme-light:root .debug{color:#6d2f83}.theme-light:root .deadsay{color:#5c00e6}.theme-light:root .darkmblue{color:#00f}.theme-light:root .mentorhelp{color:#07b}.theme-light:root .mentor_channel{color:#5e6812}.theme-light:root .mentor_channel_admin{color:#94a419}.theme-light:root .adminhelp{color:#a00}.theme-light:root .adminticket{color:#3e7336}.theme-light:root .adminticketalt{color:#014c8a}.theme-light:root .admin_channel{color:#9a04d1}.theme-light:root .all_admin_ping{color:#12a5f4}.theme-light:root .dev_channel{color:#126719}.theme-light:root .dev_channel_admin{color:#26a419}.theme-light:root .staff_channel{color:#775bff}.theme-light:root .staff_channel_admin{color:#a35cff}.theme-light:root .radio{color:#408010}.theme-light:root .deptradio{color:#939}.theme-light:root .comradio{color:#204090}.theme-light:root .syndradio{color:#6d3f40}.theme-light:root .dsquadradio{color:#686868}.theme-light:root .airadio{color:#f0f}.theme-light:root .centradio{color:#5c5c7c}.theme-light:root .secradio{color:#a30000}.theme-light:root .engradio{color:#a66300}.theme-light:root .medradio{color:#009190}.theme-light:root .sciradio{color:#939}.theme-light:root .supradio{color:#7f6539}.theme-light:root .srvradio{color:#80a000}.theme-light:root .proradio{color:#e3027a}.theme-light:root .alert{color:red}.theme-light:root h1.alert,.theme-light:root h2.alert{color:#000}.theme-light:root .ghostalert{color:#5c00e6}.theme-light:root .warning,.theme-light:root .boldwarning,.theme-light:root .danger,.theme-light:root .userdanger{color:red}.theme-light:root .notice,.theme-light:root .boldnotice{color:#009}.theme-light:root .subtle{color:#009;font-size:85%;font-style:italic}.theme-light:root .announcement h1,.theme-light:root .announcement h2{color:#000}.theme-light:root .announcement.sec h1,.theme-light:root .boldannounceic,.theme-light:root .boldannounceooc{color:red}.theme-light:root .pr_announce{color:#228b22}.theme-light:root .greenannounce{color:#0f0}.theme-light:root .alien{color:#543354}.theme-light:root .terrorspider{color:#320e32}.theme-light:root .dantalion{color:#6a2148}.theme-light:root .revennotice,.theme-light:root .revenbignotice{color:#1d2953}.theme-light:root .changeling{color:purple}.theme-light:root .cultspeech{color:#7f0000}.theme-light:root .cultitalic,.theme-light:root .cultlarge,.theme-light:root .narsie,.theme-light:root .narsiesmall{color:#960000}.theme-light:root .flocksay{color:#6fbbac}.theme-light:root .rose{color:#ff5050}.theme-light:root .interface{color:#303}.theme-light:root .purple{color:#5e2d79}.theme-light:root .orange{color:orange}.theme-light:root .healthscan_oxy{color:#0074bd}.theme-light:root .specialnotice{color:#36525e}.theme-light:root .whisper{color:#333}.theme-light:root span.body .codephrases{color:#00f}.theme-light:root span.body .coderesponses{color:red}.theme-light:root .oxygen{color:#006adb}.theme-light:root .nitrogen{color:#d00a06}.theme-light:root .carbon_dioxide{color:#1f1f1f}.theme-light:root .plasma{color:#853c00}.theme-light:root .sleeping_agent{color:#e82f2c}.theme-light:root .agent_b{color:#004d4d}.theme-light:root .hydrogen{color:#997379}.theme-light:root .water_vapor{color:#004080}.theme-light:root .boxed_message{background:#f2f7ff;border-color:rgba(16,48,112,.5)}.theme-light:root .boxed_message.red_border{background:#fff2f2;border-color:rgba(255,0,0,.5)}.theme-light:root .boxed_message.green_border{background:#f2fff7;border-color:rgba(0,168,0,.5)}.theme-light:root .boxed_message.purple_border{background:#f7f2ff;border-color:rgba(85,0,255,.5)}.theme-light:root .boxed_message.notice_border{background:#f2f7ff;border-color:rgba(0,64,255,.5)}.theme-ntos:root{--color-base:#1b2532;--color-section:#121821;--color-primary:#476385}.theme-ntos:root .boxed_message{background:#1d2330}.theme-ntos:root .boxed_message.red_border{background:#301d1d}.theme-ntos:root .boxed_message.green_border{background:#1d3023}.theme-ntos:root .boxed_message.purple_border{background:#231d30}.theme-ntos:root .boxed_message.notice_border{background:#192234}.theme-syndicate:root{--color-base:#4d0202;--color-section:#2b0101;--color-primary:#3b783b;--color-label:#ad8585;--button-background-selected:#b60a0a;--button-background-caution:#ba5e0d;--button-background-danger:#969900;--notice-box-background:#8d0101;--notice-box-color:var(--color-text-fixed-white);--progress-bar-background:rgba(0,0,0,.5);--tooltip-background-lightness:25}.theme-syndicate:root .adminooc{color:#29ccbe}.theme-syndicate:root .debug{color:#8f39e6}.theme-syndicate:root .boxed_message{background:#360a0a}.theme-syndicate:root .boxed_message.red_border{background:#400000}.theme-syndicate:root .boxed_message.green_border{background:#261a00}.theme-syndicate:root .boxed_message.purple_border{background:#260026}.theme-syndicate:root .boxed_message.notice_border{background:#260016}.theme-paradise:root{--color-base:#8a0f38;--color-section:rgba(0,0,0,.5);--color-base-start:#7e014a;--color-base-end:#8a4d0f;--color-primary:#1f7a7a;--color-label:#ad9685;--reconnect-background:#d92626;--reconnect-text:var(--color-text);--input-border-color:#e85e30;--button-background-selected:#cf6e3d;--button-background-danger:#93f}.theme-paradise:root .adminooc{color:#29ccbe}.theme-paradise:root .debug{color:#8f39e6}.theme-paradise:root .boxed_message{background:rgba(0,0,0,.25);border-color:rgba(223,181,159,.25)}.theme-paradise:root .boxed_message.red_border{background:rgba(22,3,3,.25);border-color:rgba(255,0,0,.5)}.theme-paradise:root .boxed_message.green_border{background:rgba(3,22,10,.25);border-color:rgba(0,255,0,.5)}.theme-paradise:root .boxed_message.purple_border{background:rgba(10,3,22,.25);border-color:rgba(136,77,255,.5)}.theme-paradise:root .boxed_message.notice_border{background:rgba(3,10,22,.25);border-color:rgba(85,126,246,.5)} \ No newline at end of file diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js index 6dee4627d1a..72c8d267a5d 100644 --- a/tgui/public/tgui.bundle.js +++ b/tgui/public/tgui.bundle.js @@ -1 +1 @@ -(()=>{var e,n,t={222:function(e,n,t){var r={"./pai_atmosphere.jsx":"2817","./pai_bioscan.jsx":"7716","./pai_directives.jsx":"1091","./pai_doorjack.jsx":"9316","./pai_main_menu.jsx":"5042","./pai_manifest.jsx":"702","./pai_medrecords.jsx":"9513","./pai_messenger.jsx":"984","./pai_radio.jsx":"9028","./pai_secrecords.jsx":"6838","./pai_signaler.jsx":"4244"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=222},2721:function(e,n,t){var r={"./pda_atmos_scan.jsx":"8539","./pda_cookbook.jsx":"5246","./pda_games.jsx":"2336","./pda_janitor.jsx":"3606","./pda_main_menu.jsx":"2526","./pda_manifest.jsx":"4642","./pda_medical.jsx":"1212","./pda_messenger.jsx":"3260","./pda_minesweeper.jsx":"3067","./pda_mule.jsx":"5030","./pda_nanobank.jsx":"9749","./pda_notes.jsx":"3194","./pda_power.jsx":"4702","./pda_secbot.jsx":"6651","./pda_security.jsx":"7155","./pda_signaler.jsx":"7024","./pda_status_display.jsx":"7148","./pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=2721},4808:function(e,n,t){var r={"./AICard":"9609","./AICard.jsx":"9609","./AIControllerDebugger":"1664","./AIControllerDebugger.tsx":"1664","./AIFixer":"8679","./AIFixer.jsx":"8679","./AIProgramPicker":"5233","./AIProgramPicker.jsx":"5233","./AIResourceManagementConsole":"9991","./AIResourceManagementConsole.jsx":"9991","./APC":"731","./APC.jsx":"731","./ATM":"6181","./ATM.jsx":"6181","./AccountsUplinkTerminal":"4558","./AccountsUplinkTerminal.jsx":"4558","./AdminAntagMenu":"3840","./AdminAntagMenu.jsx":"3840","./AgentCard":"2794","./AgentCard.tsx":"2794","./AiAirlock":"8706","./AiAirlock.jsx":"8706","./AirAlarm":"5486","./AirAlarm.jsx":"5486","./AirlockAccessController":"6962","./AirlockAccessController.jsx":"6962","./AirlockElectronics":"9281","./AirlockElectronics.tsx":"9281","./AlertModal":"934","./AlertModal.tsx":"934","./AntagInfoHeretic":"2712","./AntagInfoHeretic.tsx":"2712","./AppearanceChanger":"6473","./AppearanceChanger.jsx":"6473","./ArcadeBattle":"6085","./ArcadeBattle.tsx":"6085","./AtmosAlertConsole":"3438","./AtmosAlertConsole.jsx":"3438","./AtmosControl":"4788","./AtmosControl.jsx":"4788","./AtmosFilter":"1937","./AtmosFilter.jsx":"1937","./AtmosMixer":"7440","./AtmosMixer.jsx":"7440","./AtmosPump":"7897","./AtmosPump.jsx":"7897","./AtmosTankControl":"1164","./AtmosTankControl.jsx":"1164","./AtmosTemperatureGate":"8340","./AtmosTemperatureGate.jsx":"8340","./AugmentMenu":"6561","./AugmentMenu.jsx":"6561","./Autolathe":"8762","./Autolathe.tsx":"8762","./BioChipPad":"9766","./BioChipPad.jsx":"9766","./Biogenerator":"9968","./Biogenerator.jsx":"9968","./BloomEdit":"3764","./BloomEdit.jsx":"3764","./BlueSpaceArtilleryControl":"7166","./BlueSpaceArtilleryControl.jsx":"7166","./BluespaceTap":"8128","./BluespaceTap.jsx":"8128","./BodyScanner":"6807","./BodyScanner.jsx":"6807","./BookBinder":"2790","./BookBinder.jsx":"2790","./BotCall":"1326","./BotCall.jsx":"1326","./BotClean":"9091","./BotClean.jsx":"9091","./BotFloor":"3578","./BotFloor.jsx":"3578","./BotHonk":"5144","./BotHonk.jsx":"5144","./BotMed":"2078","./BotMed.jsx":"2078","./BotMule":"881","./BotMule.jsx":"881","./BotSecurity":"752","./BotSecurity.jsx":"752","./BrigCells":"2850","./BrigCells.jsx":"2850","./BrigTimer":"9478","./BrigTimer.jsx":"9478","./BugReportForm":"6993","./BugReportForm.tsx":"6993","./CameraConsole":"9835","./CameraConsole.tsx":"9835","./Canister":"2094","./Canister.jsx":"2094","./CardComputer":"991","./CardComputer/":"991","./CardComputer/auth_block":"1487","./CardComputer/auth_block.tsx":"1487","./CardComputer/card_details":"7542","./CardComputer/card_details.tsx":"7542","./CardComputer/index":"991","./CardComputer/index.tsx":"991","./CardComputer/job_priority":"4287","./CardComputer/job_priority.tsx":"4287","./CardComputer/job_transfer":"6530","./CardComputer/job_transfer.tsx":"6530","./CardComputer/records_log":"9490","./CardComputer/records_log.tsx":"9490","./CardComputer/types":"1488","./CardComputer/types.tsx":"1488","./CargoConsole":"6466","./CargoConsole.jsx":"6466","./Chameleon":"6205","./Chameleon.tsx":"6205","./ChangelogView":"9072","./ChangelogView.jsx":"9072","./CheckboxListInputModal":"6707","./CheckboxListInputModal.tsx":"6707","./ChemDispenser":"8573","./ChemDispenser.jsx":"8573","./ChemHeater":"6277","./ChemHeater.jsx":"6277","./ChemMaster":"9306","./ChemMaster.tsx":"9306","./CloningConsole":"2636","./CloningConsole.jsx":"2636","./CloningPod":"1558","./CloningPod.jsx":"1558","./CoinMint":"1276","./CoinMint.tsx":"1276","./ColorPickerModal":"1572","./ColorPickerModal.tsx":"1572","./ColourMatrixTester":"6851","./ColourMatrixTester.jsx":"6851","./CommunicationsComputer":"5325","./CommunicationsComputer.jsx":"5325","./CompostBin":"6185","./CompostBin.jsx":"6185","./Contractor":"4868","./Contractor.jsx":"4868","./ConveyorSwitch":"3510","./ConveyorSwitch.jsx":"3510","./CrewMonitor":"6714","./CrewMonitor.jsx":"6714","./Cryo":"2306","./Cryo.jsx":"2306","./CryopodConsole":"2394","./CryopodConsole.jsx":"2394","./DNAModifier":"3372","./DNAModifier.tsx":"3372","./DanceMachine":"4283","./DanceMachine.tsx":"4283","./DecalPainter":"5391","./DecalPainter.tsx":"5391","./DestinationTagger":"3883","./DestinationTagger.jsx":"3883","./DisposalBin":"6381","./DisposalBin.jsx":"6381","./DnaVault":"2908","./DnaVault.jsx":"2908","./DroneConsole":"2480","./DroneConsole.jsx":"2480","./EFTPOS":"1654","./EFTPOS.jsx":"1654","./ERTManager":"3991","./ERTManager.tsx":"3991","./EconomyManager":"9644","./EconomyManager.jsx":"9644","./Electropack":"6426","./Electropack.jsx":"6426","./Emojipedia":"9480","./Emojipedia.tsx":"9480","./EvolutionMenu":"9219","./EvolutionMenu.jsx":"9219","./ExosuitFabricator":"6251","./ExosuitFabricator.jsx":"6251","./ExperimentConsole":"9621","./ExperimentConsole.jsx":"9621","./ExternalAirlockController":"5091","./ExternalAirlockController.jsx":"5091","./FaxMachine":"6325","./FaxMachine.jsx":"6325","./FilingCabinet":"9788","./FilingCabinet.jsx":"9788","./FloorPainter":"26","./FloorPainter.jsx":"26","./GPS":"1561","./GPS.jsx":"1561","./GeneModder":"1259","./GeneModder.jsx":"1259","./GenericCrewManifest":"6954","./GenericCrewManifest.jsx":"6954","./GhostHudPanel":"9031","./GhostHudPanel.jsx":"9031","./GlandDispenser":"3396","./GlandDispenser.jsx":"3396","./GravityGen":"1009","./GravityGen.jsx":"1009","./GuestPass":"6294","./GuestPass.jsx":"6294","./HandheldChemDispenser":"9511","./HandheldChemDispenser.jsx":"9511","./HealthSensor":"3365","./HealthSensor.jsx":"3365","./Holodeck":"5880","./Holodeck.tsx":"5880","./IdCardModifier":"9721","./IdCardModifier.tsx":"9721","./Instrument":"6126","./Instrument.jsx":"6126","./KeyComboModal":"1783","./KeyComboModal.tsx":"1783","./KeycardAuth":"3928","./KeycardAuth.jsx":"3928","./KitchenMachine":"6706","./KitchenMachine.jsx":"6706","./LawManager":"9846","./LawManager.tsx":"9846","./LawyerSim":"3788","./LawyerSim.jsx":"3788","./LibraryComputer":"3023","./LibraryComputer.jsx":"3023","./LibraryManager":"183","./LibraryManager.jsx":"183","./ListInputModal":"1536","./ListInputModal.tsx":"1536","./Loadout":"7239","./Loadout.tsx":"7239","./LoreConsole":"1387","./LoreConsole.tsx":"1387","./MODsuit":"5531","./MODsuit.tsx":"5531","./MagnetController":"5247","./MagnetController.jsx":"5247","./MaterialContainer":"9587","./MaterialContainer.tsx":"9587","./MechBayConsole":"2433","./MechBayConsole.jsx":"2433","./MechaControlConsole":"3763","./MechaControlConsole.jsx":"3763","./MedicalRecords":"9548","./MedicalRecords.jsx":"9548","./MerchVendor":"2666","./MerchVendor.jsx":"2666","./MiningVendor":"6231","./MiningVendor.jsx":"6231","./NTRecruiter":"1972","./NTRecruiter.jsx":"1972","./Newscaster":"452","./Newscaster.jsx":"452","./Noticeboard":"6563","./Noticeboard.tsx":"6563","./NuclearBomb":"5867","./NuclearBomb.jsx":"5867","./NuclearRodFabricator":"7579","./NuclearRodFabricator.jsx":"7579","./NumberInputModal":"8007","./NumberInputModal.tsx":"8007","./ObjAccessModifier":"4965","./ObjAccessModifier.tsx":"4965","./OperatingComputer":"6499","./OperatingComputer.jsx":"6499","./Orbit":"7701","./Orbit.jsx":"7701","./OreRedemption":"5802","./OreRedemption.jsx":"5802","./PAI":"4235","./PAI.jsx":"4235","./PDA":"2740","./PDA.jsx":"2740","./Pacman":"377","./Pacman.jsx":"377","./PanDEMIC":"9454","./PanDEMIC.tsx":"9454","./ParticleAccelerator":"3566","./ParticleAccelerator.jsx":"3566","./PdaPainter":"3371","./PdaPainter.jsx":"3371","./PersonalCrafting":"6144","./PersonalCrafting.jsx":"6144","./Photocopier":"2327","./Photocopier.jsx":"2327","./PoolController":"7331","./PoolController.jsx":"7331","./PortablePump":"5562","./PortablePump.jsx":"5562","./PortableScrubber":"7920","./PortableScrubber.jsx":"7920","./PortableTurret":"2854","./PortableTurret.jsx":"2854","./PowerMonitor":"1784","./PowerMonitor.tsx":"1784","./PrisonerImplantManager":"8011","./PrisonerImplantManager.jsx":"8011","./PrisonerShuttleConsole":"2479","./PrisonerShuttleConsole.jsx":"2479","./PrizeCounter":"9083","./PrizeCounter.tsx":"9083","./QuirkMenu":"7692","./QuirkMenu.tsx":"7692","./RCD":"7076","./RCD.tsx":"7076","./RPD":"1703","./RPD.jsx":"1703","./Radio":"8930","./Radio.tsx":"8930","./RankedListInputModal":"4097","./RankedListInputModal.tsx":"4097","./ReactorMonitor":"4087","./ReactorMonitor.tsx":"4087","./ReagentGrinder":"1876","./ReagentGrinder.jsx":"1876","./ReagentsEditor":"1569","./ReagentsEditor.tsx":"1569","./RemoteSignaler":"9510","./RemoteSignaler.jsx":"9510","./RequestConsole":"5297","./RequestConsole.tsx":"5297","./RndBackupConsole":"4384","./RndBackupConsole.jsx":"4384","./RndConsole":"2247","./RndConsole/":"2247","./RndConsole/AnalyzerMenu":"4080","./RndConsole/AnalyzerMenu.jsx":"4080","./RndConsole/DataDiskMenu":"9529","./RndConsole/DataDiskMenu.jsx":"9529","./RndConsole/LatheCategory":"1465","./RndConsole/LatheCategory.jsx":"1465","./RndConsole/LatheChemicalStorage":"4154","./RndConsole/LatheChemicalStorage.jsx":"4154","./RndConsole/LatheMainMenu":"8563","./RndConsole/LatheMainMenu.jsx":"8563","./RndConsole/LatheMaterialStorage":"7635","./RndConsole/LatheMaterialStorage.jsx":"7635","./RndConsole/LatheMaterials":"5887","./RndConsole/LatheMaterials.jsx":"5887","./RndConsole/LatheMenu":"9760","./RndConsole/LatheMenu.jsx":"9760","./RndConsole/LatheSearch":"6013","./RndConsole/LatheSearch.jsx":"6013","./RndConsole/LinkMenu":"7726","./RndConsole/LinkMenu.jsx":"7726","./RndConsole/SettingsMenu":"3321","./RndConsole/SettingsMenu.jsx":"3321","./RndConsole/index":"2247","./RndConsole/index.jsx":"2247","./RndNetController":"7280","./RndNetController.jsx":"7280","./RndServer":"5156","./RndServer.jsx":"5156","./RobotSelfDiagnosis":"7868","./RobotSelfDiagnosis.jsx":"7868","./RoboticsControlConsole":"1696","./RoboticsControlConsole.jsx":"1696","./Safe":"5826","./Safe.jsx":"5826","./SatelliteControl":"1892","./SatelliteControl.jsx":"1892","./SecureStorage":"7943","./SecureStorage.jsx":"7943","./SecurityRecords":"8589","./SecurityRecords.jsx":"8589","./SeedExtractor":"6906","./SeedExtractor.tsx":"6906","./ShuttleConsole":"631","./ShuttleConsole.jsx":"631","./ShuttleManipulator":"5060","./ShuttleManipulator.jsx":"5060","./SingularityMonitor":"6448","./SingularityMonitor.jsx":"6448","./Sleeper":"1495","./Sleeper.tsx":"1495","./SlotMachine":"6526","./SlotMachine.jsx":"6526","./Smartfridge":"1645","./Smartfridge.jsx":"1645","./Smes":"1399","./Smes.tsx":"1399","./SolarControl":"1343","./SolarControl.jsx":"1343","./SpawnersMenu":"4263","./SpawnersMenu.jsx":"4263","./SpecMenu":"8729","./SpecMenu.jsx":"8729","./StackCraft":"9469","./StackCraft.tsx":"9469","./StationAlertConsole":"5592","./StationAlertConsole.jsx":"5592","./StationTraitsPanel":"5651","./StationTraitsPanel.tsx":"5651","./StripMenu":"5724","./StripMenu.tsx":"5724","./SuitStorage":"2975","./SuitStorage.jsx":"2975","./SupermatterMonitor":"4835","./SupermatterMonitor.tsx":"4835","./SyndicateComputerSimple":"2266","./SyndicateComputerSimple.jsx":"2266","./TEG":"8073","./TEG.jsx":"8073","./TachyonArray":"5808","./TachyonArray.jsx":"5808","./Tank":"5125","./Tank.jsx":"5125","./TankDispenser":"7112","./TankDispenser.jsx":"7112","./TcommsCore":"3283","./TcommsCore.jsx":"3283","./TcommsRelay":"431","./TcommsRelay.jsx":"431","./Teleporter":"5605","./Teleporter.jsx":"5605","./TelescienceConsole":"8336","./TelescienceConsole.jsx":"8336","./TempGun":"1745","./TempGun.jsx":"1745","./TextInputModal":"4273","./TextInputModal.tsx":"4273","./ThermoMachine":"9449","./ThermoMachine.jsx":"9449","./TransferValve":"1760","./TransferValve.jsx":"1760","./TurbineComputer":"6971","./TurbineComputer.jsx":"6971","./Uplink":"8380","./Uplink.tsx":"8380","./Vending":"1638","./Vending.jsx":"1638","./VolumeMixer":"2144","./VolumeMixer.jsx":"2144","./VotePanel":"7063","./VotePanel.jsx":"7063","./Wires":"7983","./Wires.jsx":"7983","./WizardApprenticeContract":"8167","./WizardApprenticeContract.jsx":"8167","./ZLevelManager":"234","./ZLevelManager.tsx":"234","./common/AccessList":"2723","./common/AccessList.tsx":"2723","./common/AtmosScan":"7276","./common/AtmosScan.tsx":"7276","./common/BeakerContents":"3013","./common/BeakerContents.tsx":"3013","./common/BotStatus":"9226","./common/BotStatus.jsx":"9226","./common/ComplexModal":"4744","./common/ComplexModal.jsx":"4744","./common/CrewManifest":"2639","./common/CrewManifest.jsx":"2639","./common/InputButtons":"1942","./common/InputButtons.tsx":"1942","./common/InterfaceLockNoticeBox":"1992","./common/InterfaceLockNoticeBox.jsx":"1992","./common/Loader":"9472","./common/Loader.tsx":"9472","./common/LoginInfo":"7352","./common/LoginInfo.jsx":"7352","./common/LoginScreen":"736","./common/LoginScreen.jsx":"736","./common/Operating":"6696","./common/Operating.tsx":"6696","./common/SearchableTableContext":"6888","./common/SearchableTableContext.tsx":"6888","./common/Signaler":"9298","./common/Signaler.jsx":"9298","./common/SimpleRecords":"4455","./common/SimpleRecords.jsx":"4455","./common/SortableTableContext":"2264","./common/SortableTableContext.tsx":"2264","./common/TabsContext":"4900","./common/TabsContext.tsx":"4900","./common/TemporaryNotice":"7482","./common/TemporaryNotice.jsx":"7482","./goonstation_PTL":"162","./goonstation_PTL/":"162","./goonstation_PTL/index":"162","./goonstation_PTL/index.jsx":"162","./pai/pai_atmosphere":"2817","./pai/pai_atmosphere.jsx":"2817","./pai/pai_bioscan":"7716","./pai/pai_bioscan.jsx":"7716","./pai/pai_directives":"1091","./pai/pai_directives.jsx":"1091","./pai/pai_doorjack":"9316","./pai/pai_doorjack.jsx":"9316","./pai/pai_main_menu":"5042","./pai/pai_main_menu.jsx":"5042","./pai/pai_manifest":"702","./pai/pai_manifest.jsx":"702","./pai/pai_medrecords":"9513","./pai/pai_medrecords.jsx":"9513","./pai/pai_messenger":"984","./pai/pai_messenger.jsx":"984","./pai/pai_radio":"9028","./pai/pai_radio.jsx":"9028","./pai/pai_secrecords":"6838","./pai/pai_secrecords.jsx":"6838","./pai/pai_signaler":"4244","./pai/pai_signaler.jsx":"4244","./pda/pda_atmos_scan":"8539","./pda/pda_atmos_scan.jsx":"8539","./pda/pda_cookbook":"5246","./pda/pda_cookbook.jsx":"5246","./pda/pda_games":"2336","./pda/pda_games.jsx":"2336","./pda/pda_janitor":"3606","./pda/pda_janitor.jsx":"3606","./pda/pda_main_menu":"2526","./pda/pda_main_menu.jsx":"2526","./pda/pda_manifest":"4642","./pda/pda_manifest.jsx":"4642","./pda/pda_medical":"1212","./pda/pda_medical.jsx":"1212","./pda/pda_messenger":"3260","./pda/pda_messenger.jsx":"3260","./pda/pda_minesweeper":"3067","./pda/pda_minesweeper.jsx":"3067","./pda/pda_mule":"5030","./pda/pda_mule.jsx":"5030","./pda/pda_nanobank":"9749","./pda/pda_nanobank.jsx":"9749","./pda/pda_notes":"3194","./pda/pda_notes.jsx":"3194","./pda/pda_power":"4702","./pda/pda_power.jsx":"4702","./pda/pda_secbot":"6651","./pda/pda_secbot.jsx":"6651","./pda/pda_security":"7155","./pda/pda_security.jsx":"7155","./pda/pda_signaler":"7024","./pda/pda_signaler.jsx":"7024","./pda/pda_status_display":"7148","./pda/pda_status_display.jsx":"7148","./pda/pda_supplyrecords":"7632","./pda/pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=4808},937:function(e,n,t){var r={"./ByondUi.stories.js":"7997","./Storage.stories.js":"6498","./Themes.stories.js":"9615"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=937},7912:function(e,n,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i,o=t(8014),l=t(4530),a=t(6634);function c(e){var n="https://react.dev/errors/"+e;if(1D||(e.current=R[D],R[D]=null,D--)}function L(e,n){R[++D]=e.current,e.current=n}var K=$(null),J=$(null),X=$(null),U=$(null);function F(e,n){switch(L(X,n),L(J,e),L(K,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sj(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=sb(n=sj(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(K),L(K,e)}function V(){M(K),M(J),M(X)}function H(e){null!==e.memoizedState&&L(U,e);var n=K.current,t=sb(n,e.type);n!==t&&(L(J,e),L(K,t))}function W(e){J.current===e&&(M(K),M(J)),U.current===e&&(M(U),un._currentValue=N)}function q(e){if(void 0===nD)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);nD=n&&n[1]||"",n$=-1)":-1o||s[i]!==u[o]){var d="\n"+s[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=o);break}}}finally{G=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?q(t):""}function Q(e){try{var n="",t=null;do n+=function(e,n){switch(e.tag){case 26:case 27:case 5:return q(e.type);case 16:return q("Lazy");case 13:return e.child!==n&&null!==n?q("Suspense Fallback"):q("Suspense");case 19:return q("SuspenseList");case 0:case 15:return Y(e.type,!1);case 11:return Y(e.type.render,!1);case 1:return Y(e.type,!0);case 31:return q("Activity");default:return""}}(e,t),t=e,e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Z=Object.prototype.hasOwnProperty,ee=o.unstable_scheduleCallback,en=o.unstable_cancelCallback,et=o.unstable_shouldYield,er=o.unstable_requestPaint,ei=o.unstable_now,eo=o.unstable_getCurrentPriorityLevel,el=o.unstable_ImmediatePriority,ea=o.unstable_UserBlockingPriority,ec=o.unstable_NormalPriority,es=o.unstable_LowPriority,eu=o.unstable_IdlePriority,ed=o.log,ef=o.unstable_setDisableYieldValue,eh=null,em=null;function ep(e){if("function"==typeof ed&&ef(e),em&&"function"==typeof em.setStrictMode)try{em.setStrictMode(eh,e)}catch(e){}}var ex=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ej|0)|0},eg=Math.log,ej=Math.LN2,eb=256,ey=262144,ev=4194304;function ew(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ek(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=0x7ffffff&r;return 0!==a?0!=(r=a&~o)?i=ew(r):0!=(l&=a)?i=ew(l):t||0!=(t=a&~e)&&(i=ew(t)):0!=(a=r&~o)?i=ew(a):0!==l?i=ew(l):t||0!=(t=r&~e)&&(i=ew(t)),0===i?0:0!==n&&n!==i&&0==(n&o)&&((o=i&-i)>=(t=n&-n)||32===o&&0!=(4194048&t))?n:i}function e_(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function eC(){var e=ev;return 0==(0x3c00000&(ev<<=1))&&(ev=4194304),e}function eI(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function eS(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eO(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ex(n);e.entangledLanes|=n,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&t}function eA(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ex(t),i=1<=tt),to=!1;function tl(e,n){switch(e){case"keyup":return -1!==te.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return"object"===(void 0===(e=e.detail)?"undefined":r(e))&&"data"in e?e.data:null}var tc=!1,ts={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!ts[e.type]:"textarea"===n}function td(e,n,t,r){ny?nv?nv.push(r):nv=[r]:ny=r,0<(n=si(n,"onChange")).length&&(t=new nX("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tf=null,th=null;function tm(e){c4(e,0)}function tp(e){if(e9(eH(e)))return e}function tx(e,n){if("change"===e)return n}var tg=!1;if(nI){if(nI){var tj="oninput"in document;if(!tj){var tb=document.createElement("div");tb.setAttribute("oninput","return;"),tj="function"==typeof tb.oninput}i=tj}else i=!1;tg=i&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tO(r)}}function tP(e){var n,t;e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var r=ne(e.document);n=r,null!=(t=e.HTMLIFrameElement)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t;){try{var i="string"==typeof r.contentWindow.location.href}catch(e){i=!1}if(i)e=r.contentWindow;else break;r=ne(e.document)}return r}function tE(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tB=nI&&"documentMode"in document&&11>=document.documentMode,tz=null,tT=null,tN=null,tR=!1;function tD(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tR||null==tz||tz!==ne(r)||(r="selectionStart"in(r=tz)&&tE(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tN&&tS(tN,r)||(tN=r,0<(r=si(tT,"onSelect")).length&&(n=new nX("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=tz)))}function t$(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tM={animationend:t$("Animation","AnimationEnd"),animationiteration:t$("Animation","AnimationIteration"),animationstart:t$("Animation","AnimationStart"),transitionrun:t$("Transition","TransitionRun"),transitionstart:t$("Transition","TransitionStart"),transitioncancel:t$("Transition","TransitionCancel"),transitionend:t$("Transition","TransitionEnd")},tL={},tK={};function tJ(e){if(tL[e])return tL[e];if(!tM[e])return e;var n,t=tM[e];for(n in t)if(t.hasOwnProperty(n)&&n in tK)return tL[e]=t[n];return e}nI&&(tK=document.createElement("div").style,"AnimationEvent"in window||(delete tM.animationend.animation,delete tM.animationiteration.animation,delete tM.animationstart.animation),"TransitionEvent"in window||delete tM.transitionend.transition);var tX=tJ("animationend"),tU=tJ("animationiteration"),tF=tJ("animationstart"),tV=tJ("transitionrun"),tH=tJ("transitionstart"),tW=tJ("transitioncancel"),tq=tJ("transitionend"),tG=new Map,tY="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tQ(e,n){tG.set(e,n),eQ(n,[e])}tY.push("scrollEnd");var tZ="function"==typeof reportError?reportError:function(e){if("object"===("undefined"==typeof window?"undefined":r(window))&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===(void 0===e?"undefined":r(e))&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"===("undefined"==typeof process?"undefined":r(process))&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},t0=[],t1=0,t2=0;function t8(){for(var e=t1,n=t2=t1=0;n>=l,i-=l,rb=1<<32-ex(n)+i|t<f?(p=d,d=null):p=d.sibling;var x=m(r,d,a[f],c);if(null===x){null===d&&(d=p);break}e&&d&&null===x.alternate&&n(r,d),o=l(x,o,f),null===u?s=x:u.sibling=x,u=x,d=p}if(f===a.length)return t(r,d),rO&&rv(r,f),s;if(null===d){for(;fp?(x=f,f=null):x=f.sibling;var b=m(r,f,g.value,s);if(null===b){null===f&&(f=x);break}e&&f&&null===b.alternate&&n(r,f),o=l(b,o,p),null===d?u=b:d.sibling=b,d=b,f=x}if(g.done)return t(r,f),rO&&rv(r,p),u;if(null===f){for(;!g.done;p++,g=a.next())null!==(g=h(r,g.value,s))&&(o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return rO&&rv(r,p),u}for(f=i(f);!g.done;p++,g=a.next())null!==(g=j(f,r,p,g.value,s))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return e&&f.forEach(function(e){return n(r,e)}),rO&&rv(r,p),u}(u,d,f=y.call(f),b)}if("function"==typeof f.then)return s(u,d,ij(f),b);if(f.$$typeof===v)return s(u,d,rG(u,f),b);iy(u,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"===(void 0===f?"undefined":r(f))?(f=""+f,null!==d&&6===d.tag?(t(u,d.sibling),(b=o(d,f)).return=u):(t(u,d),(b=ra(f,u.mode,b)).return=u),a(u=b)):t(u,d)}(s,u,d,f);return ix=null,b}catch(e){if(e===io||e===ia)throw e;var y=rn(29,e,null,s.mode);return y.lanes=f,y.return=s,y}finally{}}}var iw=iv(!0),ik=iv(!1),i_=!1;function iC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iI(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function iS(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function iO(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&aD)){var i=r.pending;return null===i?n.next=n:(n.next=i.next,i.next=n),r.pending=n,n=t7(e),t6(e,null,t),n}return t3(e,r,n,t),t7(e)}function iA(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194048&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,eA(e,t)}}function iP(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var i=null,o=null;if(null!==(t=t.firstBaseUpdate)){do{var l={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===o?i=o=l:o=o.next=l,t=t.next}while(null!==t);null===o?i=o=n:o=o.next=n}else i=o=n;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var iE=!1;function iB(){if(iE){var e=r6;if(null!==e)throw e}}function iz(e,n,t,r){iE=!1;var i=e.updateQueue;i_=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,s=c.next;c.next=null,null===l?o=s:l.next=s,l=c;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==l&&(null===a?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=c)}if(null!==o){var d=i.baseState;for(l=0,u=s=c=null,a=o;;){var f=-0x20000001&a.lane,m=f!==a.lane;if(m?(aL&f)===f:(r&f)===f){0!==f&&f===r4&&(iE=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,x=a;switch(f=n,x.tag){case 1:if("function"==typeof(p=x.payload)){d=p.call(t,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=x.payload)?p.call(t,d,f):p))break e;d=h({},d,f);break e;case 2:i_=!0}}null!==(f=a.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=i.callbacks)?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(s=u=m,c=d):u=u.next=m,l|=f;if(null===(a=a.next))if(null===(a=i.shared.pending))break;else a=(m=a).next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=s,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),aW|=l,e.lanes=l,e.memoizedState=d}}function iT(e,n){if("function"!=typeof e)throw Error(c(191,e));e.call(n)}function iN(e,n){var t=e.callbacks;if(null!==t)for(e.callbacks=null,e=0;el?l:8;var a=z.T,c={};z.T=c,le(e,!1,n,t);try{var s=o(),u=z.S;if(null!==u&&u(c,s),null!==s&&"object"===(void 0===s?"undefined":r(s))&&"function"==typeof s.then){var d,f,h=(d=[],f={status:"pending",value:null,reason:null,then:function(e){d.push(e)}},s.then(function(){f.status="fulfilled",f.value=i;for(var e=0;e title"))),sh(o,r,t),o[eR]=e,eq(o),r=o;break e;case"link":var l=s8("link","href",i).get(r+(t.href||""));if(l){for(var a=0;aa)break;var u=c.transferSize,d=c.initiatorType;u&&sm(d)&&(l+=u*((c=c.responseEnd)s4?50:800)+p);return m.unsuspend=e,function(){m.unsuspend=null,clearTimeout(n),clearTimeout(t)}}:null)){ce=o,e.cancelPendingCommit=x(cI.bind(null,e,n,o,t,r,i,l,a,c,u,d,null,f,h)),cd(e,o,l,!s);return}}cI(e,n,o,t,r,i,l,a,c)}function cd(e,n,t,r){n&=~aG,n&=~aq,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var i=n;0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(i,{is:r.is}):l.createElement(i)}}o[eR]=n,o[eD]=r;e:for(l=n.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)break;for(;null===l.sibling;){if(null===l.return||l.return===n)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(n.stateNode=o,sh(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&lG(n)}}return l1(n),lY(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&lG(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(c(166));if(e=X.current,rN(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(i=rI))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[eR]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||su(e.nodeValue,t)))||rB(n,!0)}else(e=sg(e).createTextNode(r))[eR]=n,n.stateNode=e}return l1(n),null;case 31:if(t=n.memoizedState,null===e||null!==e.memoizedState){if(r=rN(n),null!==t){if(null===e){if(!r)throw Error(c(318));if(!(e=null!==(e=n.memoizedState)?e.dehydrated:null))throw Error(c(557));e[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),e=!1}else t=rD(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e){if(256&n.flags)return iH(n),n;return iH(n),null}if(0!=(128&n.flags))throw Error(c(558))}return l1(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=rN(n),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(c(318));if(!(i=null!==(i=n.memoizedState)?i.dehydrated:null))throw Error(c(317));i[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),i=!1}else i=rD(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(256&n.flags)return iH(n),n;return iH(n),null}}if(iH(n),0!=(128&n.flags))return n.lanes=t,n;return t=null!==r,e=null!==e&&null!==e.memoizedState,t&&(r=n.child,i=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),t!==e&&t&&(n.child.flags|=8192),lZ(n,n.updateQueue),l1(n),null;case 4:return V(),null===e&&se(n.stateNode.containerInfo),l1(n),null;case 10:return rX(n.type),l1(n),null;case 19:if(M(iW),null===(r=n.memoizedState))return l1(n),null;if(i=0!=(128&n.flags),null===(o=r.rendering))if(i)l0(r,!1);else{if(0!==aH||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(o=iq(e))){for(n.flags|=128,l0(r,!1),n.updateQueue=e=o.updateQueue,lZ(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)ri(t,e),t=t.sibling;return L(iW,1&iW.current|2),rO&&rv(n,r.treeForkCount),n.child}e=e.sibling}null!==r.tail&&ei()>a3&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304)}else{if(!i)if(null!==(e=iq(o))){if(n.flags|=128,i=!0,n.updateQueue=e=e.updateQueue,lZ(n,e),l0(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rO)return l1(n),null}else 2*ei()-r.renderingStartTime>a3&&0x20000000!==t&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304);r.isBackwards?(o.sibling=n.child,n.child=o):(null!==(e=r.last)?e.sibling=o:n.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ei(),e.sibling=null,t=iW.current,L(iW,i?1&t|2:1&t),rO&&rv(n,r.treeForkCount),e;return l1(n),null;case 22:case 23:return iH(n),iL(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?0!=(0x20000000&t)&&0==(128&n.flags)&&(l1(n),6&n.subtreeFlags&&(n.flags|=8192)):l1(n),null!==(t=n.updateQueue)&&lZ(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&M(ie),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),rX(r1),l1(n),null;case 25:case 30:return null}throw Error(c(156,n.tag))}(n.alternate,n,aV);if(null!==t){aM=t;return}if(null!==(n=n.sibling)){aM=n;return}aM=n=e}while(null!==n);0===aH&&(aH=5)}function cC(e,n){do{var t=function(e,n){switch(r_(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return rX(r1),V(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return W(n),null;case 31:if(null!==n.memoizedState){if(iH(n),null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 13:if(iH(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return M(iW),null;case 4:return V(),null;case 10:return rX(n.type),null;case 22:case 23:return iH(n),iL(),null!==e&&M(ie),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return rX(r1),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,aM=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){aM=e;return}aM=e=t}while(null!==e);aH=6,aM=null}function cI(e,n,t,r,i,o,l,a,s){e.cancelPendingCommit=null;do cE();while(0!==a6);if(0!=(6&aD))throw Error(c(327));if(null!==n){if(n===e.current)throw Error(c(177));if(!function(e,n,t,r,i,o){var l=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var a=e.entanglements,c=e.expirationTimes,s=e.hiddenUpdates;for(t=l&~t;0x&&(l=x,x=p,p=l);var g=tA(a,p),j=tA(a,x);if(g&&j&&(1!==h.rangeCount||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==j.node||h.focusOffset!==j.offset)){var b=d.createRange();b.setStart(g.node,g.offset),h.removeAllRanges(),p>x?(h.addRange(b),h.extend(j.node,j.offset)):(b.setEnd(j.node,j.offset),h.addRange(b))}}}}for(d=[],h=a;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof a.focus&&a.focus(),a=0;at?32:t,z.T=null,t=ct,ct=null;var o=a7,l=ce;if(a6=0,a9=a7=null,ce=0,0!=(6&aD))throw Error(c(331));var a=aD;if(aD|=4,az(o.current),aI(o,o.current,l,t),aD=a,cH(0,!1),em&&"function"==typeof em.onPostCommitFiberRoot)try{em.onPostCommitFiberRoot(eh,o)}catch(e){}return!0}finally{T.p=i,z.T=r,cP(e,n)}}function cz(e,n,t){n=rd(t,n),n=lj(e.stateNode,n,2),null!==(e=iO(e,n,2))&&(eS(e,2),cV(e))}function cT(e,n,t){if(3===e.tag)cz(e,e,t);else for(;null!==n;){if(3===n.tag){cz(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===a4||!a4.has(r))){e=rd(t,e),null!==(r=iO(n,t=lb(2),2))&&(ly(t,r,n,e),eS(r,2),cV(r));break}}n=n.return}}function cN(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new aR;var i=new Set;r.set(n,i)}else void 0===(i=r.get(n))&&(i=new Set,r.set(n,i));i.has(t)||(aF=!0,i.add(t),e=cR.bind(null,e,n,t),n.then(e,e))}function cR(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,a$===e&&(aL&t)===t&&(4===aH||3===aH&&(0x3c00000&aL)===aL&&300>ei()-a2?0==(2&aD)&&cm(e,0):aG|=t,aQ===aL&&(aQ=0)),cV(e)}function cD(e,n){0===n&&(n=eC()),null!==(e=t4(e,n))&&(eS(e,n),cV(e))}function c$(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),cD(e,t)}function cM(e,n){var t=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(t=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(c(314))}null!==r&&r.delete(n),cD(e,t)}var cL=null,cK=null,cJ=!1,cX=!1,cU=!1,cF=0;function cV(e){e!==cK&&null===e.next&&(null===cK?cL=cK=e:cK=cK.next=e),cX=!0,cJ||(cJ=!0,sC(function(){0!=(6&aD)?ee(el,cW):cq()}))}function cH(e,n){if(!cU&&cX){cU=!0;do for(var t=!1,r=cL;null!==r;){if(!n)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var l=r.suspendedLanes,a=r.pingedLanes;o=0xc000095&(o=(1<<31-ex(42|e)+1)-1&(i&~(l&~a)))?0xc000095&o|1:o?2|o:0}0!==o&&(t=!0,cQ(r,o))}else o=aL,0==(3&(o=ek(r,r===a$?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||e_(r,o)||(t=!0,cQ(r,o));r=r.next}while(t);cU=!1}}function cW(){cq()}function cq(){cX=cJ=!1;var e,n=0;0===cF||((e=window.event)&&"popstate"===e.type?e===sv||(sv=e,0):(sv=null,1))||(n=cF);for(var t=ei(),r=null,i=cL;null!==i;){var o=i.next,l=cG(i,t);0===l?(i.next=null,null===r?cL=o:r.next=o,null===o&&(cK=r)):(r=i,(0!==n||0!=(3&l))&&(cX=!0)),i=o}0!==a6&&5!==a6||cH(n,!1),0!==cF&&(cF=0)}function cG(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0 title"):null)}function s5(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var s4=0;function s6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)s9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var s7=null;function s9(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,s7=new Map,n.forEach(ue,e),s7=null,s6.call(e))}function ue(e,n){if(!(4&n.state.loading)){var t=s7.get(e);if(t)var r=t.get(null);else{t=new Map,s7.set(e,t);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.length)&&(n=e.length);for(var t=0,r=Array(n);ti})},2316:function(e,n,t){"use strict";t.d(n,{KA:()=>r,KS:()=>o,NE:()=>l,bz:()=>i});var r=2,i=1,o=0,l=["average","bad","black","blue","brown","good","green","grey","label","olive","orange","pink","purple","red","teal","transparent","violet","white","yellow"]},1128:function(e,n,t){"use strict";t.d(n,{Nh:()=>u,WK:()=>w,tk:()=>v,y4:()=>f});var r,i=t(7686);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};d=!!e.ignoreWindowFocus},h=!0;function m(e,n){if(d){h=!0;return}if(r&&(clearTimeout(r),r=null),n){r=setTimeout(function(){return m(e)});return}h!==e&&(h=e,u.emit(e?"window-focus":"window-blur"),u.emit("window-focus-change",e))}var p=null;function x(e){var n=String(e.tagName).toLowerCase();return"input"===n||"textarea"===n}function g(){p&&(p.removeEventListener("blur",g),p=null,u.emit("input-blur"))}var j=null,b=null,y=[];function v(e){y.push(e)}function w(e){var n=y.indexOf(e);n>=0&&y.splice(n,1)}window.addEventListener("mousemove",function(e){var n=e.target;n!==b&&(b=n,function(e){if(!p&&h)for(var n=document.body;e&&e!==n;){if(y.includes(e)){if(e.contains(j))return;j=e,e.focus();return}e=e.parentElement}}(n))}),document.addEventListener("focus",function(e){var n,t,r;if(t=e.target,null!=(r=Element)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](t):!(t instanceof r)){b=null,j=null;return}b=null,j=e.target,x(e.target)&&(n=e.target,g(),(p=n).addEventListener("blur",g),u.emit("input-focus"))},!0),document.addEventListener("blur",function(){b=null},!0),window.addEventListener("focus",function(){m(!0)}),window.addEventListener("blur",function(){b=null,m(!1,!0)}),window.addEventListener("close",function(){m(!1)});var k={},_=function(){function e(n,t,r){l(this,e),s(this,"event",void 0),s(this,"type",void 0),s(this,"code",void 0),s(this,"ctrl",void 0),s(this,"shift",void 0),s(this,"alt",void 0),s(this,"repeat",void 0),s(this,"_str",void 0),this.event=n,this.type=t,this.code=n.keyCode,this.ctrl=n.ctrlKey,this.shift=n.shiftKey,this.alt=n.altKey,this.repeat=!!r}return c(e,[{key:"hasModifierKeys",value:function(){return this.ctrl||this.alt||this.shift}},{key:"isModifierKey",value:function(){return this.code===i.Ss||this.code===i.re||this.code===i.cH}},{key:"isDown",value:function(){return"keydown"===this.type}},{key:"isUp",value:function(){return"keyup"===this.type}},{key:"toString",value:function(){return this._str||(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=i.sV&&this.code<=i.Yw?this._str+="F".concat(this.code-111):this._str+="[".concat(this.code,"]")),this._str}}]),e}();document.addEventListener("keydown",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keydown",k[n]);u.emit("keydown",t),u.emit("key",t),k[n]=!0}}),document.addEventListener("keyup",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keyup");u.emit("keyup",t),u.emit("key",t),k[n]=!1}})},9582:function(e,n,t){"use strict";t.d(n,{QL:()=>o,d5:()=>l,fU:()=>c,up:()=>a});var r=["f","p","n","μ","m"," ","k","M","G","T","P","E","Z","Y","R","Q","F","N","H"],i=r.indexOf(" ");function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-i,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Number.isFinite(e))return e.toString();var o=Math.floor(Math.max(3*n,Math.floor(Math.log10(Math.abs(e))))/3),l=r[Math.min(o+i,r.length-1)],a=(e/Math.pow(1e3,o)).toFixed(2);return a.endsWith(".00")?a=a.slice(0,-3):a.endsWith(".0")&&(a=a.slice(0,-2)),"".concat(a," ").concat(l.trim()).concat(t).trim()}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e,n,"W")}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Number.isFinite(e))return String(e);var t=Number(e.toFixed(n)),r=Math.abs(t).toString().split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");var i=r.join(".");return t<0?"-".concat(i):i}function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",t=Math.floor(e/10),r=Math.floor(t/3600),i=Math.floor(t%3600/60),o=t%60;if("short"===n)return"".concat(r>0?"".concat(r,"h"):"").concat(i>0?"".concat(i,"m"):"").concat(o>0?"".concat(o,"s"):"");var l=String(r).padStart(2,"0"),a=String(i).padStart(2,"0"),c=String(o).padStart(2,"0");return"".concat(l,":").concat(a,":").concat(c)}},1874:function(e,n,t){"use strict";t.d(n,{Bm:()=>d,ao:()=>f,sc:()=>h,zr:()=>s});var r=t(1128),i=t(7686),o={},l=[i.s6,i.Ri,i.iy,i.aW,i.Ss,i.re,i.gf,i.R,i.iU,i.zh,i.sP],a={},c=[];function s(){for(var e in a)a[e]&&(a[e]=!1,Byond.command(u.verbParamsFn(u.keyUpVerb,e)))}var u={keyDownVerb:"KeyDown",keyUpVerb:"KeyUp",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}};function d(e){e&&(u=e),Byond.winget("default.*").then(function(e){var n=function(e){return e.substring(1,e.length-1).replace(c,'"')},t={};for(var r in e){var i=r.split("."),l=i[1],a=i[2];l&&a&&(t[l]||(t[l]={}),t[l][a]=e[r])}var c=/\\"/g;for(var s in t){var u=t[s];o[n(u.name)]=n(u.command)}}),r.Nh.on("window-blur",function(){s()}),r.Nh.on("input-focus",function(){s()}),f()}function f(){r.Nh.on("key",m)}function h(){r.Nh.off("key",m)}function m(e){var n=!0,t=!1,r=void 0;try{for(var i,s=c[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)(0,i.value)(e)}catch(e){t=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(t)throw r}}!function(e){var n,t=String(e);if("Ctrl+F5"===t||"Ctrl+R"===t)return location.reload();if(!("Ctrl+F"===t||e.event.defaultPrevented||e.isModifierKey()||l.includes(e.code))){var r=16===(n=e.code)?"Shift":17===n?"Ctrl":18===n?"Alt":33===n?"Northeast":34===n?"Southeast":35===n?"Southwest":36===n?"Northwest":37===n?"West":38===n?"North":39===n?"East":40===n?"South":45===n?"Insert":46===n?"Delete":n>=48&&n<=57||n>=65&&n<=90?String.fromCharCode(n):n>=96&&n<=105?"Numpad".concat(n-96):n>=112&&n<=123?"F".concat(n-111):188===n?",":189===n?"-":190===n?".":void 0;if(r){var i=o[r];if(i)return Byond.command(i);if(e.isDown()&&!a[r]){a[r]=!0;var c=u.verbParamsFn(u.keyDownVerb,r);return Byond.command(c)}if(e.isUp()&&a[r]){a[r]=!1;var s=u.verbParamsFn(u.keyUpVerb,r);Byond.command(s)}}}}(e)}},7686:function(e,n,t){"use strict";t.d(n,{C:()=>y,Pm:()=>p,R:()=>m,Ri:()=>o,Ss:()=>a,W8:()=>g,Wy:()=>x,Yw:()=>k,aW:()=>i,bh:()=>j,cH:()=>c,gf:()=>f,hr:()=>b,iU:()=>d,iy:()=>u,re:()=>l,s6:()=>s,sP:()=>w,sV:()=>v,ye:()=>r,zh:()=>h});var r=8,i=9,o=13,l=16,a=17,c=18,s=27,u=32,d=37,f=38,h=39,m=40,p=48,x=57,g=65,j=90,b=96,y=105,v=112,w=116,k=123},925:function(e,n,t){"use strict";t.d(n,{KL:()=>o,_:()=>i});var r,i=((r={}).A="a",r.Alt="Alt",r.Backspace="Backspace",r.Control="Control",r.D="d",r.Delete="Delete",r.Down="ArrowDown",r.E="e",r.End="End",r.Enter="Enter",r.Esc="Esc",r.Escape="Escape",r.Home="Home",r.Insert="Insert",r.Left="ArrowLeft",r.Minus="-",r.N="n",r.PageDown="PageDown",r.PageUp="PageUp",r.Plus="+",r.Right="ArrowRight",r.S="s",r.Shift="Shift",r.Space=" ",r.Tab="Tab",r.Up="ArrowUp",r.W="w",r.Z="z",r);function o(e){return"Esc"===e||"Escape"===e}},6859:function(e,n,t){"use strict";function r(e,n,t){return et?t:e}function i(e){return e<0?0:e>1?1:e}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return(e-n)/(t-n)}function l(e,n){return Number.parseFloat((Math.round(e*Math.pow(10,n)+1e-4*(e>=0?1:-1))/Math.pow(10,n)).toFixed(n))}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(Math.max(n,0))}function c(e,n){var t=!0,r=!1,i=void 0;try{for(var o,l=Object.keys(n)[Symbol.iterator]();!(t=(o=l.next()).done);t=!0){var a,c=o.value;if((a=n[c])&&e>=a[0]&&e<=a[1])return c}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}}function s(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)}function u(e){return 180/Math.PI*e}t.d(n,{J$:()=>i,KJ:()=>u,LI:()=>l,Lz:()=>s,Mg:()=>a,TG:()=>c,hs:()=>o,qE:()=>r})},5490:function(e,n,t){"use strict";function r(e){for(var n="",t=0;tr,b5:()=>i})},3268:function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return JSON.stringify(e)},t=e.toLowerCase().trim();return function(e){if(!t)return!0;var r=n(e);return!!r&&r.toLowerCase().includes(t)}}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}t.d(n,{Sn:()=>a,XZ:()=>r,ZH:()=>i,jT:()=>u});var o=["Id","Tv"],l=["A","An","And","As","At","But","By","For","For","From","In","Into","Near","Nor","Of","On","Onto","Or","The","To","With"];function a(e){if(!e)return e;var n=e.replace(/([^\W_]+[^\s-]*) */g,function(e){return i(e)}),t=!0,r=!1,a=void 0;try{for(var c,s=l[Symbol.iterator]();!(t=(c=s.next()).done);t=!0){var u=c.value,d=RegExp("\\s".concat(u,"\\s"),"g");n=n.replace(d,function(e){return e.toLowerCase()})}}catch(e){r=!0,a=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw a}}var f=!0,h=!1,m=void 0;try{for(var p,x=o[Symbol.iterator]();!(f=(p=x.next()).done);f=!0){var g=p.value,j=RegExp("\\b".concat(g,"\\b"),"g");n=n.replace(j,function(e){return e.toLowerCase()})}}catch(e){h=!0,m=e}finally{try{f||null==x.return||x.return()}finally{if(h)throw m}}return n}var c=/&(nbsp|amp|quot|lt|gt|apos|trade|copy);/g,s={amp:"&",apos:"'",cops:"\xa9",gt:">",lt:"<",nbsp:" ",quot:'"',trade:"™"};function u(e){return e?e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(e,n){return s[n]}).replace(/&#?([0-9]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,10))}).replace(/&#x?([0-9a-f]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,16))}):e}},3375:function(e,n,t){"use strict";t.d(n,{Fl:()=>x,WP:()=>g,lO:()=>j,zA:()=>l});var r=t(2316),i=t(5490);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ttJ,z2:()=>tM,wn:()=>rr,Z8:()=>x,y5:()=>m,Rr:()=>tp,aF:()=>t1,IC:()=>t2,XI:()=>ra,zv:()=>h,ms:()=>tI,_V:()=>tj,Y0:()=>v,$n:()=>n6,cG:()=>tx,m_:()=>nQ,t1:()=>td,Nt:()=>th,so:()=>tB,Q7:()=>t6,SM:()=>rn,Ap:()=>ri,Ki:()=>tQ,pd:()=>tF,N6:()=>tH,tU:()=>rh,Wx:()=>tY,fs:()=>rg,D1:()=>ti,In:()=>I,c_:()=>tT,Hg:()=>tb,az:()=>y,BK:()=>tm,qT:()=>rv});var r,i,o,l,a=t(8138),c=t(6859),s=t(4530),u=t.t(s,2);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["as","className","children","tw"]),c=i?"".concat(i," ").concat((0,j.WP)(a)):(0,j.WP)(a);return(0,s.createElement)(void 0===r?"div":r,(n=b({},(0,j.Fl)(b({},a,(0,j.lO)(l)))),t=t={className:c},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n),o)}function v(e){var n=e.className,t=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className"]);return(0,a.jsx)(y,function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var C=/-o$/;function I(e){var n=e.name,t=void 0===n?"":n,r=e.size,i=e.spin,o=e.className,l=e.rotation,c=_(e,["name","size","spin","className","rotation"]),s=c.style||{};r&&(s.fontSize="".concat(100*r,"%")),l&&(s.transform="rotate(".concat(l,"deg)")),c.style=s;var u=(0,j.Fl)(c),d="";if(t.startsWith("tg-"))d=t;else{var f=C.test(t),h=t.replace(C,""),m=!h.startsWith("fa-");d=f?"far ":"fas ",m&&(d+="fa-"),d+=h,i&&(d+=" fa-spin")}return(0,a.jsx)("i",k({className:(0,g.Ly)(["Icon",d,o,(0,j.WP)(c)])},u))}function S(){return"undefined"!=typeof window}function O(e){return E(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function P(e){var n;return null==(n=(E(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function E(e){return!!S()&&(e instanceof Node||e instanceof A(e).Node)}function B(e){return!!S()&&(e instanceof Element||e instanceof A(e).Element)}function z(e){return!!S()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function T(e){return!!S()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}(I||(I={})).Stack=function(e){var n,t,r=e.className,i=e.children,o=e.size,l=_(e,["className","children","size"]),c=l.style||{};return o&&(c.fontSize="".concat(100*o,"%")),l.style=c,(0,a.jsx)("span",(n=k({className:(0,g.Ly)(["IconStack",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};let N=new Set(["inline","contents"]);function R(e){let{overflow:n,overflowX:t,overflowY:r,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!N.has(i)}let D=new Set(["table","td","th"]),$=[":popover-open",":modal"];function M(e){return $.some(n=>{try{return e.matches(n)}catch(e){return!1}})}let L=["transform","translate","scale","rotate","perspective"],K=["transform","translate","scale","rotate","perspective","filter"],J=["paint","layout","strict","content"];function X(e){let n=U(),t=B(e)?H(e):e;return L.some(e=>!!t[e]&&"none"!==t[e])||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||K.some(e=>(t.willChange||"").includes(e))||J.some(e=>(t.contain||"").includes(e))}function U(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let F=new Set(["html","body","#document"]);function V(e){return F.has(O(e))}function H(e){return A(e).getComputedStyle(e)}function W(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===O(e))return e;let n=e.assignedSlot||e.parentNode||T(e)&&e.host||P(e);return T(n)?n.host:n}function G(e,n,t){var r;void 0===n&&(n=[]),void 0===t&&(t=!0);let i=function e(n){let t=q(n);return V(t)?n.ownerDocument?n.ownerDocument.body:n.body:z(t)&&R(t)?t:e(t)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=A(i);if(o){let e=Y(l);return n.concat(l,l.visualViewport||[],R(i)?i:[],e&&t?G(e):[])}return n.concat(i,G(i,[],t))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Q='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',Z="undefined"==typeof Element,ee=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,en=!Z&&Element.prototype.getRootNode?function(e){var n;return null==e||null==(n=e.getRootNode)?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},et=function e(n,t){void 0===t&&(t=!0);var r,i=null==n||null==(r=n.getAttribute)?void 0:r.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},er=function(e){var n,t=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"contenteditable");return""===t||"true"===t},ei=function(e,n,t){if(et(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Q));return n&&ee.call(e,Q)&&r.unshift(e),r=r.filter(t)},eo=function e(n,t,r){for(var i=[],o=Array.from(n);o.length;){var l=o.shift();if(!et(l,!1))if("SLOT"===l.tagName){var a=l.assignedElements(),c=e(a.length?a:l.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:l,candidates:c})}else{ee.call(l,Q)&&r.filter(l)&&(t||!n.includes(l))&&i.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),u=!et(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&u){var d=e(!0===s?l.children:s.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else o.unshift.apply(o,l.children)}}return i},el=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ea=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||er(e))&&!el(e)?0:e.tabIndex},ec=function(e,n){var t=ea(e);return t<0&&n&&!el(e)?0:t},es=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},eu=function(e){return"INPUT"===e.tagName},ed=function(e,n){for(var t=0;tsummary:first-of-type")?e.parentElement:e;if(ee.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return ep(e)}else{if("function"==typeof r){for(var o=e;e;){var l=e.parentElement,a=en(e);if(l&&!l.shadowRoot&&!0===r(l))return ep(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=o}if(em(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},eg=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;tea(n))&&!!ej(e,n)},ey=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(n)||!!(n>=0)},ev=function e(n){var t=[],r=[];return n.forEach(function(n,i){var o=!!n.scopeParent,l=o?n.scopeParent:n,a=ec(l,o),c=o?e(n.candidates):l;0===a?o?t.push.apply(t,c):t.push(l):r.push({documentOrder:i,tabIndex:a,item:n,isScope:o,content:c})}),r.sort(es).reduce(function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e},[]).concat(t)},ew=function(e,n){return ev((n=n||{}).getShadowRoot?eo([e],n.includeContainer,{filter:eb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ey}):ei(e,n.includeContainer,eb.bind(null,n)))};function ek(e,n){if(!e||!n)return!1;let t=null==n.getRootNode?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&T(t)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function e_(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eC(e,n){return null!=n&&("composedPath"in e?e.composedPath().includes(n):null!=e.target&&n.contains(e.target))}function eI(e){return(null==e?void 0:e.ownerDocument)||document}function eS(e,n,t){return void 0===t&&(t=!0),e.filter(e=>{var r;return e.parentId===n&&(!t||(null==(r=e.context)?void 0:r.open))}).flatMap(n=>[n,...eS(e,n.id,t)])}function eO(e,n){let t=["mouse","pen"];return n||t.push("",void 0),t.includes(e)}var eA="undefined"!=typeof document?s.useLayoutEffect:function(){};function eP(e){let n=s.useRef(e);return eA(()=>{n.current=e}),n}let eE={...u}.useInsertionEffect||(e=>e());function eB(e){let n=s.useRef(()=>{});return eE(()=>{n.current=e}),s.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eT(e,n){let t=ew(e,ez()),r=t.length;if(0===r)return;let i=function(e){let n=e.activeElement;for(;(null==(t=n)||null==(t=t.shadowRoot)?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}(eI(e)),o=t.indexOf(i);return t[-1===o?1===n?0:r-1:o+n]}function eN(e,n){let t=n||e.currentTarget,r=e.relatedTarget;return!r||!ek(t,r)}function eR(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}var eD=t(6634);let e$=Math.min,eM=Math.max,eL=Math.round,eK=Math.floor,eJ=e=>({x:e,y:e}),eX={left:"right",right:"left",bottom:"top",top:"bottom"},eU={start:"end",end:"start"};function eF(e,n){return"function"==typeof e?e(n):e}function eV(e){return e.split("-")[0]}function eH(e){return e.split("-")[1]}function eW(e){return"x"===e?"y":"x"}function eq(e){return"y"===e?"height":"width"}let eG=new Set(["top","bottom"]);function eY(e){return eG.has(eV(e))?"y":"x"}function eQ(e){return e.replace(/start|end/g,e=>eU[e])}let eZ=["left","right"],e0=["right","left"],e1=["top","bottom"],e2=["bottom","top"];function e8(e){return e.replace(/left|right|bottom|top/g,e=>eX[e])}function e3(e){let{x:n,y:t,width:r,height:i}=e;return{width:r,height:i,top:t,left:n,right:n+r,bottom:t+i,x:n,y:t}}function e5(e,n,t){let r,{reference:i,floating:o}=e,l=eY(n),a=eW(eY(n)),c=eq(a),s=eV(n),u="y"===l,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;switch(s){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(eH(n)){case"start":r[a]-=h*(t&&u?-1:1);break;case"end":r[a]+=h*(t&&u?-1:1)}return r}let e4=async(e,n,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),c=await (null==l.isRTL?void 0:l.isRTL(n)),s=await l.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=e5(s,r,c),f=r,h={},m=0;for(let t=0;tB(e)&&"body"!==O(e)),i=null,o="fixed"===H(e).position,l=o?q(e):e;for(;B(l)&&!V(l);){let n=H(l),t=X(l);t||"fixed"!==n.position||(i=null),(o?!t&&!i:!t&&"static"===n.position&&!!i&&nc.has(i.position)||R(l)&&!t&&function e(n,t){let r=q(n);return!(r===t||!B(r)||V(r))&&("fixed"===H(r).position||e(r,t))}(e,l))?r=r.filter(e=>e!==l):i=n,l=q(l)}return n.set(e,r),r}(n,this._c):[].concat(t),r],l=o[0],a=o.reduce((e,t)=>{let r=ns(n,t,i);return e.top=eM(r.top,e.top),e.right=e$(r.right,e.right),e.bottom=e$(r.bottom,e.bottom),e.left=eM(r.left,e.left),e},ns(n,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nf,getElementRects:nh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:n,height:t}=ne(e);return{width:n,height:t}},getScale:nt,isElement:B,isRTL:function(e){return"rtl"===H(e).direction}};function np(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}var nx="undefined"!=typeof document?s.useLayoutEffect:function(){};function ng(e,n){let t,r,i;if(e===n)return!0;if(typeof e!=typeof n)return!1;if("function"==typeof e&&e.toString()===n.toString())return!0;if(e&&n&&"object"==typeof e){if(Array.isArray(e)){if((t=e.length)!==n.length)return!1;for(r=t;0!=r--;)if(!ng(e[r],n[r]))return!1;return!0}if((t=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=t;0!=r--;)if(!({}).hasOwnProperty.call(n,i[r]))return!1;for(r=t;0!=r--;){let t=i[r];if(("_owner"!==t||!e.$$typeof)&&!ng(e[t],n[t]))return!1}return!0}return e!=e&&n!=n}function nj(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nb(e,n){let t=nj(e);return Math.round(n*t)/t}function ny(e){let n=s.useRef(e);return nx(()=>{n.current=e}),n}let nv="active",nw="selected",nk={...u},n_=!1,nC=0,nI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nC++,nS=nk.useId||function(){let[e,n]=s.useState(()=>n_?nI():void 0);return eA(()=>{null==e&&n(nI())},[]),s.useEffect(()=>{n_=!0},[]),e},nO=s.createContext(null),nA=s.createContext(null),nP=()=>{var e;return(null==(e=s.useContext(nO))?void 0:e.id)||null};function nE(e){return"data-floating-ui-"+e}function nB(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let nz=nE("safe-polygon");function nT(e,n,t){if(t&&!eO(t))return 0;if("number"==typeof e)return e;if("function"==typeof e){let t=e();return"number"==typeof t?t:null==t?void 0:t[n]}return null==e?void 0:e[n]}function nN(e){return"function"==typeof e?e():e}let nR={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},nD=s.forwardRef(function(e,n){let[t,r]=s.useState();eA(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);let i={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[nE("focus-guard")]:"",style:nR};return(0,a.jsx)("span",{...e,...i})}),n$=s.createContext(null),nM=nE("portal");function nL(e){let{children:n,id:t,root:r,preserveTabOrder:i=!0}=e,o=function(e){void 0===e&&(e={});let{id:n,root:t}=e,r=nS(),i=nK(),[o,l]=s.useState(null),a=s.useRef(null);return eA(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),eA(()=>{if(!r||a.current)return;let e=n?document.getElementById(n):null;if(!e)return;let t=document.createElement("div");t.id=r,t.setAttribute(nM,""),e.appendChild(t),a.current=t,l(t)},[n,r]),eA(()=>{if(null===t||!r||a.current)return;let e=t||(null==i?void 0:i.portalNode);e&&!E(e)&&(e=e.current),e=e||document.body;let o=null;n&&((o=document.createElement("div")).id=n,e.appendChild(o));let c=document.createElement("div");c.id=r,c.setAttribute(nM,""),(e=o||e).appendChild(c),a.current=c,l(c)},[n,t,r,i]),o}({id:t,root:r}),[l,c]=s.useState(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),h=s.useRef(null),m=null==l?void 0:l.modal,p=null==l?void 0:l.open,x=!!l&&!l.modal&&l.open&&i&&!!(r||o);return s.useEffect(()=>{if(o&&i&&!m)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&eN(e)&&("focusin"===e.type?eR:function(e){ew(e,ez()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(o)}},[o,i,m]),s.useEffect(()=>{!o||p||eR(o)},[p,o]),(0,a.jsxs)(n$.Provider,{value:s.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:h,portalNode:o,setFocusManagerState:c}),[i,o]),children:[x&&o&&(0,a.jsx)(nD,{"data-type":"outside",ref:u,onFocus:e=>{var n,t;if(eN(e,o))null==(n=f.current)||n.focus();else{let e=eT(eI(t=l?l.domReference:null).body,-1)||t;null==e||e.focus()}}}),x&&o&&(0,a.jsx)("span",{"aria-owns":o.id,style:nR}),o&&eD.createPortal(n,o),x&&o&&(0,a.jsx)(nD,{"data-type":"outside",ref:d,onFocus:e=>{var n,t;if(eN(e,o))null==(n=h.current)||n.focus();else{let n=eT(eI(t=l?l.domReference:null).body,1)||t;null==n||n.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let nK=()=>s.useContext(n$);function nJ(e){return z(e.target)&&"BUTTON"===e.target.tagName}function nX(e){return z(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}let nU={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nV=e=>{var n,t;return{escapeKey:"boolean"==typeof e?e:null!=(n=null==e?void 0:e.escapeKey)&&n,outsidePress:"boolean"==typeof e?e:null==(t=null==e?void 0:e.outsidePress)||t}};function nH(e,n,t){let r=new Map,i="item"===t,o=e;if(i&&e){let{[nv]:n,[nw]:t,...r}=e;o=r}return{..."floating"===t&&{tabIndex:-1,"data-floating-ui-focusable":""},...o,...n.map(n=>{let r=n?n[t]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,n)=>(n&&Object.entries(n).forEach(n=>{let[t,o]=n;if(!(i&&[nv,nw].includes(t)))if(0===t.indexOf("on")){if(r.has(t)||r.set(t,[]),"function"==typeof o){var l;null==(l=r.get(t))||l.push(o),e[t]=function(){for(var e,n=arguments.length,i=Array(n),o=0;oe(...i)).find(e=>void 0!==e)}}}else e[t]=o}),e),{})}}function nW(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t{let e;return e=new Map,{emit(n,t){var r;null==(r=e.get(n))||r.forEach(e=>e(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;null==(r=e.get(n))||r.delete(t)}}}),a=null!=nP(),[c,u]=s.useState(r.reference),d=eB((e,n,r)=>{o.current.openEvent=e?n:void 0,l.emit("openchange",{open:e,event:n,reason:r,nested:a}),null==t||t(e,n,r)}),f=s.useMemo(()=>({setPositionReference:u}),[]),h=s.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return s.useMemo(()=>({dataRef:o,open:n,onOpenChange:d,elements:h,events:l,floatingId:i,refs:f}),[n,d,h,l,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,i=r.elements,[o,l]=s.useState(null),[a,c]=s.useState(null),u=(null==i?void 0:i.domReference)||o,d=s.useRef(null),f=s.useContext(nA);eA(()=>{u&&(d.current=u)},[u]);let h=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=s.useState(r);ng(h,r)||m(r);let[p,x]=s.useState(null),[g,j]=s.useState(null),b=s.useCallback(e=>{e!==k.current&&(k.current=e,x(e))},[]),y=s.useCallback(e=>{e!==_.current&&(_.current=e,j(e))},[]),v=o||p,w=l||g,k=s.useRef(null),_=s.useRef(null),C=s.useRef(d),I=null!=c,S=ny(c),O=ny(i),A=ny(u),P=s.useCallback(()=>{var e,r;let i,o,l;if(!k.current||!_.current)return;let a={placement:n,strategy:t,middleware:h};O.current&&(a.platform=O.current),(e=k.current,r=_.current,i=new Map,l={...(o={platform:nm,...a}).platform,_c:i},e4(e,r,{...o,platform:l})).then(e=>{let n={...e,isPositioned:!1!==A.current};E.current&&!ng(C.current,n)&&(C.current=n,eD.flushSync(()=>{f(n)}))})},[h,n,t,O,A]);nx(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let E=s.useRef(!1);nx(()=>(E.current=!0,()=>{E.current=!1}),[]),nx(()=>{if(v&&(k.current=v),w&&(_.current=w),v&&w){if(S.current)return S.current(v,w,P);P()}},[v,w,P,S,I]);let B=s.useMemo(()=>({reference:k,floating:_,setReference:b,setFloating:y}),[b,y]),z=s.useMemo(()=>({reference:v,floating:w}),[v,w]),T=s.useMemo(()=>{let e={position:t,left:0,top:0};if(!z.floating)return e;let n=nb(z.floating,d.x),r=nb(z.floating,d.y);return a?{...e,transform:"translate("+n+"px, "+r+"px)",...nj(z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:n,top:r}},[t,a,z.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:P,refs:B,elements:z,floatingStyles:T}),[d,P,B,z,T])}({...e,elements:{...i,...a&&{reference:a}}}),m=s.useCallback(e=>{let n=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(n),h.refs.setReference(n)},[h.refs]),p=s.useCallback(e=>{(B(e)||null===e)&&(d.current=e,l(e)),(B(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!B(e))&&h.refs.setReference(e)},[h.refs]),x=s.useMemo(()=>({...h.refs,setReference:p,setPositionReference:m,domReference:d}),[h.refs,p,m]),g=s.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),j=s.useMemo(()=>({...h,...r,refs:x,elements:g,nodeId:n}),[h,x,g,n,r]);return eA(()=>{r.dataRef.current.floatingContext=j;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=j)}),s.useMemo(()=>({...h,context:j,refs:x,elements:g}),[h,x,g,j])}({middleware:[{...(void 0===(f=u=void 0===N?6:N)&&(f=0),{name:"offset",options:f,async fn(e){var n,t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await e9(e,f);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(t=l.arrow)&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}),options:[u,d]},{...{name:"flip",options:p=h={padding:6},async fn(e){var n,t,r,i,o,l,a,c;let s,u,d,{placement:f,middlewareData:h,rects:m,initialPlacement:x,platform:g,elements:j}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:_=!0,...C}=eF(p,e);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let I=eV(f),S=eY(x),O=eV(x)===x,A=await (null==g.isRTL?void 0:g.isRTL(j.floating)),P=v||(O||!_?[e8(x)]:(s=e8(x),[eQ(x),s,eQ(s)])),E="none"!==k;!v&&E&&P.push(...(u=eH(x),d=function(e,n,t){switch(e){case"top":case"bottom":if(t)return n?e0:eZ;return n?eZ:e0;case"left":case"right":return n?e1:e2;default:return[]}}(eV(x),"start"===k,A),u&&(d=d.map(e=>e+"-"+u),_&&(d=d.concat(d.map(eQ)))),d));let B=[x,...P],z=await e6(e,C),T=[],N=(null==(t=h.flip)?void 0:t.overflows)||[];if(b&&T.push(z[I]),y){let e,n,t,r,i=(l=f,a=m,void 0===(c=A)&&(c=!1),e=eH(l),t=eq(n=eW(eY(l))),r="x"===n?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[t]>a.floating[t]&&(r=e8(r)),[r,e8(r)]);T.push(z[i[0]],z[i[1]])}if(N=[...N,{placement:f,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=h.flip)?void 0:r.index)||0)+1,n=B[e];if(n&&("alignment"!==y||S===eY(n)||N.every(e=>eY(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:n}};let t=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,n)=>e.overflows[1]-n.overflows[1])[0])?void 0:i.placement;if(!t)switch(w){case"bestFit":{let e=null==(o=N.filter(e=>{if(E){let n=eY(e.placement);return n===S||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,n)=>e+n,0)]).sort((e,n)=>e[1]-n[1])[0])?void 0:o[0];e&&(t=e);break}case"initialPlacement":t=x}if(f!==t)return{reset:{placement:t}}}return{}}},options:[h,m]},{...(void 0===(b=x)&&(b={}),{name:"shift",options:b,async fn(e){let{x:n,y:t,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:n,y:t}=e;return{x:n,y:t}}},...a}=eF(b,e),c={x:n,y:t},s=await e6(e,a),u=eY(eV(r)),d=eW(u),f=c[d],h=c[u];if(i){let e="y"===d?"top":"left",n="y"===d?"bottom":"right",t=f+s[e],r=f-s[n];f=eM(t,e$(f,r))}if(o){let e="y"===u?"top":"left",n="y"===u?"bottom":"right",t=h+s[e],r=h-s[n];h=eM(t,e$(h,r))}let m=l.fn({...e,[d]:f,[u]:h});return{...m,data:{x:m.x-n,y:m.y-t,enabled:{[d]:i,[u]:o}}}}}),options:[x,j]},E&&{...{name:"size",options:w=y={apply:function(e){var n=e.rects;e.elements.floating.style.width="".concat(n.reference.width,"px")}},async fn(e){var n,t;let r,i,{placement:o,rects:l,platform:a,elements:c}=e,{apply:s=()=>{},...u}=eF(w,e),d=await e6(e,u),f=eV(o),h=eH(o),m="y"===eY(o),{width:p,height:x}=l.floating;"top"===f||"bottom"===f?(r=f,i=h===(await (null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(i=f,r="end"===h?"top":"bottom");let g=x-d.top-d.bottom,j=p-d.left-d.right,b=e$(x-d[r],g),y=e$(p-d[i],j),v=!e.middlewareData.shift,k=b,_=y;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(_=j),null!=(t=e.middlewareData.shift)&&t.enabled.y&&(k=g),v&&!h){let e=eM(d.left,0),n=eM(d.right,0),t=eM(d.top,0),r=eM(d.bottom,0);m?_=p-2*(0!==e||0!==n?e+n:eM(d.left,d.right)):k=x-2*(0!==t||0!==r?t+r:eM(d.top,d.bottom))}await s({...e,availableWidth:_,availableHeight:k});let C=await a.getDimensions(c.floating);return p!==C.width||x!==C.height?{reset:{rects:!0}}:{}}},options:[y,v]}],onOpenChange:function(e){Z(e),null==W||W(e)},open:Q,placement:J||"bottom",transform:!1,whileElementsMounted:function(e,n,t){return void 0!==K&&K(),function(e,n,t,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=nn(e),d=o||l?[...u?G(u):[],...G(n)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",t,{passive:!0}),l&&e.addEventListener("resize",t)});let f=u&&c?function(e,n){let t,r=null,i=P(e);function o(){var e;clearTimeout(t),null==(e=r)||e.disconnect(),r=null}return!function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),o();let s=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=s;if(a||n(),!f||!h)return;let m={rootMargin:-eK(d)+"px "+-eK(i.clientWidth-(u+f))+"px "+-eK(i.clientHeight-(d+h))+"px "+-eK(u)+"px",threshold:eM(0,e$(1,c))||1},p=!0;function x(n){let r=n[0].intersectionRatio;if(r!==c){if(!p)return l();r?l(!1,r):t=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||np(s,e.getBoundingClientRect())||l(),p=!1}try{r=new IntersectionObserver(x,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(x,m)}r.observe(e)}(!0),o}(u,t):null,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(n)})),t()}),u&&!s&&m.observe(u),m.observe(n));let p=s?no(e):null;return s&&function n(){let r=no(e);p&&!np(p,r)&&t(),p=r,i=requestAnimationFrame(n)}(),t(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",t),l&&e.removeEventListener("resize",t)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(i)}}(e,n,t,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1})}}),en=ee.refs,et=ee.floatingStyles,er=ee.context,ei=function(e,n){void 0===n&&(n={});let{open:t,elements:{floating:r}}=e,{duration:i=250}=n,o=("number"==typeof i?i:i.close)||0,[l,a]=s.useState("unmounted"),c=function(e,n){let[t,r]=s.useState(e);return e&&!t&&r(!0),s.useEffect(()=>{if(!e&&t){let e=setTimeout(()=>r(!1),n);return()=>clearTimeout(e)}},[e,t,n]),t}(t,o);return c||"close"!==l||a("unmounted"),eA(()=>{if(r){if(t){a("initial");let e=requestAnimationFrame(()=>{eD.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[t,r]),{isMounted:c,status:l}}(er,{duration:I||200}),eo=ei.isMounted,el=ei.status,ea=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:p}=n,x=s.useContext(nA),g=eB("function"==typeof c?c:()=>!1),j="function"==typeof c?g:c,b=s.useRef(!1),{escapeKey:y,outsidePress:v}=nV(m),{escapeKey:w,outsidePress:k}=nV(p),_=s.useRef(!1),C=eB(e=>{var n;if(!t||!l||!a||"Escape"!==e.key||_.current)return;let i=null==(n=o.current.floatingContext)?void 0:n.nodeId,c=x?eS(x.nodesRef.current,i):[];if(!y&&(e.stopPropagation(),c.length>0)){let e=!0;if(c.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),I=eB(e=>{var n;let t=()=>{var n;C(e),null==(n=e_(e))||n.removeEventListener("keydown",t)};null==(n=e_(e))||n.addEventListener("keydown",t)}),S=eB(e=>{var n;let t=o.current.insideReactTree;o.current.insideReactTree=!1;let l=b.current;if(b.current=!1,"click"===u&&l||t||"function"==typeof j&&!j(e))return;let a=e_(e),c="["+nE("inert")+"]",s=eI(i.floating).querySelectorAll(c),d=B(a)?a:null;for(;d&&!V(d);){let e=q(d);if(V(e)||!B(e))break;d=e}if(s.length&&B(a)&&!a.matches("html,body")&&!ek(a,i.floating)&&Array.from(s).every(e=>!ek(d,e)))return;if(z(a)&&P){let n=V(a),t=H(a),r=/auto|scroll/,i=n||r.test(t.overflowX),o=n||r.test(t.overflowY),l=i&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,c=o&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,s="rtl"===t.direction,u=c&&(s?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),d=l&&e.offsetY>a.clientHeight;if(u||d)return}let f=null==(n=o.current.floatingContext)?void 0:n.nodeId,h=x&&eS(x.nodesRef.current,f).some(n=>{var t;return eC(e,null==(t=n.context)?void 0:t.elements.floating)});if(eC(e,i.floating)||eC(e,i.domReference)||h)return;let m=x?eS(x.nodesRef.current,f):[];if(m.length>0){let e=!0;if(m.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),O=eB(e=>{var n;let t=()=>{var n;S(e),null==(n=e_(e))||n.removeEventListener(u,t)};null==(n=e_(e))||n.addEventListener(u,t)});s.useEffect(()=>{if(!t||!l)return;o.current.__escapeKeyBubbles=y,o.current.__outsidePressBubbles=v;let e=-1;function n(e){r(!1,e,"ancestor-scroll")}function c(){window.clearTimeout(e),_.current=!0}function s(){e=window.setTimeout(()=>{_.current=!1},5*!!U())}let d=eI(i.floating);a&&(d.addEventListener("keydown",w?I:C,w),d.addEventListener("compositionstart",c),d.addEventListener("compositionend",s)),j&&d.addEventListener(u,k?O:S,k);let f=[];return h&&(B(i.domReference)&&(f=G(i.domReference)),B(i.floating)&&(f=f.concat(G(i.floating))),!B(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat(G(i.reference.contextElement)))),(f=f.filter(e=>{var n;return e!==(null==(n=d.defaultView)?void 0:n.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{a&&(d.removeEventListener("keydown",w?I:C,w),d.removeEventListener("compositionstart",c),d.removeEventListener("compositionend",s)),j&&d.removeEventListener(u,k?O:S,k),f.forEach(e=>{e.removeEventListener("scroll",n)}),window.clearTimeout(e)}},[o,i,a,j,u,t,r,h,l,y,v,C,w,I,S,k,O]),s.useEffect(()=>{o.current.insideReactTree=!1},[o,j,u]);let A=s.useMemo(()=>({onKeyDown:C,...d&&{[nU[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[C,r,d,f]),P=s.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[nF[u]]:()=>{o.current.insideReactTree=!0}}),[C,u,o]);return s.useMemo(()=>l?{reference:A,floating:P}:{},[l,A,P])}(er,{ancestorScroll:!0,outsidePress:function(e){var n,t;return!C||(n=e.target,(null!=(t=Element)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t)&&!e.target.closest(C))}}),ec=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:a="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=n,h=s.useRef(),m=s.useRef(!1),p=s.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let n=h.current;0!==e.button||"click"===a||eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"mousedown"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click")))},onClick(e){let n=h.current;if("mousedown"===a&&h.current){h.current=void 0;return}eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"click"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){h.current=void 0,!(e.defaultPrevented||!d||nJ(e))&&(" "!==e.key||nX(o)||(e.preventDefault(),m.current=!0),z(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||nJ(e)||nX(o))&&" "===e.key&&m.current&&(m.current=!1,t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[i,o,a,u,d,r,t,f,c]);return s.useMemo(()=>l?{reference:p}:{},[l,p])}(er,{enabled:!D}),es=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:h=!0}=n,m=s.useContext(nA),p=nP(),x=eP(u),g=eP(c),j=eP(t),b=eP(f),y=s.useRef(),v=s.useRef(-1),w=s.useRef(),k=s.useRef(-1),_=s.useRef(!0),C=s.useRef(!1),I=s.useRef(()=>{}),S=s.useRef(!1),O=eB(()=>{var e;let n=null==(e=i.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n});s.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{open:n}=e;n||(nB(v),nB(k),_.current=!0,S.current=!1)}},[a,o]),s.useEffect(()=>{if(!a||!x.current||!t)return;function e(e){O()&&r(!1,e,"hover")}let n=eI(l.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}},[l.floating,t,r,a,x,O]);let A=s.useCallback(function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");let i=nT(g.current,"close",y.current);i&&!w.current?(nB(v),v.current=window.setTimeout(()=>r(!1,e,t),i)):n&&(nB(v),r(!1,e,t))},[g,r]),P=eB(()=>{I.current(),w.current=void 0}),E=eB(()=>{if(C.current){let e=eI(l.floating).body;e.style.pointerEvents="",e.removeAttribute(nz),C.current=!1}}),z=eB(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));s.useEffect(()=>{if(a&&B(l.domReference)){let r=l.domReference,i=l.floating;return t&&r.addEventListener("mouseleave",o),h&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",n),i&&(i.addEventListener("mouseleave",o),i.addEventListener("mouseenter",c),i.addEventListener("mouseleave",s)),()=>{t&&r.removeEventListener("mouseleave",o),h&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",n),i&&(i.removeEventListener("mouseleave",o),i.removeEventListener("mouseenter",c),i.removeEventListener("mouseleave",s))}}function e(e){if(nB(v),_.current=!1,d&&!eO(y.current)||nN(b.current)>0&&!nT(g.current,"open"))return;let n=nT(g.current,"open",y.current);n?v.current=window.setTimeout(()=>{j.current||r(!0,e,"hover")},n):t||r(!0,e,"hover")}function n(e){if(z())return void E();I.current();let n=eI(l.floating);if(nB(k),S.current=!1,x.current&&i.current.floatingContext){t||nB(v),w.current=x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e,!0,"safe-polygon")}});let r=w.current;n.addEventListener("mousemove",r),I.current=()=>{n.removeEventListener("mousemove",r)};return}"touch"===y.current&&ek(l.floating,e.relatedTarget)||A(e)}function o(e){z()||i.current.floatingContext&&(null==x.current||x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){E(),P(),z()||A(e)}})(e))}function c(){nB(v)}function s(e){z()||A(e,!1)}},[l,a,e,d,h,A,P,E,r,t,j,m,g,x,i,z,b]),eA(()=>{var e,n;if(a&&t&&null!=(e=x.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&O()){C.current=!0;let e=l.floating;if(B(l.domReference)&&e){let t=eI(l.floating).body;t.setAttribute(nz,"");let r=l.domReference,i=null==m||null==(n=m.nodesRef.current.find(e=>e.id===p))||null==(n=n.context)?void 0:n.elements.floating;return i&&(i.style.pointerEvents=""),t.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{t.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,t,p,l,m,x,O]),eA(()=>{t||(y.current=void 0,S.current=!1,P(),E())},[t,P,E]),s.useEffect(()=>()=>{P(),nB(v),nB(k),E()},[a,l.domReference,P,E]);let T=s.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:n}=e;function i(){_.current||j.current||r(!0,n,"hover")}d&&!eO(y.current)||t||0===nN(b.current)||S.current&&e.movementX**2+e.movementY**2<2||(nB(k),"touch"===y.current?i():(S.current=!0,k.current=window.setTimeout(i,nN(b.current))))}}},[d,r,t,j,b]);return s.useMemo(()=>a?{reference:T}:{},[a,T])}(er,{enabled:!D,restMs:$||200}),eu=void 0!==L,ed=(n=(k=eu?[]:[ea,M?es:ec]).map(e=>null==e?void 0:e.reference),t=k.map(e=>null==e?void 0:e.floating),r=k.map(e=>null==e?void 0:e.item),i=s.useCallback(e=>nH(e,k,"reference"),n),o=s.useCallback(e=>nH(e,k,"floating"),t),l=s.useCallback(e=>nH(e,k,"item"),r),s.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])),ef=ed.getReferenceProps,eh=ed.getFloatingProps,em=ef(nq({ref:en.setReference},F&&{onClick:function(e){return e.stopPropagation()}})),ep=eh({onClick:function(){O&&er.onOpenChange(!1)},ref:en.setFloating});(0,s.useEffect)(function(){eu&&er.onOpenChange(L)},[L]),_=(0,s.isValidElement)(S)?(0,s.cloneElement)(S,em):(0,a.jsx)("div",nG(nq({},em),{children:S}));var ex=(0,a.jsx)("div",nG(nq({className:(0,g.Ly)(["Floating",!I&&"Floating--animated",T]),"data-position":er.placement,"data-transition":el,style:nq({},et,R)},ep),{children:A}));return(0,a.jsxs)(a.Fragment,{children:[_,eo&&!!A&&(X?ex:(0,a.jsx)(nL,{id:"tgui-root",children:ex}))]})}function nQ(e){var n=e.content,t=e.children,r=e.position;return(0,a.jsx)(nY,{content:n,contentClasses:"Tooltip",hoverOpen:!0,placement:r,children:t})}function nZ(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function n5(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return nZ(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nZ(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n4(e,n){var t,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var s=[a,c];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.length)&&(n=e.length);for(var t=0,r=Array(n);t2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=Array(i),l=0;l=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["params","phonehome"]),i=(0,s.useRef)(null),o=(0,s.useRef)(function(e){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],t=tr.length;tr.push(null);var r=e||"byondui_".concat(t);return{render:function(e){n&&Byond.sendMessage("renderByondUi",{renderByondUi:r}),tr[t]=r,Byond.winset(r,e)},unmount:function(){n&&Byond.sendMessage("unmountByondUi",{renderByondUi:r}),tr[t]=null,Byond.winset(r,{parent:""})}}}(null==n?void 0:n.id,t));function l(){var e=i.current;if(e){var t,r,l,a=(r=null!=(t=window.devicePixelRatio)?t:1,{pos:[(l=e.getBoundingClientRect()).left*r,l.top*r],size:[(l.right-l.left)*r,(l.bottom-l.top)*r]});o.current.render(tt(tn({parent:Byond.windowId},n),{pos:"".concat(a.pos[0],",").concat(a.pos[1]),size:"".concat(a.size[0],"x").concat(a.size[1])}))}}var c=te(function(){l()},100);return(0,s.useEffect)(function(){return window.addEventListener("resize",c),l(),function(){window.removeEventListener("resize",c),o.current.unmount()}},[]),(0,a.jsx)("div",tt(tn({ref:i},(0,j.Fl)(r)),{children:(0,a.jsx)("div",{style:{minHeight:"22px"}})}))}window.addEventListener("beforeunload",function(){for(var e=0;ee.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),h=(0,s.useRef)(null),m=ta((0,s.useState)([600,200]),2),p=m[0],x=m[1],g=function(e,n,t,r){if(0===e.length)return[];var i,o,l=to.y.apply(void 0,tc(e)),a=l.map(function(e){return(i=Math).min.apply(i,tc(e))}),c=l.map(function(e){return(o=Math).max.apply(o,tc(e))});return void 0!==t&&(a[0]=t[0],c[0]=t[1]),void 0!==r&&(a[1]=r[0],c[1]=r[1]),e.map(function(e){return(0,to.y)(e,a,c,n).map(function(e){var n=ta(e,4),t=n[0],r=n[1];return(t-r)/(n[2]-r)*n[3]})})}(void 0===r?[]:r,p,i,o);if(g.length>0){var j=g[0],b=g[g.length-1];g.push([p[0]+d,b[1]]),g.push([p[0]+d,-d]),g.push([-d,-d]),g.push([-d,j[1]])}var v=function(e){for(var n="",t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","child_mt","childStyles","color","title","buttons","icon"]),m=(n=(0,s.useState)(e.open),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tf(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tf(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],x=m[1];return(0,a.jsxs)(y,{mb:1,children:[(0,a.jsxs)("div",{className:"Table",children:[(0,a.jsx)("div",{className:"Table__cell",children:(0,a.jsx)(n6,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["content","children","className"]);return o.color=r?null:"default",o.backgroundColor=e.color||"default",(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children"]);return(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["fixBlur","fixErrors","objectFit","src"]),d=(0,s.useRef)(0),f=(0,s.useRef)(null),h=(0,j.Fl)(u);return n=tg({},h.style),t=t={imageRendering:void 0===r||r?"pixelated":"auto",objectFit:void 0===o?"fill":o},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),h.style=n,(0,s.useEffect)(function(){return function(){f.current&&clearTimeout(f.current)}},[]),(0,a.jsx)("img",tg({alt:"dm icon",onError:function(e){if(!i||d.current>=5){f.current&&clearTimeout(f.current);return}var n=e.currentTarget;f.current=setTimeout(function(){n.src="".concat(c,"?attempt=").concat(d.current),d.current++},1e3)},src:c},h))}function tb(e){var n,t=e.direction,r=e.fallback,i=e.frame,o=e.icon_state,l=e.icon,c=e.movement,s=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["direction","fallback","frame","icon_state","icon","movement"]),u=null==(n=Byond.iconRefMap)?void 0:n[l];return u?(0,a.jsx)(tj,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);tk.length-3?k.length-1:e-2;var t=z.current,r=null==t?void 0:t.children[n];t&&r&&(t.scrollTop=r.offsetTop)}function R(e){if(!(k.length<1)&&!c){var n,t=k.length-1;n=T<0?"next"===e?t:0:"next"===e?T===t?0:T+1:0===T?t:T-1,E&&r&&N(n),null==y||y(tC(k[n]))}}var D=_?"top":"bottom";return m&&(D="".concat(D,"-start")),(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown",O&&"Dropdown--fluid"]),children:[(0,a.jsx)(nY,{allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:(0,a.jsx)("div",{className:"Dropdown__menu",ref:z,children:0===k.length?(0,a.jsx)("div",{className:"Dropdown__menu--entry",children:"No options"}):k.map(function(e){var n=tC(e);return(0,a.jsx)("div",{className:(0,g.Ly)(["Dropdown__menu--entry",S===n&&"selected"]),onClick:function(){null==y||y(n)},onKeyDown:function(e){e.key===w._.Enter&&(null==y||y(n))},children:"string"==typeof e?e:e.displayText},n)})}),contentAutoWidth:!p,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:p?(0,j.zA)(p):void 0},disabled:c,onMounted:function(){E&&r&&-1!==T&&N(T)},onOpenChange:B,placement:D,children:(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown__control","Button--color--".concat(void 0===l?"default":l),c&&"Button--disabled",m&&"Dropdown__control--icon-only",o]),onClick:function(e){(!c||E)&&(null==b||b(e))},onKeyDown:function(e){e.key!==w._.Enter||c||null==b||b(e)},style:{width:(0,j.zA)(void 0===A?15:A)},children:[d&&(0,a.jsx)(I,{className:"Dropdown__icon",name:d,rotation:f,spin:h}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"Dropdown__selected-text",children:u||S&&tC(S)||(void 0===C?"Select...":C)}),!x&&(0,a.jsx)(I,{className:(0,g.Ly)(["Dropdown__icon","Dropdown__icon--arrow",_&&"over",E&&"open"]),name:"chevron-down"})]})]})}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-left",onClick:function(){R("previous")}}),(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-right",onClick:function(){R("next")}})]})]})}function tS(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tP(e){return(0,g.Ly)(["Flex",e.inlineFlex&&"Flex--inline",(0,j.WP)(e)])}function tE(e){var n=e.direction,t=e.wrap,r=e.align,i=e.justify,o=tA(e,["direction","wrap","align","justify"]);return(0,j.Fl)(tS({style:tO(tS({},o.style),{alignItems:r,flexDirection:n,flexWrap:!0===t?"wrap":t,justifyContent:i})},o))}function tB(e){var n=e.className,t=tA(e,["className"]);return(0,a.jsx)("div",tS({className:(0,g.Ly)([n,tP(t)])},tE(t)))}function tz(e){var n,t=e.style,r=e.grow,i=e.order,o=e.shrink,l=e.basis,a=e.align,c=tA(e,["style","grow","order","shrink","basis","align"]),s=null!=(n=null!=l?l:e.width)?n:void 0!==r?0:void 0;return(0,j.Fl)(tS({style:tO(tS({},t),{alignSelf:a,flexBasis:(0,j.zA)(s),flexGrow:void 0!==r&&Number(r),flexShrink:void 0!==o&&Number(o),order:i})},c))}function tT(e){var n,t,r=e.asset,i=e.assetSize,o=e.base64,l=e.buttons,c=e.buttonsAlt,s=e.children,u=e.className,d=e.color,f=e.disabled,h=e.dmFallback,m=e.dmIcon,p=e.dmIconState,x=e.fluid,b=e.fallbackIcon,y=e.imageSize,v=void 0===y?64:y,w=e.imageSrc,k=e.onClick,_=e.onRightClick,C=e.selected,I=e.title,S=e.tooltip,O=e.tooltipPosition,A=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["asset","assetSize","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmIcon","dmIconState","fluid","fallbackIcon","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"]),P=(0,a.jsxs)("div",{className:"ImageButton__container",onClick:function(e){!f&&k&&k(e)},onContextMenu:function(e){e.preventDefault(),!f&&_&&_(e)},onKeyDown:function(e){"Enter"===e.key&&!f&&k&&k(e)},style:{width:x?"auto":"calc(".concat(v,"px + 0.5em + 2px)")},tabIndex:f?void 0:0,children:[(0,a.jsx)("div",{className:"ImageButton__image",children:o||w?(0,a.jsx)(tj,{height:"".concat(v,"px"),src:o?"data:image/png;base64,".concat(o):w,width:"".concat(v,"px")}):m&&p?(0,a.jsx)(tb,{fallback:h||(0,a.jsx)(tN,{icon:"spinner",size:v,spin:!0}),height:"".concat(v,"px"),icon:m,icon_state:p,width:"".concat(v,"px")}):r?(0,a.jsx)(tj,{className:(0,g.Ly)(r||[]),height:"".concat(v,"px"),style:{transform:"scale(".concat(v/(void 0===i?32:i),")"),transformOrigin:"top left"},width:"".concat(v,"px")}):(0,a.jsx)(tN,{icon:b||"question",size:v})}),x&&(I||s)?(0,a.jsxs)("div",{className:"ImageButton__content",children:[I&&(0,a.jsx)("span",{className:(0,g.Ly)(["ImageButton__content--title",!!s&&"ImageButton__content--divider"]),children:I}),s&&(0,a.jsx)("span",{className:"ImageButton__content--text",children:s})]}):s&&(0,a.jsx)("span",{className:"ImageButton__content",children:s})]});return S&&(P=(0,a.jsx)(nQ,{content:S,position:O,children:P})),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","value","minValue","maxValue","color","ranges","empty","children","fractionDigits"]),h=(0,c.hs)(t,void 0===r?0:r,void 0===i?1:i),m=void 0!==u,p=o||(0,c.TG)(t,void 0===l?{}:l)||"default",x=(0,j.Fl)(f),b=["ProgressBar",n,(0,j.WP)(f)],y={width:"".concat(100*(0,c.J$)(h),"%")};return tR.NE.includes(p)||"default"===p?b.push("ProgressBar--color--".concat(p)):(x.style=t$(tD({},x.style),{borderColor:p}),y.backgroundColor=p),(0,a.jsxs)("div",t$(tD({className:(0,g.Ly)(b)},x),{children:[(0,a.jsx)("div",{className:"ProgressBar__fill ProgressBar__fill--animated",style:y}),(0,a.jsx)("div",{className:"ProgressBar__content",children:m?u:!s&&"".concat((100*h).toFixed(void 0===d?0:d),"%")})]}))}function tL(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tJ(e){var n=e.className,t=e.vertical,r=e.fill,i=e.reverse,o=e.zebra,l=tK(e,["className","vertical","fill","reverse","zebra"]);return(0,a.jsx)("div",tL({className:(0,g.Ly)(["Stack",r&&"Stack--fill",t?"Stack--vertical":"Stack--horizontal",o&&"Stack--zebra",i&&"Stack--reverse".concat(t?"--vertical":""),n,tP(e)])},tE(tL({direction:"".concat(t?"column":"row").concat(i?"-reverse":"")},l))))}function tX(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","value"]),O=(0,s.useRef)(null),A=null!=k?k:O,P=(n=(0,s.useState)(null!=I?I:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tX(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),E=P[0],B=P[1];(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=A.current)||e.focus(),o&&(null==(n=A.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){A.current&&document.activeElement!==A.current&&I!==E&&B(null!=I?I:"")},[I]);var z=(0,j.Fl)(S),T=(0,g.Ly)(["Input",c&&"Input--disabled",d&&"Input--fluid",h&&"Input--monospace",(0,j.WP)(S),l]);return(0,a.jsx)("input",(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unclamped","unit","value","bipolar","popupPosition","className","color","fillValue","ranges","size","style"]);return(0,a.jsx)(tk,{dragMatrix:[0,-1],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unclamped:d,unit:f,value:h,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.handleDragStart,d=e.inputElement,f=(0,c.hs)(null!=y?y:l,o,i),v=(0,c.hs)(l,o,i),k=b||(0,c.TG)(null!=y?y:h,w)||"default",S=Math.min((v-.5)*270,225);return(0,a.jsx)(nY,{content:r,contentClasses:"Knob__popupValue",handleOpen:s,placement:p||"top",preventPortal:!0,children:(0,a.jsxs)("div",(n=tV({className:(0,g.Ly)(["Knob","Knob--color--".concat(k),m&&"Knob--bipolar",x,(0,j.WP)(I)])},(0,j.Fl)(tV({style:tV({fontSize:"".concat(_,"em")},C)},I))),t=t={onMouseDown:u,children:[(0,a.jsx)("div",{className:"Knob__circle",children:(0,a.jsx)("div",{className:"Knob__cursorBox",style:{transform:"rotate(".concat(S,"deg)")},children:(0,a.jsx)("div",{className:"Knob__cursor"})})}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringTrackPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("circle",{className:"Knob__ringTrack",cx:"50",cy:"50",r:"50"}),(0,a.jsx)("title",{children:"track"})]}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringFillPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("title",{children:"fill"}),(0,a.jsx)("circle",{className:"Knob__ringFill",cx:"50",cy:"50",r:"50",style:{strokeDashoffset:Math.max(((m?2.75:2)-1.5*f)*Math.PI*50,0)}})]}),d]},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))})}})}function tW(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tY(e){var n=e.children,t=e.wrap,r=tG(e,["children","wrap"]);return(0,a.jsx)(tB,tq(tW({align:"stretch",justify:"space-between",mx:-.5,wrap:t},r),{children:n}))}function tQ(e){var n=e.children;return(0,a.jsx)("table",{className:"LabeledList",children:(0,a.jsx)("tbody",{children:n})})}function tZ(e){var n,t,r=e.children,i=e.className,o=e.disabled,l=e.display,c=e.onClick,u=e.onMouseOver,d=(e.open,e.openWidth),f=(e.onOutsideClick,function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","className","disabled","display","onClick","onMouseOver","open","openWidth","onOutsideClick"])),h=(0,s.useRef)(null);return(0,a.jsx)(nY,{allowedOutsideClasses:".Menubar_inner",content:(0,a.jsx)("div",{className:"MenuBar__menu",style:{width:d},children:r}),children:(0,a.jsx)("div",{className:"Menubar_inner",ref:h,children:(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children","onEnter","onEscape"]);return(0,a.jsx)(tp,{className:"Modal__dimmer",onKeyDown:function(e){e.key===w._.Enter&&(null==o||o(e)),(0,w.KL)(e.key)&&(null==l||l(e))},children:(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","color","info","success","danger"]);return(0,a.jsx)(y,function(e){for(var n=1;n=o?(t.currentValue=(0,c.qE)((0,c.LI)(u/o,0)*o,r,i),t.origin=n.screenY):Math.abs(a)>s&&(t.origin=n.screenY)}else Math.abs(a)>4&&(t.dragging=!0);return t})}),t8(e,"handleDragEnd",function(n){var t=e.state,r=t.dragging,i=t.currentValue,o=e.props,l=o.onChange;if(!o.disabled){if(document.body.style["pointer-events"]="auto",clearInterval(e.dragInterval),clearTimeout(e.dragTimeout),e.setState({dragging:!1,editing:!r,previousValue:i}),r)null==l||l(i);else if(e.inputRef){var a=e.inputRef.current;a&&(a.value="".concat(i),setTimeout(function(){a.focus(),a.select()},10))}document.removeEventListener("mousemove",e.handleDragMove),document.removeEventListener("mouseup",e.handleDragEnd)}}),t8(e,"handleBlur",function(n){var t=e.state,r=t.editing,i=t.previousValue,o=e.props,l=o.minValue,a=o.maxValue,s=o.onChange;if(!o.disabled&&r){var u=(0,c.qE)(Number.parseFloat(n.target.value),l,a);if(Number.isNaN(u))return void e.setState({editing:!1});e.setState({currentValue:u,editing:!1,previousValue:u}),i!==u&&(null==s||s(u))}}),t8(e,"handleKeyDown",function(n){var t=e.props,r=t.minValue,i=t.maxValue,o=t.onChange;if(!t.disabled){var l=e.state.previousValue;if(n.key===w._.Enter){var a=(0,c.qE)(Number.parseFloat(n.currentTarget.value),r,i);if(Number.isNaN(a))return void e.setState({editing:!1});e.setState({currentValue:a,editing:!1,previousValue:a}),l!==a&&(null==o||o(a))}else(0,w.KL)(n.key)&&e.setState({editing:!1})}}),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&t5(t,e),n=[{key:"componentDidMount",value:function(){var e=Number.parseFloat(this.props.value.toString());this.setState({currentValue:e,previousValue:e})}},{key:"render",value:function(){var e=this.state,n=e.dragging,t=e.editing,r=e.currentValue,i=this.props,o=i.className,l=i.fluid,s=i.animated,u=i.unit,d=i.value,f=i.minValue,m=i.maxValue,p=i.height,x=i.width,j=i.lineHeight,b=i.fontSize,v=i.format,w=Number.parseFloat(d.toString());n&&(w=r);var k=(0,a.jsxs)("div",{className:"NumberInput__content",children:[s&&!n?(0,a.jsx)(h,{format:v,value:w}):v?v(w):w,u?" ".concat(u):""]});return(0,a.jsxs)(y,{className:(0,g.Ly)(["NumberInput",l&&"NumberInput--fluid",o]),fontSize:b,lineHeight:j,minHeight:p,minWidth:x,onMouseDown:this.handleDragStart,children:[(0,a.jsx)("div",{className:"NumberInput__barContainer",children:(0,a.jsx)("div",{className:"NumberInput__bar",style:{height:"".concat((0,c.qE)((w-f)/(m-f)*100,0,100),"%")}})}),k,(0,a.jsx)("input",{className:"NumberInput__input",onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,ref:this.inputRef,style:{display:t?"inline":"none",fontSize:b,height:p,lineHeight:j}})]})}}],function(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["allowFloats","autoFocus","autoSelect","className","disabled","expensive","fluid","maxValue","minValue","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","onValidationChange","value"]),S=(0,s.useRef)(null),O=t9((0,s.useState)(null!=C?C:m),2),A=O[0],P=O[1],E=t9((0,s.useState)(!0),2),B=E[0],z=E[1];function T(e){b&&(u?re(function(){return b(e)}):b(e))}(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=S.current)||e.focus(),o&&(null==(n=S.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){if(S.current){var e=S.current.validity.valid;B!==e&&(z(e),null==_||_(e))}},[A]),(0,s.useEffect)(function(){S.current&&document.activeElement!==S.current&&C!==A&&P(null!=C?C:m)},[C]);var N=(0,j.Fl)(I),R=(0,g.Ly)(["Input","RestrictedInput",c&&"Input--disabled",d&&"Input--fluid",p&&"Input--monospace",(0,j.WP)(I),l,!B&&"RestrictedInput--invalid"]);return(0,a.jsx)("input",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["buttons","children","className","container_id","fill","fitted","flexGrow","noTopPadding","onScroll","ref","scrollable","scrollableHorizontal","stretchContents","title"]),w=(0,g.b5)(y)||(0,g.b5)(r),k=(0,s.useRef)(null),_=null!=m?m:k;return(0,s.useEffect)(function(){return _.current&&(p||x)&&(0,rt.tk)(_.current),function(){_.current&&(0,rt.WK)(_.current)}},[]),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unit","value","className","fillValue","color","ranges","children"]),w=void 0!==y;return(0,a.jsx)(tk,{dragMatrix:[1,0],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unit:d,value:f,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.editing,d=e.handleDragStart,x=e.inputElement,k=(0,c.J$)((0,c.hs)(null!=m?m:l,o,i)),_=(0,c.J$)((0,c.hs)(l,o,i)),C=p||(0,c.TG)(null!=m?m:f,b)||"default";return(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function ra(e){var n,t,r=e.className,i=e.collapsing,o=e.children,l=rl(e,["className","collapsing","children"]);return(0,a.jsx)("table",(n=ro({className:(0,g.Ly)(["Table",i&&"Table--collapsing",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:(0,a.jsx)("tbody",{children:o})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}function rc(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function rf(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return rc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rc(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e){var n=e.className,t=e.vertical,r=e.scrollable,i=e.fill,o=e.fluid,l=e.children,c=rd(e,["className","vertical","scrollable","fill","fluid","children"]),u=(0,s.useRef)(!0),d=(0,s.useRef)(null),f=(0,s.useRef)(null),h=rf((0,s.useState)(!1),2),m=h[0],p=h[1],x=rf((0,s.useState)(!1),2),b=x[0],y=x[1];function v(e){if(d.current){var n=d.current,t=.5*n.clientWidth;n.scrollBy({left:"left"===e?-t:t,behavior:"smooth"})}}(0,s.useEffect)(function(){var e=function(){p(i.scrollLeft>0),y(i.scrollLeft+i.clientWidthMath.abs(e.deltaX)&&(i.scrollLeft+=e.deltaY)};if(r&&!t&&d.current){var i=d.current;if(!(i.scrollWidthe.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","dontUseTabForIndent","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","userMarkup","value"]),P=(0,s.useRef)(null),E=null!=_?_:P,B=(n=(0,s.useState)(null!=O?O:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return rp(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rp(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=B[0],T=B[1];(0,s.useEffect)(function(){(i||o)&&setTimeout(function(){var e,n;null==(e=E.current)||e.focus(),o&&(null==(n=E.current)||n.select())},1)},[]),(0,s.useEffect)(function(){E.current&&document.activeElement!==E.current&&O!==z&&T(null!=O?O:"")},[O]);var N=(0,j.Fl)(A),R=(0,g.Ly)(["Input","TextArea",f&&"Input--fluid",m&&"Input--monospace",c&&"Input--disabled",(0,j.WP)(A),l]);return(0,a.jsx)("textarea",(t=function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/g,U=RegExp(J.source),F=RegExp(X.source),V=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,Z=RegExp(Q.source),ee=/^\s+/,en=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,er=/\{\n\/\* \[wrapped with (.+)\] \*/,ei=/,? & /,eo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,el=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,ec=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ed=/^0b[01]+$/i,ef=/^\[object .+?Constructor\]$/,eh=/^0o[0-7]+$/i,em=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ex=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ej="\ud800-\udfff",eb="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",ev="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",ek="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",eI="["+e_+"]",eS="["+eb+"]",eO="["+ev+"]",eA="[^"+ej+e_+"\\d+"+ey+ev+ew+"]",eP="\ud83c[\udffb-\udfff]",eE="[^"+ej+"]",eB="(?:\ud83c[\udde6-\uddff]){2}",ez="[\ud800-\udbff][\udc00-\udfff]",eT="["+ew+"]",eN="\\u200d",eR="(?:"+eO+"|"+eA+")",eD="(?:"+eT+"|"+eA+")",e$="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eM="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eL="(?:"+eS+"|"+eP+")?",eK="["+ek+"]?",eJ="(?:"+eN+"(?:"+[eE,eB,ez].join("|")+")"+eK+eL+")*",eX=eK+eL+eJ,eU="(?:"+["["+ey+"]",eB,ez].join("|")+")"+eX,eF="(?:"+[eE+eS+"?",eS,eB,ez,"["+ej+"]"].join("|")+")",eV=RegExp(eC,"g"),eH=RegExp(eS,"g"),eW=RegExp(eP+"(?="+eP+")|"+eF+eX,"g"),eq=RegExp([eT+"?"+eO+"+"+e$+"(?="+[eI,eT,"$"].join("|")+")",eD+"+"+eM+"(?="+[eI,eT+eR,"$"].join("|")+")",eT+"?"+eR+"+"+e$,eT+"+"+eM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eU].join("|"),"g"),eG=RegExp("["+eN+ej+eb+ek+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eQ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eZ=-1,e0={};e0[P]=e0[E]=e0[B]=e0[z]=e0[T]=e0[N]=e0[R]=e0[D]=e0[$]=!0,e0[f]=e0[h]=e0[O]=e0[m]=e0[A]=e0[p]=e0[x]=e0[g]=e0[b]=e0[y]=e0[v]=e0[k]=e0[_]=e0[C]=e0[S]=!1;var e1={};e1[f]=e1[h]=e1[O]=e1[A]=e1[m]=e1[p]=e1[P]=e1[E]=e1[B]=e1[z]=e1[T]=e1[b]=e1[y]=e1[v]=e1[k]=e1[_]=e1[C]=e1[I]=e1[N]=e1[R]=e1[D]=e1[$]=!0,e1[x]=e1[g]=e1[S]=!1;var e2={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e8=parseFloat,e3=parseInt,e5=(void 0===t.g?"undefined":i(t.g))=="object"&&t.g&&t.g.Object===Object&&t.g,e4=("undefined"==typeof self?"undefined":i(self))=="object"&&self&&self.Object===Object&&self,e6=e5||e4||Function("return this")(),e7="object"==i(n)&&n&&!n.nodeType&&n,e9=e7&&"object"==i(e)&&e&&!e.nodeType&&e,ne=e9&&e9.exports===e7,nn=ne&&e5.process,nt=function(){try{var e=e9&&e9.require&&e9.require("util").types;if(e)return e;return nn&&nn.binding&&nn.binding("util")}catch(e){}}(),nr=nt&&nt.isArrayBuffer,ni=nt&&nt.isDate,no=nt&&nt.isMap,nl=nt&&nt.isRegExp,na=nt&&nt.isSet,nc=nt&&nt.isTypedArray;function ns(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}function nu(e,n,t,r){for(var i=-1,o=null==e?0:e.length;++i-1}function np(e,n,t){for(var r=-1,i=null==e?0:e.length;++r-1;);return t}function n$(e,n){for(var t=e.length;t--&&n_(n,e[t],0)>-1;);return t}var nM=nA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nL=nA({"&":"&","<":"<",">":">",'"':""","'":"'"});function nK(e){return"\\"+e2[e]}function nJ(e){return eG.test(e)}function nX(e){var n=-1,t=Array(e.size);return e.forEach(function(e,r){t[++n]=[r,e]}),t}function nU(e,n){return function(t){return e(n(t))}}function nF(e,n){for(var t=-1,r=e.length,i=0,o=[];++t",""":'"',"'":"'"}),nY=function e(n){var t,en,ej,eb,ey=(n=null==n?e6:nY.defaults(e6.Object(),n,nY.pick(e6,eQ))).Array,ev=n.Date,ew=n.Error,ek=n.Function,e_=n.Math,eC=n.Object,eI=n.RegExp,eS=n.String,eO=n.TypeError,eA=ey.prototype,eP=ek.prototype,eE=eC.prototype,eB=n["__core-js_shared__"],ez=eP.toString,eT=eE.hasOwnProperty,eN=0,eR=(t=/[^.]+$/.exec(eB&&eB.keys&&eB.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",eD=eE.toString,e$=ez.call(eC),eM=e6._,eL=eI("^"+ez.call(eT).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eK=ne?n.Buffer:o,eJ=n.Symbol,eX=n.Uint8Array,eU=eK?eK.allocUnsafe:o,eF=nU(eC.getPrototypeOf,eC),eW=eC.create,eG=eE.propertyIsEnumerable,e2=eA.splice,e5=eJ?eJ.isConcatSpreadable:o,e4=eJ?eJ.iterator:o,e7=eJ?eJ.toStringTag:o,e9=function(){try{var e=ix(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),nn=n.clearTimeout!==e6.clearTimeout&&n.clearTimeout,nt=ev&&ev.now!==e6.Date.now&&ev.now,nv=n.setTimeout!==e6.setTimeout&&n.setTimeout,nA=e_.ceil,nQ=e_.floor,nZ=eC.getOwnPropertySymbols,n0=eK?eK.isBuffer:o,n1=n.isFinite,n2=eA.join,n8=nU(eC.keys,eC),n3=e_.max,n5=e_.min,n4=ev.now,n6=n.parseInt,n7=e_.random,n9=eA.reverse,te=ix(n,"DataView"),tn=ix(n,"Map"),tt=ix(n,"Promise"),tr=ix(n,"Set"),ti=ix(n,"WeakMap"),to=ix(eC,"create"),tl=ti&&new ti,ta={},tc=iK(te),ts=iK(tn),tu=iK(tt),td=iK(tr),tf=iK(ti),th=eJ?eJ.prototype:o,tm=th?th.valueOf:o,tp=th?th.toString:o;function tx(e){if(oG(e)&&!oM(e)&&!r(e,ty)){if(r(e,tb))return e;if(eT.call(e,"__wrapped__"))return iJ(e)}return new tb(e)}var tg=function(){function e(){}return function(n){if(!oq(n))return{};if(eW)return eW(n);e.prototype=n;var t=new e;return e.prototype=o,t}}();function tj(){}function tb(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function ty(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function tv(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1},tw.prototype.set=function(e,n){var t=this.__data__,r=tP(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this},tk.prototype.clear=function(){this.size=0,this.__data__={hash:new tv,map:new(tn||tw),string:new tv}},tk.prototype.delete=function(e){var n=im(this,e).delete(e);return this.size-=!!n,n},tk.prototype.get=function(e){return im(this,e).get(e)},tk.prototype.has=function(e){return im(this,e).has(e)},tk.prototype.set=function(e,n){var t=im(this,e),r=t.size;return t.set(e,n),this.size+=+(t.size!=r),this},t_.prototype.add=t_.prototype.push=function(e){return this.__data__.set(e,a),this},t_.prototype.has=function(e){return this.__data__.has(e)};function tO(e,n,t){(o===t||oN(e[n],t))&&(o!==t||n in e)||tz(e,n,t)}function tA(e,n,t){var r=e[n];eT.call(e,n)&&oN(r,t)&&(o!==t||n in e)||tz(e,n,t)}function tP(e,n){for(var t=e.length;t--;)if(oN(e[t][0],n))return t;return -1}function tE(e,n,t,r){return tL(e,function(e,i,o){n(r,e,t(e),o)}),r}function tB(e,n){return e&&rX(n,lx(n),e)}function tz(e,n,t){"__proto__"==n&&e9?e9(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t}function tT(e,n){for(var t=-1,r=n.length,i=ey(r),l=null==e;++t=n?e:n)),e}function tR(e,n,t,r,i,l){var a,c=1&n,s=2&n,u=4&n;if(t&&(a=i?t(e,r,i,l):t(e)),o!==a)return a;if(!oq(e))return e;var d=oM(e);if(d){if(x=(h=e).length,w=new h.constructor(x),x&&"string"==typeof h[0]&&eT.call(h,"index")&&(w.index=h.index,w.input=h.input),a=w,!c)return rJ(e,a)}else{var h,x,w,S,M,L,K,J,X=ib(e),U=X==g||X==j;if(oX(e))return rR(e,c);if(X==v||X==f||U&&!i){if(a=s||U?{}:iv(e),!c){return s?(S=e,M=(J=a)&&rX(e,lg(e),J),rX(S,ij(S),M)):(L=e,K=tB(a,e),rX(L,ig(L),K))}}else{if(!e1[X])return i?e:{};a=function(e,n,t){var r,i,o=e.constructor;switch(n){case O:return rD(e);case m:case p:return new o(+e);case A:return r=t?rD(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case P:case E:case B:case z:case T:case N:case R:case D:case $:return r$(e,t);case b:return new o;case y:case C:return new o(e);case k:return(i=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,i;case _:return new o;case I:return tm?eC(tm.call(e)):{}}}(e,X,c)}}l||(l=new tC);var F=l.get(e);if(F)return F;l.set(e,a),o1(e)?e.forEach(function(r){a.add(tR(r,n,t,r,e,l))}):oY(e)&&e.forEach(function(r,i){a.set(i,tR(r,n,t,i,e,l))});var V=u?s?ic:ia:s?lg:lx,H=d?o:V(e);return nd(H||e,function(r,i){H&&(r=e[i=r]),tA(a,i,tR(r,n,t,i,e,l))}),a}function tD(e,n,t){var r=t.length;if(null==e)return!r;for(e=eC(e);r--;){var i=t[r],l=n[i],a=e[i];if(o===a&&!(i in e)||!l(a))return!1}return!0}function t$(e,n,t){if("function"!=typeof e)throw new eO(l);return iT(function(){e.apply(o,t)},n)}function tM(e,n,t,r){var i=-1,o=nm,l=!0,a=e.length,c=[],s=n.length;if(!a)return c;t&&(n=nx(n,nT(t))),r?(o=np,l=!1):n.length>=200&&(o=nR,l=!1,n=new t_(n));t:for(;++i0&&t(a)?n>1?tF(a,n-1,t,r,i):ng(i,a):r||(i[i.length]=a)}return i}var tV=rH(),tH=rH(!0);function tW(e,n){return e&&tV(e,n,lx)}function tq(e,n){return e&&tH(e,n,lx)}function tG(e,n){return nh(n,function(n){return oV(e[n])})}function tY(e,n){n=rz(n,e);for(var t=0,r=n.length;null!=e&&tn}function t1(e,n){return null!=e&&eT.call(e,n)}function t2(e,n){return null!=e&&n in eC(e)}function t8(e,n,t){for(var r=t?np:nm,i=e[0].length,l=e.length,a=l,c=ey(l),s=1/0,u=[];a--;){var d=e[a];a&&n&&(d=nx(d,nT(n))),s=n5(d.length,s),c[a]=!t&&(n||i>=120&&d.length>=120)?new t_(a&&d):o}d=e[0];var f=-1,h=c[0];t:for(;++f=a)return c;return c*("desc"==t[r]?-1:1)}}return e.index-n.index}(e,n,t)});o--;)i[o]=i[o].value;return i}function rc(e,n,t){for(var r=-1,i=n.length,o={};++r-1;)a!==e&&e2.call(a,c,1),e2.call(e,c,1);return e}function ru(e,n){for(var t=e?n.length:0,r=t-1;t--;){var i=n[t];if(t==r||i!==o){var o=i;ik(i)?e2.call(e,i,1):rC(e,i)}}return e}function rd(e,n){return e+nQ(n7()*(n-e+1))}function rf(e,n){var t="";if(!e||n<1||n>0x1fffffffffffff)return t;do n%2&&(t+=e),(n=nQ(n/2))&&(e+=e);while(n);return t}function rh(e,n){return iN(iP(e,n,lJ),e+"")}function rm(e,n,t,r){if(!oq(e))return e;n=rz(n,e);for(var i=-1,l=n.length,a=l-1,c=e;null!=c&&++ii?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var o=ey(i);++r>>1,l=e[o];null!==l&&!o8(l)&&(t?l<=n:l=200){var s=n?null:r7(e);if(s)return nV(s);l=!1,i=nR,c=new t_}else c=n?[]:a;t:for(;++r=r?e:rg(e,n,t)}var rN=nn||function(e){return e6.clearTimeout(e)};function rR(e,n){if(n)return e.slice();var t=e.length,r=eU?eU(t):new e.constructor(t);return e.copy(r),r}function rD(e){var n=new e.constructor(e.byteLength);return new eX(n).set(new eX(e)),n}function r$(e,n){var t=n?rD(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function rM(e,n){if(e!==n){var t=o!==e,r=null===e,i=e==e,l=o8(e),a=o!==n,c=null===n,s=n==n,u=o8(n);if(!c&&!u&&!l&&e>n||l&&a&&s&&!c&&!u||r&&a&&s||!t&&s||!i)return 1;if(!r&&!l&&!u&&e1?t[i-1]:o,a=i>2?t[2]:o;for(l=e.length>3&&"function"==typeof l?(i--,l):o,a&&i_(t[0],t[1],a)&&(l=i<3?o:l,i=1),n=eC(n);++r-1?i[l?n[a]:a]:o}}function rQ(e){return il(function(n){var t=n.length,r=t,i=tb.prototype.thru;for(e&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new eO(l);if(i&&!c&&"wrapper"==iu(a))var c=new tb([],!0)}for(r=c?r:t;++r1&&y.reverse(),f&&uc))return!1;var u=l.get(e),d=l.get(n);if(u&&d)return u==n&&d==e;var f=-1,h=!0,m=2&t?new t_:o;for(l.set(e,n),l.set(n,e);++f-1&&e%1==0&&e1?"& ":"")+n[r],n=n.join(t>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+n+"] */\n")}(l,(r=(o=l.match(er))?o[1].split(ei):[],i=t,nd(d,function(e){var n="_."+e[0];i&e[1]&&!nm(r,n)&&r.push(n)}),r.sort())))}function iD(e){var n=0,t=0;return function(){var r=n4(),i=16-(r-t);if(t=r,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(o,arguments)}}function i$(e,n){var t=-1,r=e.length,i=r-1;for(n=o===n?r:n;++t1?e[n-1]:o;return t="function"==typeof t?(e.pop(),t):o,i7(e,t)});function oo(e){var n=tx(e);return n.__chain__=!0,n}function ol(e,n){return n(e)}var oa=il(function(e){var n=e.length,t=n?e[0]:0,i=this.__wrapped__,l=function(n){return tT(n,e)};return n>1||this.__actions__.length||!r(i,ty)||!ik(t)?this.thru(l):((i=i.slice(t,+t+ +!!n)).__actions__.push({func:ol,args:[l],thisArg:o}),new tb(i,this.__chain__).thru(function(e){return n&&!e.length&&e.push(o),e}))}),oc=rU(function(e,n,t){eT.call(e,t)?++e[t]:tz(e,t,1)}),os=rY(iV),ou=rY(iH);function od(e,n){return(oM(e)?nd:tL)(e,ih(n,3))}function of(e,n){return(oM(e)?function(e,n){for(var t=null==e?0:e.length;t--&&!1!==n(e[t],t,e););return e}:tK)(e,ih(n,3))}var oh=rU(function(e,n,t){eT.call(e,t)?e[t].push(n):tz(e,t,[n])}),om=rh(function(e,n,t){var r=-1,i="function"==typeof n,o=oK(e)?ey(e.length):[];return tL(e,function(e){o[++r]=i?ns(n,e,t):t3(e,n,t)}),o}),op=rU(function(e,n,t){tz(e,t,n)});function ox(e,n){return(oM(e)?nx:rt)(e,ih(n,3))}var og=rU(function(e,n,t){e[+!t].push(n)},function(){return[[],[]]}),oj=rh(function(e,n){if(null==e)return[];var t=n.length;return t>1&&i_(e,n[0],n[1])?n=[]:t>2&&i_(n[0],n[1],n[2])&&(n=[n[0]]),ra(e,tF(n,1),[])}),ob=nt||function(){return e6.Date.now()};function oy(e,n,t){return n=t?o:n,n=e&&null==n?e.length:n,ie(e,128,o,o,o,o,n)}function ov(e,n){var t;if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=o),t}}var ow=rh(function(e,n,t){var r=1;if(t.length){var i=nF(t,id(ow));r|=32}return ie(e,r,n,t,i)}),ok=rh(function(e,n,t){var r=3;if(t.length){var i=nF(t,id(ok));r|=32}return ie(n,r,e,t,i)});function o_(e,n,t){n=t?o:n;var r=ie(e,8,o,o,o,o,o,n);return r.placeholder=o_.placeholder,r}function oC(e,n,t){n=t?o:n;var r=ie(e,16,o,o,o,o,o,n);return r.placeholder=oC.placeholder,r}function oI(e,n,t){var r,i,a,c,s,u,d=0,f=!1,h=!1,m=!0;if("function"!=typeof e)throw new eO(l);function p(n){var t=r,l=i;return r=i=o,d=n,c=e.apply(l,t)}function x(e){var t=e-u,r=e-d;return o===u||t>=n||t<0||h&&r>=a}function g(){var e,t,r,i=ob();if(x(i))return j(i);s=iT(g,(e=i-u,t=i-d,r=n-e,h?n5(r,a-t):r))}function j(e){return(s=o,m&&r)?p(e):(r=i=o,c)}function b(){var e,t=ob(),l=x(t);if(r=arguments,i=this,u=t,l){if(o===s)return d=e=u,s=iT(g,n),f?p(e):c;if(h)return rN(s),s=iT(g,n),p(u)}return o===s&&(s=iT(g,n)),c}return n=ln(n)||0,oq(t)&&(f=!!t.leading,a=(h="maxWait"in t)?n3(ln(t.maxWait)||0,n):a,m="trailing"in t?!!t.trailing:m),b.cancel=function(){o!==s&&rN(s),d=0,r=u=i=s=o},b.flush=function(){return o===s?c:j(ob())},b}var oS=rh(function(e,n){return t$(e,1,n)}),oO=rh(function(e,n,t){return t$(e,ln(n)||0,t)});function oA(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new eO(l);var t=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(oA.Cache||tk),t}function oP(e){if("function"!=typeof e)throw new eO(l);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}oA.Cache=tk;var oE=rh(function(e,n){var t=(n=1==n.length&&oM(n[0])?nx(n[0],nT(ih())):nx(tF(n,1),nT(ih()))).length;return rh(function(r){for(var i=-1,o=n5(r.length,t);++i=n}),o$=t5(function(){return arguments}())?t5:function(e){return oG(e)&&eT.call(e,"callee")&&!eG.call(e,"callee")},oM=ey.isArray,oL=nr?nT(nr):function(e){return oG(e)&&tZ(e)==O};function oK(e){return null!=e&&oW(e.length)&&!oV(e)}function oJ(e){return oG(e)&&oK(e)}var oX=n0||l1,oU=ni?nT(ni):function(e){return oG(e)&&tZ(e)==p};function oF(e){if(!oG(e))return!1;var n=tZ(e);return n==x||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!oZ(e)}function oV(e){if(!oq(e))return!1;var n=tZ(e);return n==g||n==j||"[object AsyncFunction]"==n||"[object Proxy]"==n}function oH(e){return"number"==typeof e&&e==o9(e)}function oW(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function oq(e){var n=void 0===e?"undefined":i(e);return null!=e&&("object"==n||"function"==n)}function oG(e){return null!=e&&(void 0===e?"undefined":i(e))=="object"}var oY=no?nT(no):function(e){return oG(e)&&ib(e)==b};function oQ(e){return"number"==typeof e||oG(e)&&tZ(e)==y}function oZ(e){if(!oG(e)||tZ(e)!=v)return!1;var n=eF(e);if(null===n)return!0;var t=eT.call(n,"constructor")&&n.constructor;return"function"==typeof t&&r(t,t)&&ez.call(t)==e$}var o0=nl?nT(nl):function(e){return oG(e)&&tZ(e)==k},o1=na?nT(na):function(e){return oG(e)&&ib(e)==_};function o2(e){return"string"==typeof e||!oM(e)&&oG(e)&&tZ(e)==C}function o8(e){return(void 0===e?"undefined":i(e))=="symbol"||oG(e)&&tZ(e)==I}var o3=nc?nT(nc):function(e){return oG(e)&&oW(e.length)&&!!e0[tZ(e)]},o5=r5(rn),o4=r5(function(e,n){return e<=n});function o6(e){if(!e)return[];if(oK(e))return o2(e)?nW(e):rJ(e);if(e4&&e[e4]){for(var n,t=e[e4](),r=[];!(n=t.next()).done;)r.push(n.value);return r}var i=ib(e);return(i==b?nX:i==_?nV:lC)(e)}function o7(e){return e?(e=ln(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o9(e){var n=o7(e),t=n%1;return n==n?t?n-t:n:0}function le(e){return e?tN(o9(e),0,0xffffffff):0}function ln(e){if("number"==typeof e)return e;if(o8(e))return u;if(oq(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=oq(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=nz(e);var t=ed.test(e);return t||eh.test(e)?e3(e.slice(2),t?2:8):eu.test(e)?u:+e}function lt(e){return rX(e,lg(e))}function lr(e){return null==e?"":rk(e)}var li=rF(function(e,n){if(iO(n)||oK(n))return void rX(n,lx(n),e);for(var t in n)eT.call(n,t)&&tA(e,t,n[t])}),lo=rF(function(e,n){rX(n,lg(n),e)}),ll=rF(function(e,n,t,r){rX(n,lg(n),e,r)}),la=rF(function(e,n,t,r){rX(n,lx(n),e,r)}),lc=il(tT),ls=rh(function(e,n){e=eC(e);var t=-1,r=n.length,i=r>2?n[2]:o;for(i&&i_(n[0],n[1],i)&&(r=1);++t1),n}),rX(e,ic(e),t),r&&(t=tR(t,7,ii));for(var i=n.length;i--;)rC(t,n[i]);return t}),lv=il(function(e,n){return null==e?{}:rc(e,n,function(n,t){return lf(e,t)})});function lw(e,n){if(null==e)return{};var t=nx(ic(e),function(e){return[e]});return n=ih(n),rc(e,t,function(e,t){return n(e,t[0])})}var lk=r9(lx),l_=r9(lg);function lC(e){return null==e?[]:nN(e,lx(e))}var lI=rq(function(e,n,t){return n=n.toLowerCase(),e+(t?lS(n):n)});function lS(e){return lN(lr(e).toLowerCase())}function lO(e){return(e=lr(e))&&e.replace(ep,nM).replace(eH,"")}var lA=rq(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),lP=rq(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),lE=rW("toLowerCase"),lB=rq(function(e,n,t){return e+(t?"_":"")+n.toLowerCase()}),lz=rq(function(e,n,t){return e+(t?" ":"")+lN(n)}),lT=rq(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),lN=rW("toUpperCase");function lR(e,n,t){if(e=lr(e),n=t?o:n,o===n){var r;return(r=e,eY.test(r))?e.match(eq)||[]:e.match(eo)||[]}return e.match(n)||[]}var lD=rh(function(e,n){try{return ns(e,o,n)}catch(e){return oF(e)?e:new ew(e)}}),l$=il(function(e,n){return nd(n,function(n){tz(e,n=iL(n),ow(e[n],e))}),e});function lM(e){return function(){return e}}var lL=rQ(),lK=rQ(!0);function lJ(e){return e}function lX(e){return t9("function"==typeof e?e:tR(e,1))}var lU=rh(function(e,n){return function(t){return t3(t,e,n)}}),lF=rh(function(e,n){return function(t){return t3(e,t,n)}});function lV(e,n,t){var r=lx(n),i=tG(n,r);null!=t||oq(n)&&(i.length||!r.length)||(t=n,n=e,e=this,i=tG(n,lx(n)));var o=!(oq(t)&&"chain"in t)||!!t.chain,l=oV(e);return nd(i,function(t){var r=n[t];e[t]=r,l&&(e.prototype[t]=function(){var n=this.__chain__;if(o||n){var t=e(this.__wrapped__);return(t.__actions__=rJ(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t}return r.apply(e,ng([this.value()],arguments))})}),e}function lH(){}var lW=r2(nx),lq=r2(nf),lG=r2(ny);function lY(e){return iC(e)?nO(iL(e)):function(n){return tY(n,e)}}var lQ=r3(),lZ=r3(!0);function l0(){return[]}function l1(){return!1}var l2=r1(function(e,n){return e+n},0),l8=r6("ceil"),l3=r1(function(e,n){return e/n},1),l5=r6("floor"),l4=r1(function(e,n){return e*n},1),l6=r6("round"),l7=r1(function(e,n){return e-n},0);return tx.after=function(e,n){if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){if(--e<1)return n.apply(this,arguments)}},tx.ary=oy,tx.assign=li,tx.assignIn=lo,tx.assignInWith=ll,tx.assignWith=la,tx.at=lc,tx.before=ov,tx.bind=ow,tx.bindAll=l$,tx.bindKey=ok,tx.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oM(e)?e:[e]},tx.chain=oo,tx.chunk=function(e,n,t){n=(t?i_(e,n,t):o===n)?1:n3(o9(n),0);var r=null==e?0:e.length;if(!r||n<1)return[];for(var i=0,l=0,a=ey(nA(r/n));ic?0:c+l),(a=o===a||a>c?c:o9(a))<0&&(a+=c),a=l>a?0:le(a);l>>0)?(e=lr(e))&&("string"==typeof n||null!=n&&!o0(n))&&!(n=rk(n))&&nJ(e)?rT(nW(e),0,t):e.split(n,t):[]},tx.spread=function(e,n){if("function"!=typeof e)throw new eO(l);return n=null==n?0:n3(o9(n),0),rh(function(t){var r=t[n],i=rT(t,0,n);return r&&ng(i,r),ns(e,this,i)})},tx.tail=function(e){var n=null==e?0:e.length;return n?rg(e,1,n):[]},tx.take=function(e,n,t){return e&&e.length?rg(e,0,(n=t||o===n?1:o9(n))<0?0:n):[]},tx.takeRight=function(e,n,t){var r=null==e?0:e.length;return r?rg(e,(n=r-(n=t||o===n?1:o9(n)))<0?0:n,r):[]},tx.takeRightWhile=function(e,n){return e&&e.length?rS(e,ih(n,3),!1,!0):[]},tx.takeWhile=function(e,n){return e&&e.length?rS(e,ih(n,3)):[]},tx.tap=function(e,n){return n(e),e},tx.throttle=function(e,n,t){var r=!0,i=!0;if("function"!=typeof e)throw new eO(l);return oq(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),oI(e,n,{leading:r,maxWait:n,trailing:i})},tx.thru=ol,tx.toArray=o6,tx.toPairs=lk,tx.toPairsIn=l_,tx.toPath=function(e){return oM(e)?nx(e,iL):o8(e)?[e]:rJ(iM(lr(e)))},tx.toPlainObject=lt,tx.transform=function(e,n,t){var r=oM(e),i=r||oX(e)||o3(e);if(n=ih(n,4),null==t){var o=e&&e.constructor;t=i?r?new o:[]:oq(e)&&oV(o)?tg(eF(e)):{}}return(i?nd:tW)(e,function(e,r,i){return n(t,e,r,i)}),t},tx.unary=function(e){return oy(e,1)},tx.union=i3,tx.unionBy=i5,tx.unionWith=i4,tx.uniq=function(e){return e&&e.length?r_(e):[]},tx.uniqBy=function(e,n){return e&&e.length?r_(e,ih(n,2)):[]},tx.uniqWith=function(e,n){return n="function"==typeof n?n:o,e&&e.length?r_(e,o,n):[]},tx.unset=function(e,n){return null==e||rC(e,n)},tx.unzip=i6,tx.unzipWith=i7,tx.update=function(e,n,t){return null==e?e:rI(e,n,rB(t))},tx.updateWith=function(e,n,t,r){return r="function"==typeof r?r:o,null==e?e:rI(e,n,rB(t),r)},tx.values=lC,tx.valuesIn=function(e){return null==e?[]:nN(e,lg(e))},tx.without=i9,tx.words=lR,tx.wrap=function(e,n){return oB(rB(n),e)},tx.xor=oe,tx.xorBy=on,tx.xorWith=ot,tx.zip=or,tx.zipObject=function(e,n){return rP(e||[],n||[],tA)},tx.zipObjectDeep=function(e,n){return rP(e||[],n||[],rm)},tx.zipWith=oi,tx.entries=lk,tx.entriesIn=l_,tx.extend=lo,tx.extendWith=ll,lV(tx,tx),tx.add=l2,tx.attempt=lD,tx.camelCase=lI,tx.capitalize=lS,tx.ceil=l8,tx.clamp=function(e,n,t){return o===t&&(t=n,n=o),o!==t&&(t=(t=ln(t))==t?t:0),o!==n&&(n=(n=ln(n))==n?n:0),tN(ln(e),n,t)},tx.clone=function(e){return tR(e,4)},tx.cloneDeep=function(e){return tR(e,5)},tx.cloneDeepWith=function(e,n){return tR(e,5,n="function"==typeof n?n:o)},tx.cloneWith=function(e,n){return tR(e,4,n="function"==typeof n?n:o)},tx.conformsTo=function(e,n){return null==n||tD(e,n,lx(n))},tx.deburr=lO,tx.defaultTo=function(e,n){return null==e||e!=e?n:e},tx.divide=l3,tx.endsWith=function(e,n,t){e=lr(e),n=rk(n);var r=e.length,i=t=o===t?r:tN(o9(t),0,r);return(t-=n.length)>=0&&e.slice(t,i)==n},tx.eq=oN,tx.escape=function(e){return(e=lr(e))&&F.test(e)?e.replace(X,nL):e},tx.escapeRegExp=function(e){return(e=lr(e))&&Z.test(e)?e.replace(Q,"\\$&"):e},tx.every=function(e,n,t){var r=oM(e)?nf:tJ;return t&&i_(e,n,t)&&(n=o),r(e,ih(n,3))},tx.find=os,tx.findIndex=iV,tx.findKey=function(e,n){return nw(e,ih(n,3),tW)},tx.findLast=ou,tx.findLastIndex=iH,tx.findLastKey=function(e,n){return nw(e,ih(n,3),tq)},tx.floor=l5,tx.forEach=od,tx.forEachRight=of,tx.forIn=function(e,n){return null==e?e:tV(e,ih(n,3),lg)},tx.forInRight=function(e,n){return null==e?e:tH(e,ih(n,3),lg)},tx.forOwn=function(e,n){return e&&tW(e,ih(n,3))},tx.forOwnRight=function(e,n){return e&&tq(e,ih(n,3))},tx.get=ld,tx.gt=oR,tx.gte=oD,tx.has=function(e,n){return null!=e&&iy(e,n,t1)},tx.hasIn=lf,tx.head=iq,tx.identity=lJ,tx.includes=function(e,n,t,r){e=oK(e)?e:lC(e),t=t&&!r?o9(t):0;var i=e.length;return t<0&&(t=n3(i+t,0)),o2(e)?t<=i&&e.indexOf(n,t)>-1:!!i&&n_(e,n,t)>-1},tx.indexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=null==t?0:o9(t);return i<0&&(i=n3(r+i,0)),n_(e,n,i)},tx.inRange=function(e,n,t){var r,i,l;return n=o7(n),o===t?(t=n,n=0):t=o7(t),(r=e=ln(e))>=n5(i=n,l=t)&&r=-0x1fffffffffffff&&e<=0x1fffffffffffff},tx.isSet=o1,tx.isString=o2,tx.isSymbol=o8,tx.isTypedArray=o3,tx.isUndefined=function(e){return o===e},tx.isWeakMap=function(e){return oG(e)&&ib(e)==S},tx.isWeakSet=function(e){return oG(e)&&"[object WeakSet]"==tZ(e)},tx.join=function(e,n){return null==e?"":n2.call(e,n)},tx.kebabCase=lA,tx.last=iZ,tx.lastIndexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=r;return o!==t&&(i=(i=o9(t))<0?n3(r+i,0):n5(i,r-1)),n==n?function(e,n,t){for(var r=t+1;r--&&e[r]!==n;);return r}(e,n,i):nk(e,nI,i,!0)},tx.lowerCase=lP,tx.lowerFirst=lE,tx.lt=o5,tx.lte=o4,tx.max=function(e){return e&&e.length?tX(e,lJ,t0):o},tx.maxBy=function(e,n){return e&&e.length?tX(e,ih(n,2),t0):o},tx.mean=function(e){return nS(e,lJ)},tx.meanBy=function(e,n){return nS(e,ih(n,2))},tx.min=function(e){return e&&e.length?tX(e,lJ,rn):o},tx.minBy=function(e,n){return e&&e.length?tX(e,ih(n,2),rn):o},tx.stubArray=l0,tx.stubFalse=l1,tx.stubObject=function(){return{}},tx.stubString=function(){return""},tx.stubTrue=function(){return!0},tx.multiply=l4,tx.nth=function(e,n){return e&&e.length?rl(e,o9(n)):o},tx.noConflict=function(){return e6._===this&&(e6._=eM),this},tx.noop=lH,tx.now=ob,tx.pad=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;if(!n||r>=n)return e;var i=(n-r)/2;return r8(nQ(i),t)+e+r8(nA(i),t)},tx.padEnd=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;return n&&rn){var r=e;e=n,n=r}if(t||e%1||n%1){var i=n7();return n5(e+i*(n-e+e8("1e-"+((i+"").length-1))),n)}return rd(e,n)},tx.reduce=function(e,n,t){var r=oM(e)?nj:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tL)},tx.reduceRight=function(e,n,t){var r=oM(e)?nb:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tK)},tx.repeat=function(e,n,t){return n=(t?i_(e,n,t):o===n)?1:o9(n),rf(lr(e),n)},tx.replace=function(){var e=arguments,n=lr(e[0]);return e.length<3?n:n.replace(e[1],e[2])},tx.result=function(e,n,t){n=rz(n,e);var r=-1,i=n.length;for(i||(i=1,e=o);++r0x1fffffffffffff)return[];var t=0xffffffff,r=n5(e,0xffffffff);n=ih(n),e-=0xffffffff;for(var i=nB(r,n);++t=l)return e;var c=t-nH(r);if(c<1)return r;var s=a?rT(a,0,c).join(""):e.slice(0,c);if(o===i)return s+r;if(a&&(c+=s.length-c),o0(i)){if(e.slice(c).search(i)){var u,d=s;for(i.global||(i=eI(i.source,lr(es.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;s=s.slice(0,o===f?c:f)}}else if(e.indexOf(rk(i),c)!=c){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},tx.unescape=function(e){return(e=lr(e))&&U.test(e)?e.replace(J,nG):e},tx.uniqueId=function(e){var n=++eN;return lr(e)+n},tx.upperCase=lT,tx.upperFirst=lN,tx.each=od,tx.eachRight=of,tx.first=iq,lV(tx,(eb={},tW(tx,function(e,n){eT.call(tx.prototype,n)||(eb[n]=e)}),eb),{chain:!1}),tx.VERSION="4.18.1",nd(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){tx[e].placeholder=tx}),nd(["drop","take"],function(e,n){ty.prototype[e]=function(t){t=o===t?1:n3(o9(t),0);var r=this.__filtered__&&!n?new ty(this):this.clone();return r.__filtered__?r.__takeCount__=n5(t,r.__takeCount__):r.__views__.push({size:n5(t,0xffffffff),type:e+(r.__dir__<0?"Right":"")}),r},ty.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),nd(["filter","map","takeWhile"],function(e,n){var t=n+1,r=1==t||3==t;ty.prototype[e]=function(e){var n=this.clone();return n.__iteratees__.push({iteratee:ih(e,3),type:t}),n.__filtered__=n.__filtered__||r,n}}),nd(["head","last"],function(e,n){var t="take"+(n?"Right":"");ty.prototype[e]=function(){return this[t](1).value()[0]}}),nd(["initial","tail"],function(e,n){var t="drop"+(n?"":"Right");ty.prototype[e]=function(){return this.__filtered__?new ty(this):this[t](1)}}),ty.prototype.compact=function(){return this.filter(lJ)},ty.prototype.find=function(e){return this.filter(e).head()},ty.prototype.findLast=function(e){return this.reverse().find(e)},ty.prototype.invokeMap=rh(function(e,n){return"function"==typeof e?new ty(this):this.map(function(t){return t3(t,e,n)})}),ty.prototype.reject=function(e){return this.filter(oP(ih(e)))},ty.prototype.slice=function(e,n){e=o9(e);var t=this;return t.__filtered__&&(e>0||n<0)?new ty(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),o!==n&&(t=(n=o9(n))<0?t.dropRight(-n):t.take(n-e)),t)},ty.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ty.prototype.toArray=function(){return this.take(0xffffffff)},tW(ty.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),l=tx[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);l&&(tx.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,s=r(n,ty),u=c[0],d=s||oM(n),f=function(e){var n=l.apply(tx,ng([e],c));return i&&h?n[0]:n};d&&t&&"function"==typeof u&&1!=u.length&&(s=d=!1);var h=this.__chain__,m=!!this.__actions__.length,p=a&&!h,x=s&&!m;if(!a&&d){n=x?n:new ty(this);var g=e.apply(n,c);return g.__actions__.push({func:ol,args:[f],thisArg:o}),new tb(g,h)}return p&&x?e.apply(this,c):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})}),nd(["pop","push","shift","sort","splice","unshift"],function(e){var n=eA[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);tx.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(oM(i)?i:[],e)}return this[t](function(t){return n.apply(oM(t)?t:[],e)})}}),tW(ty.prototype,function(e,n){var t=tx[n];if(t){var r=t.name+"";eT.call(ta,r)||(ta[r]=[]),ta[r].push({name:n,func:t})}}),ta[rZ(o,2).name]=[{name:"wrapper",func:o}],ty.prototype.clone=function(){var e=new ty(this.__wrapped__);return e.__actions__=rJ(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rJ(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rJ(this.__views__),e},ty.prototype.reverse=function(){if(this.__filtered__){var e=new ty(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},ty.prototype.value=function(){var e=this.__wrapped__.value(),n=this.__dir__,t=oM(e),r=n<0,i=t?e.length:0,o=function(e,n,t){for(var r=-1,i=t.length;++r=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}},tx.prototype.plant=function(e){for(var n,t=this;r(t,tj);){var i=iJ(t);i.__index__=0,i.__values__=o,n?l.__wrapped__=i:n=i;var l=i;t=t.__wrapped__}return l.__wrapped__=e,n},tx.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,ty)){var n=e;return this.__actions__.length&&(n=new ty(this)),(n=n.reverse()).__actions__.push({func:ol,args:[i8],thisArg:o}),new tb(n,this.__chain__)}return this.thru(i8)},tx.prototype.toJSON=tx.prototype.valueOf=tx.prototype.value=function(){return rO(this.__wrapped__,this.__actions__)},tx.prototype.first=tx.prototype.head,e4&&(tx.prototype[e4]=function(){return this}),tx}();"function"==typeof define&&"object"==i(define.amd)&&define.amd?(e6._=nY,define(function(){return nY})):e9?((e9.exports=nY)._=nY,e7._=nY):e6._=nY}).call(this)},6312:function(e,n){"use strict";var t=Symbol.for("react.transitional.element");function r(e,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return{$$typeof:t,type:e,key:i,ref:void 0!==(n=r.ref)?n:null,props:r}}n.Fragment=Symbol.for("react.fragment"),n.jsx=r,n.jsxs=r},5059:function(e,n){"use strict";function t(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator,x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,j={};function b(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}function y(){}function v(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}b.prototype.isReactComponent={},b.prototype.setState=function(e,n){if("object"!==(void 0===e?"undefined":t(e))&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function S(e,n,t){var i=t.ref;return{$$typeof:r,type:e,key:n,ref:void 0!==i?i:null,props:t}}function O(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e&&e.$$typeof===r}var A=/\/+/g;function P(e,n){var r,i;return"object"===(void 0===e?"undefined":t(e))&&null!==e&&null!=e.key?(r=""+e.key,i={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return i[e]})):n.toString(36)}function E(e,n,o){if(null==e)return e;var l=[],a=0;return!function e(n,o,l,a,c){var s,u,d,f=void 0===n?"undefined":t(n);("undefined"===f||"boolean"===f)&&(n=null);var m=!1;if(null===n)m=!0;else switch(f){case"bigint":case"string":case"number":m=!0;break;case"object":switch(n.$$typeof){case r:case i:m=!0;break;case h:return e((m=n._init)(n._payload),o,l,a,c)}}if(m)return c=c(n),m=""===a?"."+P(n,0):a,k(c)?(l="",null!=m&&(l=m.replace(A,"$&/")+"/"),e(c,o,l,"",function(e){return e})):null!=c&&(O(c)&&(s=c,u=l+(null==c.key||n&&n.key===c.key?"":(""+c.key).replace(A,"$&/")+"/")+m,c=S(s.type,u,s.props)),o.push(c)),1;m=0;var x=""===a?".":a+":";if(k(n))for(var g=0;g>>1,i=e[r];if(0>>1;rl(c,t))sl(u,c)?(e[r]=u,e[s]=t,r=s):(e[r]=c,e[a]=t,r=a);else if(sl(u,t))e[r]=u,e[s]=t,r=s;else break}}return n}function l(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(n.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":t(performance))&&"function"==typeof performance.now){var a,c=performance;n.unstable_now=function(){return c.now()}}else{var s=Date,u=s.now();n.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,p=3,x=!1,g=!1,j=!1,b=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var n=i(f);null!==n;){if(null===n.callback)o(f);else if(n.startTime<=e)o(f),n.sortIndex=n.expirationTime,r(d,n);else break;n=i(f)}}function _(e){if(j=!1,k(e),!g)if(null!==i(d))g=!0,C||(C=!0,a());else{var n=i(f);null!==n&&z(_,n.startTime-e)}}var C=!1,I=-1,S=5,O=-1;function A(){return!!b||!(n.unstable_now()-Oe&&A());){var l=m.callback;if("function"==typeof l){m.callback=null,p=m.priorityLevel;var c=l(m.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof c){m.callback=c,k(e),t=!0;break n}m===i(d)&&o(d),k(e)}else o(d);m=i(d)}if(null!==m)t=!0;else{var s=i(f);null!==s&&z(_,s.startTime-e),t=!1}}break e}finally{m=null,p=r,x=!1}}}finally{t?a():C=!1}}}if("function"==typeof w)a=function(){w(P)};else if("undefined"!=typeof MessageChannel){var E=new MessageChannel,B=E.port2;E.port1.onmessage=P,a=function(){B.postMessage(null)}}else a=function(){y(P,0)};function z(e,t){I=y(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_forceFrameRate=function(e){0>e||125c?(e.sortIndex=l,r(f,e),null===i(d)&&e===i(f)&&(j?(v(I),I=-1):j=!0,z(_,l-c))):(e.sortIndex=s,r(d,e),g||x||(g=!0,C||(C=!0,a()))),e},n.unstable_shouldYield=A,n.unstable_wrapCallback=function(e){var n=p;return function(){var t=p;p=n;try{return e.apply(this,arguments)}finally{p=t}}}},8014:function(e,n,t){"use strict";e.exports=t(2685)},8587:function(e,n,t){"use strict";t.d(n,{TS:()=>s,Tj:()=>o,Ul:()=>a,pb:()=>i,y1:()=>c,yU:()=>u});function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i=function(e,n){if(null==e)return e;if(Array.isArray(e)){for(var t=[],i=0;ia)return 1}return 0},a=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;ri}),null==(r=window.performance)||r.now;var r,i={mark:function(e,n){},measure:function(e,n){}}},5900:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc,Tw:()=>a,VP:()=>s,y$:()=>l});var l=function(e,n){if(n)return n(l)(e);var t,r=[],i=function(n){t=e(t,n);for(var i=0;i1?a-1:0),s=1;s1?n-1:0),r=1;r1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=i({},t),l=!1,a=!0,c=!1,s=void 0;try{for(var u,d=n[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value,h=e[f],m=t[f],p=h(m,r);m!==p&&(l=!0,o[f]=p)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}return l?o:t}},s=function(e,n){var t=function(){for(var t=arguments.length,r=Array(t),l=0;l0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]m});var u,d=(u=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!u()}catch(e){return!1}}),f=function(){function e(){o(this,e),c(this,"store",void 0),c(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return this.store[e]=n,[2]})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),h=function(){function e(){o(this,e),c(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return i(function(){var n;return s(this,function(t){switch(t.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(n=t.sent()))return[2,JSON.parse(n)];return[2,void 0]}})})()}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(n)),[2]})})()}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),m=new(function(){function e(){o(this,e),c(this,"backendPromise",void 0),c(this,"impl",0),this.backendPromise=i(function(){return s(this,function(e){return d()?[2,new h]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new f])})})()}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().set(e,n)]}})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},6183:function(e,n,t){"use strict";t.d(n,{CO:()=>s,Xd:()=>f,Z4:()=>u,tk:()=>d});var r=t(8587);function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,l:()=>o});var r=[/v4shim/i],i={},o=function(e){return i[e]||e},l=function(e){return function(e){return function(n){var t=n.type,o=n.payload;if("asset/stylesheet"===t)return void Byond.loadCss(o);if("asset/mappings"===t){var l=!0,a=!1,c=void 0;try{for(var s,u=Object.keys(o)[Symbol.iterator]();!(l=(s=u.next()).done);l=!0)!function(){var e=s.value;if(!r.some(function(n){return n.test(e)})){var n=o[e],t=e.split(".").pop();i[e]=n,"css"===t&&Byond.loadCss(n),"js"===t&&Byond.loadJs(n)}}()}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return}e(n)}}}},2864:function(e,n,t){"use strict";t.d(n,{H$:()=>w,J3:()=>r,JV:()=>C,Oc:()=>D,QY:()=>M,Ul:()=>$,d4:()=>L,jB:()=>E,pX:()=>B});var r,i=t(9227),o=t(5900),l=t(1874),a=t(6400),c=t(1604),s=t(2533),u=t(2901);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function j(e){var n=function(e,n){if("object"!==b(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===b(n)?n:String(n)}function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function y(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,n)}}var v=(0,s.h)("backend"),w=function(e){r=e},k=(0,o.VP)("backend/update"),_=(0,o.VP)("backend/setSharedState"),C=(0,o.VP)("backend/suspendStart"),I=(0,o.VP)("backend/createPayloadQueue"),S=(0,o.VP)("backend/dequeuePayloadQueue"),O=(0,o.VP)("backend/removePayloadQueue"),A=(0,o.VP)("nextPayloadChunk"),P={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,n=arguments.length>1?arguments[1]:void 0,t=n.type,r=n.payload;if("backend/update"===t){var i=p({},e.config,r.config),o=p({},e.data,r.static_data,r.data),l=p({},e.shared);if(r.shared){var a=!0,c=!1,s=void 0;try{for(var u,d=Object.keys(r.shared)[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var b=u.value,v=r.shared[b];""===v?l[b]=void 0:l[b]=JSON.parse(v)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}}return x(p({},e),{config:i,data:o,shared:l,suspended:!1})}if("backend/setSharedState"===t){var w=r.key,k=r.nextState;return x(p({},e),{shared:x(p({},e.shared),h({},w,k))})}if("backend/suspendStart"===t)return x(p({},e),{suspending:!0});if("backend/suspendSuccess"===t){var _=r.timestamp;return x(p({},e),{data:{},shared:{},config:x(p({},e.config),{title:"",status:1}),suspending:!1,suspended:_})}if("backend/createPayloadQueue"===t){var C=r.id,I=r.chunks,S=e.outgoingPayloadQueues;return x(p({},e),{outgoingPayloadQueues:x(p({},S),h({},C,I))})}if("backend/dequeuePayloadQueue"===t){var O=r.id,A=e.outgoingPayloadQueues,E=A[O],B=g(A,[O].map(j)),z=f(E)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||y(E)||m(),T=(z[0],z.slice(1));return x(p({},e),{outgoingPayloadQueues:T.length?x(p({},B),h({},O,T)):B})}if("backend/removePayloadQueue"===t){var N=r.id,R=e.outgoingPayloadQueues;R[N];var D=g(R,[N].map(j));return x(p({},e),{outgoingPayloadQueues:D})}return e},B=function(e){var n,t;return function(r){return function(o){var s=R(e.getState()),d=s.suspended,f=s.outgoingPayloadQueues,h=o.type,m=o.payload;if("update"===h)return void e.dispatch(k(m));if("suspend"===h)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===h)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===h&&!t){v.log("suspending (".concat(Byond.windowId,")"));var p=function(){return Byond.sendMessage("suspend")};p(),t=setInterval(p,2e3)}if("backend/suspendSuccess"===h&&((0,u.Su)(),clearInterval(t),t=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,l.sc)(),(0,l.zr)(),setTimeout(function(){return(0,c.$)()})),"backend/update"===h){var x,g,j=null==(g=m.config)||null==(x=g.window)?void 0:x.fancy;void 0===n?n=j:n!==j&&(v.log("changing fancy mode to",j),n=j,Byond.winset(Byond.windowId,{titlebar:!j,"can-resize":!j}))}if("backend/update"===h&&d&&(v.log("backend/update",m),(0,u.P7)(),(0,l.ao)(),(0,a.MN)(),setTimeout(function(){i.k.mark("resume/start"),R(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),i.k.mark("resume/finish"))})),"oversizePayloadResponse"===h&&(m.allow?e.dispatch(A(m)):e.dispatch(O(m))),"acknowlegePayloadChunk"===h&&(e.dispatch(S(m)),e.dispatch(A(m))),"nextPayloadChunk"===h){var b=m.id,y=f[b][0];Byond.sendMessage("payloadChunk",{id:b,chunk:y})}return r(o)}}},z=function(e,n){for(var t=e.length-1,r=0,i=0;r1024){var c=i+z(l,1024);r.push(n.slice(i,c1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===n?"undefined":b(n))==="object"&&null!==n&&!Array.isArray(n)))return void v.error("Payload for act() must be an object, got this:",n);var t=JSON.stringify(n);if(Object.entries({type:"act/"+e,payload:t,tgui:1,windowId:Byond.windowId}).reduce(function(e,n,t){var r=f(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||y(n,2)||m(),i=r[0],o=r[1];return e+"".concat(t>0?"&":"?").concat(encodeURIComponent(i),"=").concat(encodeURIComponent(o))},"").length>2048){var i=t.split(T),o="".concat(Date.now());null==r||r.dispatch(I({id:o,chunks:i})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:i.length});return}Byond.sendMessage("act/"+e,n)},R=function(e){return e.backend||{}},D=function(){var e;return x(p({},null==r||null==(e=r.getState())?void 0:e.backend),{act:N})},$=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){r.dispatch(_({key:e,nextState:"function"==typeof n?n(a):n}))}]},M=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){Byond.sendMessage({type:"setSharedState",key:e,value:JSON.stringify("function"==typeof n?n(a):n)||""})}]},L=function(e){return e(null==r?void 0:r.getState())}},8095:function(e,n,t){"use strict";t.d(n,{H:()=>u});var r=t(8138),i=t(4530),o=t(6859);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["onMove","onKey","style"]),m=(0,i.useRef)(null),p=a(u),x=a(d),g=(n=(0,i.useMemo)(function(){var e=function(e){e.preventDefault(),e.buttons>0&&m.current?p(s(m.current,e)):t(!1)},n=function(){return t(!1)},t=function(t){var r=c(m.current),i=t?r.addEventListener:r.removeEventListener;i("mousemove",e),i("mouseup",n)};return[function(e){var n=e.nativeEvent,r=m.current;r&&(n.preventDefault(),r.focus(),p(s(r,n)),t(!0))},function(e){var n=e.which||e.keyCode;n<37||n>40||(e.preventDefault(),x({left:39===n?.05:37===n?-.05:0,top:40===n?.05:38===n?-.05:0}))},t]},[x,p]),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),3!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,3)||function(e,n){if(e){if("string"==typeof e)return l(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,3)}}(n,3)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=g[0],b=g[1],y=g[2];return(0,i.useEffect)(function(){return y},[y]),(0,r.jsx)("div",(t=function(e){for(var n=1;nu,gm:()=>C,tx:()=>v,Gi:()=>a});var r=t(8138),i=t(4530),o=t(7790);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","progressBar","timeStart","timeEnd","format"]),m=Math.max((u?d-u:d)*100,0),p=(n=(0,i.useState)(m),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=p[0],g=p[1],j=(0,i.useRef)(null);function b(){g(function(e){var n=Math.max(e-1e3,0);return n<=0&&clearInterval(j.current),n})}(0,i.useEffect)(function(){return j.current||(j.current=setInterval(b,1e3)),function(){return clearInterval(j.current)}},[]);var y=new Date(x).toISOString().slice(11,19),v=(0,r.jsx)(o.az,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var u=function(e){var n,t,i=e.children,l=s(e,["children"]);return(0,r.jsx)(o.XI,(n=c({},l),t=t={children:(0,r.jsx)(o.XI.Row,{children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};u.Column=function(e){var n=e.size,t=e.style,i=s(e,["size","style"]);return(0,r.jsx)(o.XI.Cell,c({style:c({width:(void 0===n?1:n)+"%"},t)},i))},t(8095);var d=t(8595),f=t(2864);function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function g(e,n){return(g=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}var b=(0,i.createContext)({zoom:1}),y=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},v=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i,o,l,a;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return l=t,a=[e],l=h(l),n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(l,a||[],h(this).constructor):l.apply(this,a)),window.innerWidth,window.innerHeight,n.state={offsetX:null!=(r=e.offsetX)?r:0,offsetY:null!=(i=e.offsetY)?i:0,dragging:!1,originX:null,originY:null,zoom:null!=(o=e.zoom)?o: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),y(e)},n.handleDragMove=function(e){n.setState(function(n){var t=m({},n),r=e.screenX-t.originX,i=e.screenY-t.originY;return n.dragging?(t.offsetX+=r/t.zoom,t.offsetY+=i/t.zoom,t.originX=e.screenX,t.originY=e.screenY):t.dragging=!0,t}),y(e)},n.handleDragEnd=function(t){var r;n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),null==(r=e.onOffsetChange)||r.call(e,t,n.state),y(t)},n.handleZoom=function(t,r){n.setState(function(n){return n.zoom=Math.min(Math.max(r,1),8),e.onZoom&&e.onZoom(n.zoom),n})},n.handleReset=function(t){n.setState(function(r){var i;r.offsetX=0,r.offsetY=0,r.zoom=1,n.handleZoom(t,1),null==(i=e.onOffsetChange)||i.call(e,t,r)})},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e),n=[{key:"render",value:function(){var e=(0,f.Oc)().config,n=this.state,t=n.dragging,i=n.offsetX,l=n.offsetY,a=n.zoom,c=void 0===a?1:a,s=this.props.children,u=e.map+"_nanomap_z1.png",h=510*c+"px";return(0,r.jsx)(b.Provider,{value:{zoom:c},children:(0,r.jsxs)(o.az,{className:"NanoMap__container",children:[(0,r.jsxs)(o.az,{style:{width:h,height:h,marginTop:l*c+"px",marginLeft:i*c+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundSize:"cover",backgroundRepeat:"no-repeat",textAlign:"center",cursor:t?"move":"auto"},onMouseDown:this.handleDragStart,children:[(0,r.jsx)("img",{src:(0,d.l)(u),style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",imageRendering:"pixelated"}}),(0,r.jsx)(o.az,{children:s})]}),(0,r.jsx)(k,{zoom:c,onZoom:this.handleZoom,onReset:this.handleReset})]})})}}],function(e,n){for(var t=0;ti,b_:()=>a,fF:()=>c,lm:()=>r,wM:()=>l});var r={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"}},i=[{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"}],o=[{id:"o2",name:"Oxygen",label:"O₂",color:"blue"},{id:"n2",name:"Nitrogen",label:"N₂",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO₂",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H₂O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N₂O",color:"red"},{id:"no2",name:"Nitryl",label:"NO₂",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₂",color:"#997379"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}],l=function(e,n){var t=String(e).toLowerCase(),r=o.find(function(e){return e.id===t||e.name.toLowerCase()===t});return r&&r.label||n||e},a=function(e){var n=String(e).toLowerCase(),t=o.find(function(e){return e.id===n||e.name.toLowerCase()===n});return t&&t.color},c=function(e,n){if(e>n)return"in the future";var t=(n/=10)-(e/=10);if(t>3600){var r=Math.round(t/3600);return r+" hour"+(1===r?"":"s")+" ago"}if(t>60){var i=Math.round(t/60);return i+" minute"+(1===i?"":"s")+" ago"}var o=Math.round(t);return o+" second"+(1===o?"":"s")+" ago"}},4981:function(e,n,t){"use strict";t(8138),t(7218),t(4530),t(7790),t(3384),t(937)},7218:function(e,n,t){"use strict";t.d(n,{D:()=>r});var r=(0,t(4530).createContext)(["",function(e){}])},3123:function(e,n,t){"use strict";var r=t(5900);(0,r.VP)("debug/toggleKitchenSink"),(0,r.VP)("debug/toggleDebugLayout"),(0,r.VP)("debug/openExternalBrowser")},9216:function(e,n,t){"use strict";t.d(n,{L:()=>o});var r=t(2864),i=t(8318);function o(){return(0,r.d4)(i.m)}},1956:function(e,n,t){"use strict";t.d(n,{A$:()=>i.A,Lo:()=>r.L});var r=t(9216);t(4981),t(2550);var i=t(8408)},2550:function(e,n,t){"use strict";t(1128),t(1874),t(3123)},8408:function(e,n,t){"use strict";function r(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=n.type;return"debug/toggleKitchenSink"===t?i(r({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===t?i(r({},e),{debugLayout:!e.debugLayout}):e}t.d(n,{A:()=>o})},8318:function(e,n,t){"use strict";function r(e){return e.debug}t.d(n,{m:()=>r})},6400:function(e,n,t){"use strict";t.d(n,{BF:()=>z,C8:()=>P,MN:()=>E,nZ:()=>R,y9:()=>w});var r,i,o,l,a,c,s=t(1699),u=t(6183);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]2&&void 0!==arguments[2]?arguments[2]:50,i=[n],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return h(function(){var n,t,r,o,l;return p(this,function(a){switch(a.label){case 0:if(!(t=e.fancy))return[3,2];return[4,s.IG.get(j)];case 1:t=a.sent(),a.label=2;case 2:return(n=t)&&x.log("recalled geometry:",n),r=(null==n?void 0:n.pos)||e.pos,o=e.size,e.scale&&o&&(o=[o[0]*g,o[1]*g]),e.scale?(document.body.style.zoom="",document.documentElement.style.setProperty("--scaling-amount",null)):(document.body.style.zoom="".concat(100/window.devicePixelRatio,"%"),document.documentElement.style.setProperty("--scaling-amount",window.devicePixelRatio.toString())),[4,i];case 3:return a.sent(),l=S(),o&&I(o=[Math.min(l[0],o[0]),Math.min(l[1],o[1])]),r?(o&&e.locked&&(r=B(r,o)[1]),C(r)):o&&C(r=(0,u.CO)((0,u.Xd)(l,.5),(0,u.Xd)(o,-.5),(0,u.Xd)(v,-1))),[2]}})})()},E=function(){return h(function(){var e;return p(this,function(n){switch(n.label){case 0:return e=k(),[4,i=Byond.winget(Byond.windowId,"pos").then(function(n){return[n.x-e[0],n.y-e[1]]})];case 1:return v=n.sent(),x.debug("screen offset",v),[2]}})})()},B=function(e,n){for(var t=[0-v[0],0-v[1]],r=S(),i=[e[0],e[1]],o=!1,l=0;l<2;l++){var a=t[l],c=t[l]+r[l];e[l]c&&(i[l]=c-n[l],o=!0)}return[o,i]},z=function(e){var n;x.log("drag start"),b=!0,o=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),null==(n=e.target)||n.focus(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",T),N(e)},T=function(e){x.log("drag end"),N(e),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",T),b=!1,A()},N=function(e){b&&(e.preventDefault(),C((0,u.Z4)([e.screenX*g,e.screenY*g],o)))},R=function(e,n){return function(t){var r;l=[e,n],x.log("resize start",l),y=!0,o=(0,u.Z4)([t.screenX*g,t.screenY*g],k()),a=_(),null==(r=t.target)||r.focus(),document.addEventListener("mousemove",$),document.addEventListener("mouseup",D),$(t)}},D=function(e){x.log("resize end",c),$(e),document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",D),y=!1,A()},$=function(e){if(y){e.preventDefault();var n=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),t=(0,u.Z4)(n,o);(c=(0,u.CO)(a,(0,u.tk)(l,t),[1,1]))[0]=Math.max(c[0],150*g),c[1]=Math.max(c[1],50*g),I(c)}}},1604:function(e,n,t){"use strict";t.d(n,{$:()=>r});var r=function(){Byond.winset("paramapwindow.map",{focus:!0})}},9609:function(e,n,t){"use strict";t.r(n),t.d(n,{AICard:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(0===a.has_ai)return(0,r.jsx)(l.p8,{width:250,height:120,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Stored AI",children:(0,r.jsx)(i.az,{children:(0,r.jsx)("h3",{children:"No AI detected."})})})})});var c=null;return c=a.integrity>=75?"green":a.integrity>=25?"yellow":"red",(0,r.jsx)(l.p8,{width:600,height:420,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:a.name,children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:c,value:a.integrity/100})})}),(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h2",{children:1===a.flushing?"Wipe of AI in progress...":""})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{width:10,icon:a.wireless?"check":"times",content:a.wireless?"Enabled":"Disabled",color:a.wireless?"green":"red",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{width:10,icon:a.radio?"check":"times",content:a.radio?"Enabled":"Disabled",color:a.radio?"green":"red",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Wipe",children:(0,r.jsx)(i.$n.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:a.flushing||0===a.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return t("wipe")}})})]})})})]})})})}},1664:function(e,n,t){"use strict";t.r(n),t.d(n,{AIControllerDebugger:()=>u,CopyableValue:()=>c,ObjectReference:()=>s});var r=t(8138),i=t(9856),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=e.text;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{icon:"clipboard-list",onClick:function(){return navigator.clipboard.writeText(n)}}),(0,r.jsx)("span",{style:{fontFamily:"monospace"},children:n})]})},s=function(e){var n=(0,l.Oc)().act,t=e.obj_ref;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return n("vv",{uid:t.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return n("flw",{uid:t.uid})},children:"FLW"}),"\xa0",t.name]})},u=function(e){var n=(0,l.Oc)(),t=n.data,u=n.act,d=t.controller;return(0,r.jsx)(a.p8,{width:675,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.wn,{title:"Basic Info",children:(0,r.jsxs)(o.XI,{children:[d.pawn&&(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Pawn"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.pawn})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Status"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.ai_status})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Type"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.type})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Idle Behavior"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.idle_behavior})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Delay"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_delay})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Able to Plan"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.able_to_plan?"Yes":"No"})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"On Failed Planning Timeout"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.on_failed_planning_timeout?"Yes":"No"})})]}),d.movement_target&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Target"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.movement_target})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Target Source"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_target.source})})]})]})]})}),(0,r.jsx)(o.wn,{title:"Blackboard",children:(0,r.jsx)(o.XI,{className:"AIControllerDebugger__Blackboard",children:d.blackboard.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name.length>30?(0,r.jsx)(o.m_,{content:e.name,children:(0,r.jsx)(o.az,{children:(0,i.truncate)(e.name)})}):e.name}),(0,r.jsxs)(o.XI.Cell,{className:"bb_value",children:[e.uid&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return u("vv",{uid:e.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return u("flw",{uid:e.uid})},children:"FLW"}),"\xa0"]}),e.value||"null"]})]},e.name)})})}),(0,r.jsx)(o.wn,{title:"Current Behaviors",children:(0,r.jsx)(o.XI,{children:d.current_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})}),(0,r.jsx)(o.wn,{title:"Planned Behaviors",children:(0,r.jsx)(o.XI,{children:d.planned_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})})]})})})}},8679:function(e,n,t){"use strict";t.r(n),t.d(n,{AIFixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(null===a.occupant)return(0,r.jsx)(l.p8,{width:550,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stored AI",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"robot",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),(0,r.jsx)("h3",{children:"No Artificial Intelligence detected."})]})})})})});var c=!0;(2===a.stat||null===a.stat)&&(c=!1);var s=null;s=a.integrity>=75?"green":a.integrity>=25?"yellow":"red";var u=!0;return a.integrity>=100&&2!==a.stat&&(u=!1),(0,r.jsx)(l.p8,{children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:a.occupant,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:s,value:a.integrity/100})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{inline:!0,children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Actions",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{icon:a.wireless?"times":"check",content:a.wireless?"Disabled":"Enabled",color:a.wireless?"red":"green",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{icon:a.radio?"times":"check",content:a.radio?"Disabled":"Enabled",color:a.radio?"red":"green",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Start Repairs",children:(0,r.jsx)(i.$n,{icon:"wrench",disabled:!u||a.active,content:!u||a.active?"Already Repaired":"Repair",onClick:function(){return t("fix")}})})]}),(0,r.jsx)(i.az,{color:"green",lineHeight:2,children:a.active?"Reconstruction in progress.":""})]})})]})})})}},5233:function(e,n,t){"use strict";t.r(n),t.d(n,{AIProgramPicker:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.program_list,s=a.ai_info;return(0,r.jsx)(l.p8,{width:450,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Select Program",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory Available",children:s.memory}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth Available",children:s.bandwidth})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(i.$n,{icon:"file",onClick:function(){return t("select",{uid:e.UID})},children:1===e.installed?"Update":"Install"}),children:(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.BJ.Item,{mb:2,children:(0,r.jsx)(i.Ki.Item,{label:"Description",children:e.description})}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:1===e.installed?"Bandwidth Cost":"Memory Cost",children:e.memory_cost}),(0,r.jsx)(i.Ki.Item,{label:"Upgrade Level",children:e.upgrade_level})]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:"Installed",children:1===e.installed?"True":"False"}),(0,r.jsx)(i.Ki.Item,{label:"Passive",children:1===e.is_passive?"True":"False"})]})]})]})})},e)})})]})})})}},9991:function(e,n,t){"use strict";t.r(n),t.d(n,{AIResourceManagementConsole:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n,t=(0,l.Oc)().data.screen;return 0===t?n=(0,r.jsx)(u,{}):1===t&&(n=(0,r.jsx)(d,{})),n},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data;o.auth,o.ai_list,o.nodes_list;var s=o.screen;return(0,r.jsx)(a.p8,{width:350,height:425,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:0===s,icon:"list",onClick:function(){return t("menu",{screen:0})},children:"Allocated Resources"}),(0,r.jsx)(i.tU.Tab,{selected:1===s,icon:"circle-nodes",onClick:function(){return t("menu",{screen:1})},children:"Online Nodes"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{})})})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.screen;var o=t.ai_list;return t.nodes_list,(0,r.jsxs)(i.az,{children:[(!o||0===o.length)&&(0,r.jsx)(i.IC,{children:"No AI detected."}),!!o&&o.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory",children:e.memory}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Memory",children:e.memory_max}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth",children:e.bandwidth}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Bandwidth",children:e.bandwidth_max})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data;a.screen,a.ai_list;var c=a.nodes_list;return(0,r.jsxs)(i.az,{children:[(!c||0===c.length)&&(0,r.jsx)(i.IC,{children:"No nodes detected."}),!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),buttons:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"circle-nodes",onClick:function(){return t("reassign",{uid:e.uid})},children:"Reassign"})}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Assigned AI",children:e.assigned_ai}),(0,r.jsx)(i.Ki.Item,{label:"Resource",children:(0,o.ZH)(e.resource)}),(0,r.jsx)(i.Ki.Item,{label:"Amount",children:e.amount})]})},e)})]})}},731:function(e,n,t){"use strict";t.r(n),t.d(n,{APC:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(1992),c=function(e){return(0,r.jsx)(l.p8,{width:510,height:435,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(d,{})})})},s={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"}},u={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"}},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.locked&&!l.siliconUser;l.normallyLocked;var d=s[l.externalPower]||s[0],f=s[l.chargingStatus]||s[0],h=l.powerChannels||[],m=u[l.malfStatus]||u[0],p=l.powerCellStatus/100;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.InterfaceLockNoticeBox,{}),(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main Breaker",color:d.color,buttons:(0,r.jsx)(i.$n,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!c,color:l.isOperating?"":"bad",disabled:c,onClick:function(){return t("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,r.jsx)(i.Ki.Item,{label:"Power Cell",children:(0,r.jsx)(i.z2,{color:"good",value:p})}),(0,r.jsxs)(i.Ki.Item,{label:"Charge Mode",color:f.color,buttons:(0,r.jsx)(i.$n,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:c,onClick:function(){return t("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,r.jsx)(i.wn,{title:"Power Channels",children:(0,r.jsxs)(i.Ki,{children:[h.map(function(e){var n=e.topicParams;return(0,r.jsxs)(i.Ki.Item,{label:e.title,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:!c&&(1===e.status||3===e.status),disabled:c,onClick:function(){return t("channel",n.auto)}}),(0,r.jsx)(i.$n,{icon:"power-off",content:"On",selected:!c&&2===e.status,disabled:c,onClick:function(){return t("channel",n.on)}}),(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:!c&&0===e.status,disabled:c,onClick:function(){return t("channel",n.off)}})]}),children:[e.powerLoad," W"]},e.title)}),(0,r.jsx)(i.Ki.Item,{label:"Total Load",children:(0,r.jsxs)("b",{children:[l.totalLoad," W"]})})]})}),(0,r.jsx)(i.wn,{title:"Misc",buttons:!!l.siliconUser&&(0,r.jsxs)(r.Fragment,{children:[!!l.malfStatus&&(0,r.jsx)(i.$n,{icon:m.icon,content:m.content,color:"bad",onClick:function(){return t(m.action)}}),(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:"Overload",onClick:function(){return t("overload")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cover Lock",buttons:(0,r.jsx)(i.$n,{mb:.4,icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:c,onClick:function(){return t("cover")}})}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Lighting",buttons:(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",disabled:c,onClick:function(){return t("emergency_lighting")}})}),(0,r.jsx)(i.Ki.Item,{label:"Night Shift Lighting",buttons:(0,r.jsx)(i.$n,{mt:.4,icon:"lightbulb-o",content:l.nightshiftLights?"Enabled":"Disabled",onClick:function(){return t("toggle_nightshift")}})})]})})]})}},6181:function(e,n,t){"use strict";t.r(n),t.d(n,{ATM:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(g)if(s)switch(c){case 1:n=(0,r.jsx)(f,{});break;case 2:n=(0,r.jsx)(h,{});break;case 3:n=(0,r.jsx)(x,{});break;default:n=(0,r.jsx)(m,{})}else n=(0,r.jsx)(p,{});else n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,r.jsx)(a.p8,{width:550,height:650,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(o.wn,{children:n})]})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data;i.machine_id;var a=i.held_card_name;return(0,r.jsxs)(o.wn,{title:"Nanotrasen Automatic Teller Machine",children:[(0,r.jsx)(o.az,{children:"For all your monetary needs!"}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Card",children:(0,r.jsx)(o.$n,{content:a,icon:"eject",onClick:function(){return t("insert_card")}})})})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.security_level;return(0,r.jsxs)(o.wn,{title:"Select a new security level for this account",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return t("change_security_level",{new_security_level:1})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return t("change_security_level",{new_security_level:2})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},h=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=s((0,i.useState)(0),2),h=f[0],m=f[1],p=s((0,i.useState)(0),2),x=p[0],j=p[1],b=a.money;return(0,r.jsxs)(o.wn,{title:"Transfer Fund",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",b]}),(0,r.jsx)(o.Ki.Item,{label:"Target Account Number",children:(0,r.jsx)(o.pd,{placeholder:"7 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Funds to Transfer",children:(0,r.jsx)(o.pd,{onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Transaction Purpose",children:(0,r.jsx)(o.pd,{fluid:!0,onChange:function(e){return j(e)}})})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return t("transfer",{target_acc_number:u,funds_amount:h,purpose:x})}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=a.owner_name,h=a.money;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Welcome, "+f,buttons:(0,r.jsx)(o.$n,{content:"Logout",icon:"sign-out-alt",onClick:function(){return t("logout")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",h]}),(0,r.jsx)(o.Ki.Item,{label:"Withdrawal Amount",children:(0,r.jsx)(o.pd,{onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return t("withdrawal",{funds_amount:u})}})})]})}),(0,r.jsxs)(o.wn,{title:"Menu",children:[(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Change account security level",icon:"lock",onClick:function(){return t("view_screen",{view_screen:1})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return t("view_screen",{view_screen:2})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"View transaction log",icon:"list",onClick:function(){return t("view_screen",{view_screen:3})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Print balance statement",icon:"print",onClick:function(){return t("balance_statement")}})})]})]})},p=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(null),2),u=c[0],d=c[1],f=s((0,i.useState)(null),2),h=f[0],m=f[1];return a.machine_id,a.held_card_name,(0,r.jsx)(o.wn,{title:"Insert card or enter ID and pin to login",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Account ID",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Pin",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Login",icon:"sign-in-alt",onClick:function(){return t("attempt_auth",{account_num:u,account_pin:h})}})})]})})},x=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).transaction_log;return(0,r.jsxs)(o.wn,{title:"Transactions",children:[(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Timestamp"}),(0,r.jsx)(o.XI.Cell,{children:"Reason"}),(0,r.jsx)(o.XI.Cell,{children:"Value"}),(0,r.jsx)(o.XI.Cell,{children:"Terminal"})]}),t.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.time}),(0,r.jsx)(o.XI.Cell,{children:e.purpose}),(0,r.jsxs)(o.XI.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,r.jsx)(o.XI.Cell,{children:e.target_name})]},e)})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,l.Oc)(),t=n.act;return n.data,(0,r.jsx)(o.$n,{content:"Back",icon:"sign-out-alt",onClick:function(){return t("view_screen",{view_screen:0})}})}},4558:function(e,n,t){"use strict";t.r(n),t.d(n,{AccountsUplinkTerminal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(7352),u=t(736),d=t(6888),f=t(2264),h=t(4900);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(6888),u=t(2264),d=t(4900),f=function(e){switch(e){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";case 4:return"Advanced Disease Carriers";default:return"Something went wrong with this menu, make an issue report please!"}},h=function(e){switch(e){case 0:return(0,r.jsx)(j,{});case 1:return(0,r.jsx)(y,{});case 2:return(0,r.jsx)(w,{});case 3:return(0,r.jsx)(_,{});case 4:return(0,r.jsx)(I,{});default:return"Something went wrong with this menu, make an issue report please!"}},m=function(e){return(0,r.jsx)(c.p8,{width:800,height:600,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.IC,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,r.jsxs)(d.default.Default,{tabIndex:0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(p,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(x,{})})]})]})})})},p=function(){var e=(0,i.useContext)(d.default),n=e.tabIndex,t=e.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:0===n,onClick:function(){t(0)},icon:"user",children:"Antagonists"},"Antagonists"),(0,r.jsx)(o.tU.Tab,{selected:1===n,onClick:function(){t(1)},icon:"people-robbery",children:"Objectives"},"Objectives"),(0,r.jsx)(o.tU.Tab,{selected:2===n,onClick:function(){t(2)},icon:"handcuffs",children:"Security"},"Security"),(0,r.jsx)(o.tU.Tab,{selected:3===n,onClick:function(){t(3)},icon:"lock",children:"High Value Items"},"HighValueItems"),(0,r.jsx)(o.tU.Tab,{selected:4===n,onClick:function(){t(4)},icon:"virus",children:"Advanced Disease Carriers"},"AdvancedDiseaseCarriers")]})},x=function(){return(0,r.jsx)(s.default.Default,{children:(0,r.jsx)(g,{})})},g=function(){var e=(0,a.Oc)().act,n=(0,i.useContext)(d.default).tabIndex,t=(0,i.useContext)(s.default).setSearchText;return(0,r.jsx)(o.wn,{title:f(n),fill:!0,scrollable:!0,buttons:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.pd,{width:"300px",placeholder:"Search...",onChange:function(e){return t(e)}}),(0,r.jsx)(o.$n,{icon:"sync",onClick:function(){return e("refresh")},children:"Refresh"})]}),children:h(n)})},j=function(){return(0,r.jsx)(u.default.Default,{sortId:"antag_name",children:(0,r.jsx)(b,{})})},b=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.antagonists,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{id:"name",children:"Mob Name"}),(0,r.jsx)(O,{id:"",children:"Buttons"}),(0,r.jsx)(O,{id:"antag_name",children:"Antagonist Type"}),(0,r.jsx)(O,{id:"status",children:"Status"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.status+"|"+e.antag_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.body_destroyed?e.name:(0,r.jsx)(o.$n,{color:e.is_hijacker||!e.name?"red":"",tooltip:e.is_hijacker?"Hijacker":"",onClick:function(){return t("show_player_panel",{mind_uid:e.antag_mind_uid})},children:e.name?e.name:"??? (NO NAME)"})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.antag_mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.antag_mind_uid})},children:"OBS"}),(0,r.jsx)(o.$n,{onClick:function(){t("tp",{mind_uid:e.antag_mind_uid})},children:"TP"})]}),(0,r.jsx)(o.XI.Cell,{children:e.antag_name}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"red":"grey",children:e.status?e.status:"Alive"})})]},n)})]}):"No Antagonists!"},y=function(){return(0,r.jsx)(u.default.Default,{sortId:"target_name",children:(0,r.jsx)(v,{})})},v=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.objectives,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),c.filter((0,l.XZ)(d,function(e){return e.obj_name+"|"+e.target_name+"|"+(e.status?"success":"incompleted")+"|"+e.owner_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]||"target_name"===h&&e.no_target?t:void 0===n[h]||null===n[h]||"target_name"===h&&n.no_target?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.obj_uid})},children:e.obj_name})}),(0,r.jsx)(o.XI.Cell,{children:e.no_target?"":e.track.length?e.track.map(function(n,i){return(0,r.jsxs)(o.$n,{onClick:function(){return t("follow",{datum_uid:n})},children:[e.target_name," ",e.track.length>1?"("+(parseInt(i,10)+1)+")":""]},i)}):"No "+e.target_name+" Found"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"green":"grey",children:e.status?"Success":"Incomplete"})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("obj_owner",{owner_uid:e.owner_uid})},children:e.owner_name})})]},n)})]}):"No Objectives!"},w=function(){return(0,r.jsx)(u.default.Default,{sortId:"health",children:(0,r.jsx)(k,{})})},k=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.security,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder,p=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":e.broken_bone&&e.internal_bleeding?"Broken Bone, IB":e.broken_bone?"Broken Bone":e.internal_bleeding?"IB":"Alive"};return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId3",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"role",children:"Role"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"health",children:"Health"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.role+"|"+p(e)+"|"+e.antag})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.role}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:p(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.antag?(0,r.jsx)(o.$n,{textColor:"red",onClick:function(){t("tp",{mind_uid:e.mind_uid})},children:e.antag}):""}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{my:.5,minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Security!"},_=function(){return(0,r.jsx)(u.default.Default,{sortId:"person",children:(0,r.jsx)(C,{})})},C=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.high_value_items,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.loc})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.person})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.loc})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:"grey",children:e.admin_z?"On Admin Z-level":""})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.uid})},children:"FLW"})})]},n)})]}):"No High Value Items!"},I=function(){return(0,r.jsx)(u.default.Default,{sortId:"strain",children:(0,r.jsx)(S,{})})},S=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data,d=c.disease_carriers,f=c.virus_data,h=(0,i.useContext)(s.default).searchText,m=(0,i.useContext)(u.default),p=m.sortId,x=m.sortOrder,g=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":"Alive"};return d.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"virus_name",children:"Virus Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"strain",children:"Strain"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"progress",children:"Progress"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"health",children:"Health"})]}),d.filter((0,l.XZ)(h,function(e){return e.name+"||"+g(e)+"|"+e.strain+"|"+e.virus_name})).sort(function(e,n){var t=x?1:-1;return void 0===e[p]||null===e[p]?t:void 0===n[p]||null===n[p]?-1*t:"number"==typeof e[p]?(e[p]-n[p])*t:e[p].localeCompare(n[p])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{color:e.patient_zero?"red":"",onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:g(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.virus_name}),(0,r.jsx)(o.m_,{position:"right",content:"Symptoms: "+f[e.strain],children:(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.strain})},n),(0,r.jsx)(o.XI.Cell,{children:e.patient_zero?"Patient Zero":(0,r.jsx)(o.z2,{minValue:0,value:e.progress/100,maxValue:1,ranges:{good:[0,20],average:[20,60],bad:[60,100]},children:e.progress})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Disease Carriers!"},O=function(e){var n=e.id,t=(e.sort_group,e.default_sort,e.children),l=(0,i.useContext)(u.default),a=l.sortId,c=l.setSortId,s=l.sortOrder,d=l.setSortOrder;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:a!==n&&"transparent",width:"100%",onClick:function(){a===n?d(!s):(c(n),d(!0))},children:[t,a===n&&(0,r.jsx)(o.In,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},2794:function(e,n,t){"use strict";t.r(n),t.d(n,{AgentCard:()=>m,AgentCardAppearances:()=>x,AgentCardInfo:()=>p});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=a[c.power.main]||a[0],u=a[c.power.backup]||a[0],d=a[c.shock]||a[0];return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main",color:s.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){return t("disrupt-main")}}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"[".concat(c.power.main_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Backup",color:u.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){return t("disrupt-backup")}}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"[".concat(c.power.backup_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Electrify",color:d.color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&2!==c.shock),content:"Restore",onClick:function(){return t("shock-restore")}}),(0,r.jsx)(i.$n,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){return t("shock-temp")}}),(0,r.jsx)(i.$n,{icon:"bolt",disabled:!c.wires.shock||0===c.shock,content:"Permanent",onClick:function(){return t("shock-perm")}})]}),children:[2===c.shock?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"[".concat(c.shock_timeleft,"s]")||-1===c.shock_timeleft&&"[Permanent]"]})]})}),(0,r.jsx)(i.wn,{title:"Access and Door Control",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Scan",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){return t("idscan-toggle")}}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Access",buttons:(0,r.jsx)(i.$n,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){return t("emergency-toggle")}})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolts",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){return t("bolt-toggle")}}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){return t("light-toggle")}}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){return t("safe-toggle")}}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){return t("speed-toggle")}}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Control",color:"bad",buttons:(0,r.jsx)(i.$n,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){return t("open-close")}}),children:!!(c.locked||c.welded)&&(0,r.jsxs)("span",{children:["[Door is ",c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"","!]"]})})]})})]})})}},5486:function(e,n,t){"use strict";t.r(n),t.d(n,{AirAlarm:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1992),s=t(4900),u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).locked;return(0,r.jsx)(a.p8,{width:570,height:t?310:755,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(c.InterfaceLockNoticeBox,{}),(0,r.jsx)(f,{}),!t&&(0,r.jsxs)(s.default.Default,{tabIndex:0,children:[(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})]})})},d=function(e){return 0===e?"green":1===e?"orange":"red"},f=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.air,s=a.mode,u=a.atmos_alarm,f=a.locked,h=a.alarmActivated,m=a.fireAlarmActivated,p=a.rcon,x=a.target_temp;return n=0===c.danger.overall?0===u?"Optimal":"Caution: Atmos alert in area":1===c.danger.overall?"Caution":"DANGER: Internals Required",(0,r.jsx)(o.wn,{title:"Air Status",children:c?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Pressure",children:(0,r.jsxs)(o.az,{color:d(c.danger.pressure),children:[(0,r.jsx)(o.zv,{value:c.pressure})," kPa",!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{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})}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Oxygen",children:(0,r.jsx)(o.z2,{value:c.contents.oxygen/100,fractionDigits:"1",color:d(c.danger.oxygen)})}),(0,r.jsx)(o.Ki.Item,{label:"Nitrogen",children:(0,r.jsx)(o.z2,{value:c.contents.nitrogen/100,fractionDigits:"1",color:d(c.danger.nitrogen)})}),(0,r.jsx)(o.Ki.Item,{label:"Carbon Dioxide",children:(0,r.jsx)(o.z2,{value:c.contents.co2/100,fractionDigits:"1",color:d(c.danger.co2)})}),(0,r.jsx)(o.Ki.Item,{label:"Toxins",children:(0,r.jsx)(o.z2,{value:c.contents.plasma/100,fractionDigits:"1",color:d(c.danger.plasma)})}),c.contents.n2o>.1&&(0,r.jsx)(o.Ki.Item,{label:"Nitrous Oxide",children:(0,r.jsx)(o.z2,{value:c.contents.n2o/100,fractionDigits:"1",color:d(c.danger.n2o)})}),c.contents.h2>.1&&(0,r.jsx)(o.Ki.Item,{label:"Hydrogen",children:(0,r.jsx)(o.z2,{value:c.contents.h2/100,fractionDigits:"1",color:d(c.danger.h2)})}),c.contents.water_vapor>.1&&(0,r.jsx)(o.Ki.Item,{label:"Water Vapor",children:(0,r.jsx)(o.z2,{value:c.contents.water_vapor/100,fractionDigits:"1",color:d(c.danger.water_vapor)})}),c.contents.other>.1&&(0,r.jsx)(o.Ki.Item,{label:"Other",children:(0,r.jsx)(o.z2,{value:c.contents.other/100,fractionDigits:"1",color:d(c.danger.other)})}),(0,r.jsx)(o.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(o.az,{color:d(c.danger.temperature),children:[(0,r.jsx)(o.zv,{value:c.temperature})," K / ",(0,r.jsx)(o.zv,{value:c.temperature_c})," C\xa0",(0,r.jsx)(o.$n,{icon:"thermometer-full",content:x+" C",onClick:function(){return i("temperature")}}),(0,r.jsx)(o.$n,{content:c.thermostat_state?"On":"Off",selected:c.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,r.jsx)(o.Ki.Item,{label:"Local Status",children:(0,r.jsxs)(o.az,{color:d(c.danger.overall),children:[n,!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Fire Alarm Status",children:!f&&(0,r.jsx)(o.$n,{content:m?"Reset Fire Alarm":"Activate Fire Alarm",selected:m,onClick:function(){return i("set_fire_alarm")}})}),(0,r.jsxs)(o.Ki.Item,{label:"Remote Control Settings",children:[(0,r.jsx)(o.$n,{content:"Off",selected:1===p,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,r.jsx)(o.$n,{content:"Auto",selected:2===p,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,r.jsx)(o.$n,{content:"On",selected:3===p,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,r.jsx)(o.az,{children:"Unable to acquire air sample!"})})},h=function(e){var n=(0,i.useContext)(s.default),t=n.tabIndex,l=n.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsxs)(o.tU.Tab,{selected:0===t,onClick:function(){return l(0)},children:[(0,r.jsx)(o.In,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,r.jsxs)(o.tU.Tab,{selected:1===t,onClick:function(){return l(1)},children:[(0,r.jsx)(o.In,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,r.jsxs)(o.tU.Tab,{selected:2===t,onClick:function(){return l(2)},children:[(0,r.jsx)(o.In,{name:"cog"})," Mode"]},"Mode"),(0,r.jsxs)(o.tU.Tab,{selected:3===t,onClick:function(){return l(3)},children:[(0,r.jsx)(o.In,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},m=function(e){switch((0,i.useContext)(s.default).tabIndex){case 0:return(0,r.jsx)(p,{});case 1:return(0,r.jsx)(x,{});case 2:return(0,r.jsx)(g,{});case 3:return(0,r.jsx)(j,{});default:return"WE SHOULDN'T BE HERE!"}},p=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.vents.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.direction?"Blowing":"Siphoning",icon:e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return t("command",{cmd:"direction",val:!e.direction,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(o.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"External Pressure Target",children:[(0,r.jsx)(o.zv,{value:e.external})," kPa\xa0",(0,r.jsx)(o.$n,{content:"Set",icon:"cog",onClick:function(){return t("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Reset",icon:"redo-alt",onClick:function(){return t("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)})},x=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubbers.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",val:!e.scrubbing,id_tag:e.id_tag})}})]}),(0,r.jsx)(o.Ki.Item,{label:"Range",children:(0,r.jsx)(o.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",val:!e.widenet,id_tag:e.id_tag})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(o.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",val:!e.filter_co2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",val:!e.filter_toxins,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",val:!e.filter_n2o,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",val:!e.filter_o2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",val:!e.filter_n2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",val:!e.filter_h2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",val:!e.filter_h2o,id_tag:e.id_tag})}})]})]})},e.name)})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.modes,c=i.presets,s=i.emagged,u=i.mode,d=i.preset;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"System Mode",children:Object.keys(a).map(function(e){var n=a[e];if(!n.emagonly||s)return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:n.name,icon:"cog",selected:n.id===u,onClick:function(){return t("mode",{mode:n.id})}})}),(0,r.jsx)(o.XI.Cell,{children:n.desc})]},n.name)})}),(0,r.jsxs)(o.wn,{title:"System Presets",children:[(0,r.jsx)(o.az,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,r.jsx)(o.XI,{mt:1,children:c.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:e.name,icon:"cog",selected:e.id===d,onClick:function(){return t("preset",{preset:e.id})}})}),(0,r.jsx)(o.XI.Cell,{children:e.desc})]},e.name)})})]})]})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.thresholds;return(0,r.jsx)(o.wn,{title:"Alarm Thresholds",children:(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{width:"20%",children:"Value"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),e.settings.map(function(e){return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:-1===e.selected?"Off":e.selected,onClick:function(){return t("command",{cmd:"set_threshold",env:e.env,var:e.val})}})},e.val)})]},e.name)})]})})}},6962:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockAccessController:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.exterior_status,d=s.interior_status,f=s.processing;return n="open"===u?(0,r.jsx)(i.$n,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:f,onClick:function(){return c("force_ext")}}):(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:f,onClick:function(){return c("cycle_ext_door")}}),t="open"===d?(0,r.jsx)(i.$n,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:f,color:"open"===d?"red":f?"yellow":null,onClick:function(){return c("force_int")}}):(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:f,onClick:function(){return c("cycle_int_door")}}),(0,r.jsx)(l.p8,{width:330,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Door Status",children:"closed"===u?"Locked":"Open"}),(0,r.jsx)(i.Ki.Item,{label:"Internal Door Status",children:"closed"===d?"Locked":"Open"})]})}),(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.az,{children:[n,t]})})]})})}},9281:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockElectronics:()=>c,ChooseAccess:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){return(0,r.jsx)(l.p8,{width:500,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.unrestricted_dir;return(0,r.jsx)(i.wn,{title:"Access Control",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&l,onClick:function(){return t("unrestricted_access",{unres_dir:4})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&l,onClick:function(){return t("unrestricted_access",{unres_dir:2})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&l,onClick:function(){return t("unrestricted_access",{unres_dir:8})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&l,onClick:function(){return t("unrestricted_access",{unres_dir:1})}})})]})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.selected_accesses,s=l.one_access,u=l.regions;return(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(r.Fragment,{}),grantableList:[],usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return t("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,content:"All",onClick:function(){return t("set_one_access",{access:"all"})}})]}),accesses:u,selectedList:c,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}},934:function(e,n,t){"use strict";t.r(n),t.d(n,{AlertModal:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t30?Math.ceil(b.length/4):0)+(b.length&&g?5:0),I=325+100*(x.length>2),S=function(e){0===k&&-1===e?_(x.length-1):k===x.length-1&&1===e?_(0):_(k+e)};return(0,r.jsxs)(c.p8,{title:v,height:C,width:I,children:[!!y&&(0,r.jsx)(s.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.iy||n===l.Ri?d("choose",{choice:x[k]}):n===l.s6?d("cancel"):n===l.iU?(e.preventDefault(),S(-1)):(n===l.aW||n===l.zh)&&(e.preventDefault(),S(1))},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,m:1,children:(0,r.jsx)(o.az,{color:"label",overflow:"hidden",children:b})}),(0,r.jsxs)(o.BJ.Item,{children:[!!m&&(0,r.jsx)(o.y5,{}),(0,r.jsx)(f,{selected:k})]})]})})})]})},f=function(e){var n=(0,a.Oc)().data,t=n.buttons,i=void 0===t?[]:t,l=n.large_buttons,c=n.swapped_buttons,s=e.selected;return(0,r.jsx)(o.so,{fill:!0,align:"center",direction:c?"row":"row-reverse",justify:"space-around",wrap:!0,children:null==i?void 0:i.map(function(e,n){return l&&i.length<3?(0,r.jsx)(o.so.Item,{grow:!0,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n):(0,r.jsx)(o.so.Item,{grow:+!!l,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n)})})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.large_buttons,l=e.button,c=e.selected,s=l.length>7?"100%":7;return(0,r.jsx)(o.$n,{mx:+!!i,pt:.33*!!i,content:l,fluid:!!i,onClick:function(){return t("choose",{choice:l})},selected:c,textAlign:"center",height:!!i&&2,width:!i&&s})}},2712:function(e,n,t){"use strict";t.r(n),t.d(n,{AntagInfoHeretic:()=>y});var r=t(8138),i=t(4530),o=t(2864),l=t(7790),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?e.cost:"FREE")})]}),!!e.ascension&&(0,r.jsx)(l.az,{textAlign:"center",fontSize:"32px",children:(0,r.jsx)("span",{style:d,children:"DUSK"})})]},e.name)})}),(0,r.jsx)("hr",{})]},n)})})]})},b=function(){var e=(0,o.Oc)().data.charges;return(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsxs)(l.az,{textAlign:"center",fontSize:"20px",mb:1,children:["You have ",(0,r.jsx)("b",{children:e||0}),"\xa0",(0,r.jsxs)("span",{style:u,children:["knowledge point",1!==e?"s":""]})," to spend."]}),(0,r.jsx)(l.so.Item,{grow:!0,children:(0,r.jsx)(j,{})})]})},y=function(){var e,n=(0,o.Oc)().data.ascended,t=(e=(0,i.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,2)||function(e,n){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=t[0],u=t[1];return(0,r.jsx)(a.p8,{width:675,height:635,children:(0,r.jsx)(a.p8.Content,{style:{backgroundImage:"none",background:n?"radial-gradient(circle, rgba(24,9,9,1) 54%, rgba(31,10,10,1) 60%, rgba(46,11,11,1) 80%, rgba(47,14,14,1) 100%);":"radial-gradient(circle, rgba(9,9,24,1) 54%, rgba(10,10,31,1) 60%, rgba(21,11,46,1) 80%, rgba(24,14,47,1) 100%);"},children:(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsx)(l.so.Item,{children:(0,r.jsxs)(l.tU,{fluid:!0,children:[(0,r.jsx)(l.tU.Tab,{icon:"info",selected:0===s,onClick:function(){return u(0)},children:"Information"}),(0,r.jsx)(l.tU.Tab,{icon:1===s?"book-open":"book",selected:1===s,onClick:function(){return u(1)},children:"Research"})]})}),(0,r.jsx)(l.so.Item,{grow:!0,children:0===s?(0,r.jsx)(m,{}):(0,r.jsx)(b,{})})]})})})}},6473:function(e,n,t){"use strict";t.r(n),t.d(n,{AppearanceChanger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.change_race,u=a.species,d=a.specimen,f=a.change_gender,h=a.gender,m=a.change_eye_color,p=a.change_skin_tone,x=a.change_skin_color,g=a.change_runechat_color,j=a.change_head_accessory_color,b=a.change_hair_color,y=a.change_secondary_hair_color,v=a.change_facial_hair_color,w=a.change_secondary_facial_hair_color,k=a.change_head_marking_color,_=a.change_body_marking_color,C=a.change_tail_marking_color,I=a.change_head_accessory,S=a.head_accessory_styles,O=a.head_accessory_style,A=a.change_hair,P=a.hair_styles,E=a.hair_style,B=a.change_hair_gradient,z=a.change_facial_hair,T=a.facial_hair_styles,N=a.facial_hair_style,R=a.change_head_markings,D=a.head_marking_styles,$=a.head_marking_style,M=a.change_body_markings,L=a.body_marking_styles,K=a.body_marking_style,J=a.change_tail_markings,X=a.tail_marking_styles,U=a.tail_marking_style,F=a.change_body_accessory,V=a.body_accessory_styles,H=a.body_accessory_style,W=a.change_alt_head,q=a.alt_head_styles,G=a.alt_head_style,Y=!1;return(m||p||x||j||g||b||y||v||w||k||_||C)&&(Y=!0),(0,r.jsx)(l.p8,{width:800,height:450,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[!!s&&(0,r.jsx)(i.Ki.Item,{label:"Species",children:u.map(function(e){return(0,r.jsx)(i.$n,{content:e.specimen,selected:e.specimen===d,onClick:function(){return t("race",{race:e.specimen})}},e.specimen)})}),!!f&&(0,r.jsxs)(i.Ki.Item,{label:"Gender",children:[(0,r.jsx)(i.$n,{content:"Male",selected:"male"===h,onClick:function(){return t("gender",{gender:"male"})}}),(0,r.jsx)(i.$n,{content:"Female",selected:"female"===h,onClick:function(){return t("gender",{gender:"female"})}}),(0,r.jsx)(i.$n,{content:"Genderless",selected:"plural"===h,onClick:function(){return t("gender",{gender:"plural"})}})]}),!!Y&&(0,r.jsx)(c,{}),!!I&&(0,r.jsx)(i.Ki.Item,{label:"Head accessory",children:S.map(function(e){return(0,r.jsx)(i.$n,{content:e.headaccessorystyle,selected:e.headaccessorystyle===O,onClick:function(){return t("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)})}),!!A&&(0,r.jsx)(i.Ki.Item,{label:"Hair",children:P.map(function(e){return(0,r.jsx)(i.$n,{content:e.hairstyle,selected:e.hairstyle===E,onClick:function(){return t("hair",{hair:e.hairstyle})}},e.hairstyle)})}),!!B&&(0,r.jsxs)(i.Ki.Item,{label:"Hair Gradient",children:[(0,r.jsx)(i.$n,{content:"Change Style",onClick:function(){return t("hair_gradient")}}),(0,r.jsx)(i.$n,{content:"Change Offset",onClick:function(){return t("hair_gradient_offset")}}),(0,r.jsx)(i.$n,{content:"Change Color",onClick:function(){return t("hair_gradient_colour")}}),(0,r.jsx)(i.$n,{content:"Change Alpha",onClick:function(){return t("hair_gradient_alpha")}})]}),!!z&&(0,r.jsx)(i.Ki.Item,{label:"Facial hair",children:T.map(function(e){return(0,r.jsx)(i.$n,{content:e.facialhairstyle,selected:e.facialhairstyle===N,onClick:function(){return t("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)})}),!!R&&(0,r.jsx)(i.Ki.Item,{label:"Head markings",children:D.map(function(e){return(0,r.jsx)(i.$n,{content:e.headmarkingstyle,selected:e.headmarkingstyle===$,onClick:function(){return t("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)})}),!!M&&(0,r.jsx)(i.Ki.Item,{label:"Body markings",children:L.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===K,onClick:function(){return t("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)})}),!!J&&(0,r.jsx)(i.Ki.Item,{label:"Tail markings",children:X.map(function(e){return(0,r.jsx)(i.$n,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===U,onClick:function(){return t("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)})}),!!F&&(0,r.jsx)(i.Ki.Item,{label:"Body accessory",children:V.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===H,onClick:function(){return t("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)})}),!!W&&(0,r.jsx)(i.Ki.Item,{label:"Alternate head",children:q.map(function(e){return(0,r.jsx)(i.$n,{content:e.altheadstyle,selected:e.altheadstyle===G,onClick:function(){return t("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.Ki.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_runechat_color",text:"Change runechat color",action:"runechat_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!!l[e.key]&&(0,r.jsx)(i.$n,{content:e.text,onClick:function(){return t(e.action)}},e.key)})})}},6085:function(e,n,t){"use strict";t.r(n),t.d(n,{ArcadeBattle:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e,n){var t=(0,o.Oc)(),a=t.act,c=t.data,s=c.enemyName,u=c.playerHP,d=c.playerMaxHP,f=c.playerMP,h=c.playerMaxMP,m=c.enemyHP,p=c.enemyMaxHP,x=c.onCooldown,g=c.gameOver,j=c.previousEvent;return g?(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,align:"center",title:m<1?"Rejoyce!":"Game Over!",children:(0,r.jsxs)(i.BJ,{justify:"space-between",vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:j})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(i.$n,{bold:!0,fluid:!0,height:"100%",fontSize:"min(8vw, 15vh)",textAlign:"center",verticalAlignContent:"middle",onClick:function(){return a("newgame")},children:"New Game"})})]})})})}):(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:s,children:(0,r.jsxs)(i.z2,{maxValue:p,minValue:0,value:m,ranges:{red:[-10,10],orange:[10,20],green:[20,p]},children:["Their Health: ",m]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Fight!",children:j})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"You",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:d,minValue:0,value:u,ranges:{red:[-10,10],orange:[10,20],green:[20,d]},children:["Your Health: ",u]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:h,minValue:0,value:f,ranges:{red:[-10,h/4],orange:[h/4,h/2],green:[h/2,h]},children:["Your Magic: ",f]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{bold:!0,align:"center",children:"What will you do?"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"burst",lineHeight:3,onClick:function(){return a("attack")},disabled:x,children:"Attack"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"plus",lineHeight:3,onClick:function(){return a("heal")},disabled:x,children:"Heal"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"star",lineHeight:3,onClick:function(){return a("charge")},disabled:x,children:"Recharge"})})]})})]})})})]})})})}},3438:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosAlertConsole:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.pressure,u=a.max_pressure,d=a.filter_type,f=a.filter_type_list;return(0,r.jsx)(l.p8,{width:380,height:160,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:s,tickWhileDragging:!0,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Filter",children:f.map(function(e){return(0,r.jsx)(i.$n,{selected:e.gas_type===d,content:e.label,onClick:function(){return t("set_filter",{filter:e.gas_type})}},e.label)})})]})})})})}},7440:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosMixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.on,u=a.pressure,d=a.max_pressure,f=a.node1_concentration,h=a.node2_concentration;return(0,r.jsx)(l.p8,{width:330,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(c,{node_name:"Node 1",node_ref:f}),(0,r.jsx)(c,{node_name:"Node 2",node_ref:h})]})})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.node_name,a=e.node_ref;return(0,r.jsxs)(i.Ki.Item,{label:l,children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a-10)/100})}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,step:1,stepPixelSize:10,minValue:0,maxValue:100,value:a,onChange:function(e){return t("set_node",{node_name:l,concentration:e/100})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a+10)/100})}})]})}},7897:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosPump:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.rate,u=a.max_rate,d=a.gas_unit,f=a.step;return(0,r.jsx)(l.p8,{width:330,height:110,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_rate")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_rate",{rate:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_rate")}})]})]})})})})}},1164:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTankControl:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.sensors||{};return(0,r.jsx)(c.p8,{width:400,height:435,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[Object.keys(d).map(function(e){return(0,r.jsx)(i.wn,{title:e,children:(0,r.jsxs)(i.Ki,{children:[Object.keys(d[e]).indexOf("pressure")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[d[e].pressure," kpa"]}):"",Object.keys(d[e]).indexOf("temperature")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[d[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o","h2"].map(function(n){return Object.keys(d[e]).indexOf(n)>-1?(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(n),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(n),value:d[e][n],minValue:0,maxValue:100,children:(0,o.Mg)(d[e][n],2)+"%"})},(0,a.wM)(n)):""})]})},e)}),(0,r.jsx)(i.wn,{title:"Inlets",children:s.inlets&&Object.keys(s.inlets).length>0?s.inlets.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_inlet_active",{dev:e.uid})}})}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:e.rate,onChange:function(n){return t("set_inlet_volume_rate",{dev:e.uid,val:n})}})})]})},e)}):""}),(0,r.jsxs)(i.wn,{title:"Outlets",children:[s.vent_outlets&&Object.keys(s.vent_outlets).length>0?s.vent_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_outlet_active",{dev:e.uid})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(i.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:1})}}),(0,r.jsx)(i.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:2})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:e.rate,onChange:function(n){return t("set_outlet_pressure",{dev:e.uid,val:n})}})})]})},e)}):"",s.scrubber_outlets&&Object.keys(s.scrubber_outlets).length>0?(0,r.jsx)(u,{}):""]})]})})},u=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubber_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[(0,r.jsx)(i.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",id_tag:e.id_tag})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Range",children:(0,r.jsx)(i.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",id_tag:e.id_tag})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(i.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",id_tag:e.id_tag})}})]})]})},e.name)})}},8340:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTemperatureGate:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.temperature,u=a.max_temp,d=a.temp_unit,f=a.step,h=a.inverted;return(0,r.jsx)(l.p8,{width:330,height:130,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inverted",children:(0,r.jsx)(i.$n,{icon:h?"arrow-up":"arrow-down",content:h?"Yes":"No",color:h?null:"red",selected:h,onClick:function(){return t("inverted")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_temp")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_temperature",{temperature:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_temp")}})]})]})})})})}},6561:function(e,n,t){"use strict";t.r(n),t.d(n,{AugmentMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"".concat(t.current_level," / ").concat(t.max_level):"0 / ".concat(e.max_level);return(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.BJ,{vertical:!1,children:[(0,r.jsx)(o.$n,{height:"20px",width:"35px",mb:1,textAlign:"center",content:i,disabled:i>c||t&&t.current_level===t.max_level,tooltip:"Purchase this ability?",onClick:function(){n("purchase",{ability_path:e.ability_path}),p(m)}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.desc||"Description not available"}),(0,r.jsxs)(o.BJ.Item,{children:["Level: ",(0,r.jsx)("span",{style:{color:"green"},children:l}),v&&e.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",e.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})]})},h=function(e){var n=e.act,t=e.abilityTabs,i=e.knownAbilities,l=e.usableSwarms,a=i.filter(function(e){return e.current_levell,tooltip:"Upgrade this ability?",onClick:function(){return n("purchase",{ability_path:e.ability_path})}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.upgrade_text}),(0,r.jsxs)(o.BJ.Item,{children:["Level:"," ",(0,r.jsx)("span",{style:{color:"green"},children:"".concat(e.current_level," / ").concat(e.max_level)}),i&&i.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",i.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})}},8762:function(e,n,t){"use strict";t.r(n),t.d(n,{Autolathe:()=>f});var r=t(8138),i=t(8587),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn)&&!(e.requirements.glass*r>t)},f=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,f=s.total_amount,h=(s.max_amount,s.metal_amount),m=s.glass_amount,p=s.busyname,x=s.busyamt,g=s.showhacked,j=s.buildQueue,b=s.buildQueueLen,y=s.recipes,v=s.categories,w=s.fill_percent,k=u((0,a.QY)("category","Tools"),2),_=k[0],C=k[1],I=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),S=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),A=u((0,a.QY)("searchText",""),2),P=A[0],E=A[1],B=[];b>0&&(B=j.map(function(e,n){return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{fluid:!0,icon:"times",color:"transparent",content:e[0],onClick:function(){return t("remove_from_queue",{remove_from_queue:n+1})}},n)},n)}));var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return(e.category.indexOf(_)>-1||!!n)&&(!!g||!e.hacked)});if(n){var r=(0,l.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name.toLowerCase()})}(y,P),T="Build";return P?T="Results for: '"+P+"':":_&&(T="Build ("+_+")"),(0,r.jsx)(c.p8,{width:750,height:525,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{width:"70%",children:(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:T,buttons:(0,r.jsx)(o.ms,{width:"150px",options:v,selected:_,onSelected:function(e){return C(e)}}),children:[(0,r.jsx)(o.pd,{fluid:!0,mb:1,placeholder:"Search for...",onChange:function(e){return E(e)},value:P}),z.map(function(e){return(0,r.jsxs)(o.BJ.Item,{grow:!0,children:[(0,r.jsx)("img",{src:"data:image /jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&1===x,disabled:!d(e,h,m,1),onClick:function(){return t("make",{make:e.uid,multiplier:1})},children:e.name}),e.max_multiplier>=10&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&10===x,disabled:!d(e,h,m,10),onClick:function(){return t("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&25===x,disabled:!d(e,h,m,25),onClick:function(){return t("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,r.jsxs)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&x===e.max_multiplier,disabled:!d(e,h,m,e.max_multiplier),onClick:function(){return t("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]}),e.requirements&&Object.keys(e.requirements).map(function(n){return(0,l.Sn)(n)+": "+e.requirements[n]}).join(", ")||(0,r.jsx)(o.az,{children:"No resources required."})]},e.uid)})]})}),(0,r.jsxs)(o.BJ.Item,{width:"30%",children:[(0,r.jsx)(o.wn,{title:"Materials",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Metal",children:I}),(0,r.jsx)(o.Ki.Item,{label:"Glass",children:S}),(0,r.jsx)(o.Ki.Item,{label:"Total",children:O}),(0,r.jsxs)(o.Ki.Item,{label:"Storage",children:[w,"% Full"]})]})}),(0,r.jsx)(o.wn,{title:"Building",children:(0,r.jsx)(o.az,{color:p?"green":"",children:p||"Nothing"})}),(0,r.jsxs)(o.wn,{title:"Build Queue",height:23.7,children:[B,(0,r.jsx)(o.$n,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!b,onClick:function(){return t("clear_queue")}})]})]})]})})})}},9766:function(e,n,t){"use strict";t.r(n),t.d(n,{BioChipPad:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.glow_brightness_base,s=a.glow_brightness_power,u=a.glow_contrast_base,d=a.glow_contrast_power,f=a.exposure_brightness_base,h=a.exposure_brightness_power,m=a.exposure_contrast_base,p=a.exposure_contrast_power;return(0,r.jsx)(l.p8,{title:"BloomEdit",width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Bloom Edit",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:c,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:s,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:u,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:d,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:f,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:h,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:m,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:p,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_power",{value:e})}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{children:[(0,r.jsx)(i.$n,{content:"Reload Lamps with New Parameters",onClick:function(){return t("update_lamps")}}),(0,r.jsx)(i.$n,{content:"Reset to Default",onClick:function(){return t("default")}})]})]})})})})}},7166:function(e,n,t){"use strict";t.r(n),t.d(n,{BlueSpaceArtilleryControl:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.ready?(0,r.jsx)(i.Ki.Item,{label:"Status",color:"green",children:"Ready"}):c.reloadtime_text?(0,r.jsx)(i.Ki.Item,{label:"Reloading In",color:"red",children:c.reloadtime_text}):(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:"No cannon connected!"}),(0,r.jsx)(l.p8,{width:400,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[c.notice&&(0,r.jsx)(i.Ki.Item,{label:"Alert",color:"red",children:c.notice}),n,(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.$n,{icon:"crosshairs",content:c.target?c.target:"None",onClick:function(){return a("recalibrate")}})}),1===c.ready&&!!c.target&&(0,r.jsx)(i.Ki.Item,{label:"Firing",children:(0,r.jsx)(i.$n,{icon:"skull",content:"FIRE!",color:"red",onClick:function(){return a("fire")}})}),!c.connected&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance",children:(0,r.jsx)(i.$n,{icon:"wrench",content:"Complete Deployment",onClick:function(){return a("build")}})})]})})})})})})}},8128:function(e,n,t){"use strict";t.r(n),t.d(n,{Alerts:()=>u,BluespaceTap:()=>s,Incursion:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){if((0,l.Oc)().data.portaling)return(0,r.jsx)(i.Rr,{fontsize:"256px",backgroundColor:"rgba(35,0,0,0.85)",children:(0,r.jsx)(i.Z8,{fontsize:"256px",interval:Math.random()>.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"skull",size:14,mb:"64px"}),(0,r.jsx)("br",{}),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})},s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.product||[],f=s.desiredMiningPower,h=s.miningPower,m=s.points,p=s.totalPoints,x=s.powerUse,g=s.availablePower,j=s.emagged,b=s.dirty,y=s.autoShutown,v=s.stabilizers,w=s.stabilizerPower,k=s.stabilizerPriority;return(0,r.jsx)(a.p8,{width:650,height:450,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(u,{}),(0,r.jsx)(i.Nt,{title:"Input Management",children:(0,r.jsxs)(i.wn,{fill:!0,title:"Input",children:[(0,r.jsx)(i.$n,{icon:y&&!j?"toggle-on":"toggle-off",content:"Auto shutdown",color:y&&!j?"green":"red",disabled:!!j,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){return t("auto_shutdown")}}),(0,r.jsx)(i.$n,{icon:v&&!j?"toggle-on":"toggle-off",content:"Stabilizers",color:v&&!j?"green":"red",disabled:!!j,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){return t("stabilizers")}}),(0,r.jsx)(i.$n,{icon:k&&!j?"toggle-on":"toggle-off",content:"Stabilizer priority",color:k&&!j?"green":"red",disabled:!!j,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){return t("stabilizer_priority")}}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Desired Mining Power",children:(0,o.d5)(f)}),(0,r.jsx)(i.Ki.Item,{verticalAlign:"top",label:"Set Desired Mining Power",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"step-backward",disabled:0===f||j,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:0})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:0===f||j,onClick:function(){return t("set",{set_power:f-1e7})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===f||j,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f-1e6})}})]}),(0,r.jsx)(i.BJ.Item,{mx:1,children:(0,r.jsx)(i.Q7,{disabled:j,minValue:0,value:f,maxValue:1/0,step:1,onChange:function(e){return t("set",{set_power:e})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:j,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e6})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:j,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e7})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Total Power Use",children:(0,o.d5)(x)}),(0,r.jsx)(i.Ki.Item,{label:"Mining Power Use",children:(0,o.d5)(h)}),(0,r.jsx)(i.Ki.Item,{label:"Stabilizer Power Use",children:(0,o.d5)(w)}),(0,r.jsx)(i.Ki.Item,{label:"Surplus Power",children:(0,o.d5)(g)})]})]})}),(0,r.jsxs)(i.wn,{fill:!0,title:"Output",children:[b?(0,r.jsx)(i.Rr,{backgroundColor:"rgba(63, 39, 18, 0.85)",children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"brown",fontsize:"256px",textAlign:"center",children:["Blockage Detected",(0,r.jsx)("br",{}),"Cleanup Required"]})})}):"",(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available Points",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Total Points",children:p})]})})}),(0,r.jsx)(i.BJ.Item,{align:"end",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.Ki,{children:d.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:(0,r.jsx)(i.$n,{disabled:e.price>=m,onClick:function(){return t("vend",{target:e.key})},content:e.price})},e.key)})})})})]})]})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.product;var o=t.miningPower,a=t.stabilizerPower,c=t.emagged,s=(t.safeLevels,t.autoShutown),u=t.stabilizers;return t.overhead,(0,r.jsxs)(r.Fragment,{children:[!s&&!c&&(0,r.jsx)(i.IC,{danger:1,children:"Auto shutdown disabled"}),c?(0,r.jsx)(i.IC,{danger:1,children:"All safeties disabled"}):o<=15e6?"":u?o>a+15e6?(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,r.jsx)(i.IC,{children:"High Power, engaging stabilizers"}):(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers disabled, Instability likely"})]})}},6807:function(e,n,t){"use strict";t.r(n),t.d(n,{BodyScanner:()=>p});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."],["paraplegic","bad","Lumbar nerves damaged."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],d={average:[.25,.5],bad:[.5,1/0]},f=function(e,n){for(var t=[],r=0;r0?e.filter(function(e){return!!e}).reduce(function(e,n){return(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(i.az,{children:n},n)]})},null):null},m=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""},p=function(e){var n=(0,l.Oc)().data,t=n.occupied,i=n.occupant,o=t?(0,r.jsx)(x,{occupant:void 0===i?{}:i}):(0,r.jsx)(k,{});return(0,r.jsx)(a.p8,{width:700,height:600,title:"Body Scanner",children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:o})})},x=function(e){var n=e.occupant;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(g,{occupant:n}),(0,r.jsx)(j,{occupant:n}),(0,r.jsx)(b,{occupant:n}),(0,r.jsx)(v,{organs:n.extOrgan}),(0,r.jsx)(w,{organs:n.intOrgan})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"print",onClick:function(){return t("print_p")},children:"Print Report"}),(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectify")},children:"Eject"})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:o.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:o.maxHealth,value:o.health/o.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[o.stat][0],children:c[o.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempC)}),"\xb0C,\xa0",(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempF)}),"\xb0F"]}),(0,r.jsx)(i.Ki.Item,{label:"Implants",children:o.implant_len?(0,r.jsx)(i.az,{children:o.implant.map(function(e){return e.name}).join(", ")}):(0,r.jsx)(i.az,{color:"label",children:"None"})})]})})},j=function(e){var n=e.occupant;return n.hasBorer||n.blind||n.colourblind||n.nearsighted||n.hasVirus||n.paraplegic?(0,r.jsx)(i.wn,{title:"Abnormalities",children:s.map(function(e,t){if(n[e[0]])return(0,r.jsx)(i.az,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])})}):(0,r.jsx)(i.wn,{title:"Abnormalities",children:(0,r.jsx)(i.az,{color:"label",children:"No abnormalities found."})})},b=function(e){var n=e.occupant;return(0,r.jsx)(i.wn,{title:"Damage",children:(0,r.jsx)(i.XI,{children:f(u,function(e,t,o){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.XI.Row,{color:"label",children:[(0,r.jsxs)(i.XI.Cell,{children:[e[0],":"]}),(0,r.jsx)(i.XI.Cell,{children:!!t&&t[0]+":"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(y,{value:n[e[1]],marginBottom:o100)&&"average"||!!e.status.robotic&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{m:-.5,min:"0",max:e.maxHealth,mt:n>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:d,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.m_,{content:"Total damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"heartbeat",mr:.5}),Math.round(e.totalLoss)]})}),!!e.bruteLoss&&(0,r.jsx)(i.m_,{content:"Brute damage",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(0,r.jsx)(i.In,{name:"bone",mr:.5}),Math.round(e.bruteLoss)]})}),!!e.fireLoss&&(0,r.jsx)(i.m_,{content:"Burn damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"fire",mr:.5}),Math.round(e.fireLoss)]})})]})})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.liverCirrhosis&&"Liver cirrhosis",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.jsxs)(i.az,{inline:!0,children:[h([!!e.status.splinted&&(0,r.jsx)(i.az,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})]),h(e.shrapnel.map(function(e){return e.known?e.name:"Unknown object"}))]})]})]},n)})]})})},w=function(e){return 0===e.organs.length?(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsx)(i.az,{color:"label",children:"N/A"})}):(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:"Damage"}),(0,r.jsx)(i.XI.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{color:!!e.dead&&"bad"||e.germ_level>100&&"average"||e.robotic>0&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:n>0&&"0.5rem",ranges:d,children:Math.round(e.damage)})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([m(e.germ_level)])}),(0,r.jsx)(i.az,{inline:!0,children:h([1===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),2===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Assisted"}),!!e.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})])})]})]},n)})]})})},k=function(){return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},2790:function(e,n,t){"use strict";t.r(n),t.d(n,{BookBinder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.selectedbook,u=c.book_categories,d=[];return u.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(l.p8,{width:600,height:400,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,title:"Book Binder",buttons:(0,r.jsx)(i.$n,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return t("print_book")}}),children:[(0,r.jsxs)(i.az,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Title",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,a.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(i.Ki.Item,{label:"Author",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,a.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(i.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.ms,{width:"190px",options:u.map(function(e){return e.description}),onSelected:function(e){return t("toggle_binder_category",{category_id:d[e]})}})})}),(0,r.jsx)(i.Ki.Item,{label:"Summary",children:(0,r.jsx)(i.$n,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,a.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(i.Ki.Item,{children:s.summary})]}),(0,r.jsx)("br",{}),u.filter(function(e){return s.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(i.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_binder_category",{category_id:e.category_id})}},e.category_id)})]})})]})})})]})}},1326:function(e,n,t){"use strict";t.r(n),t.d(n,{BotCall:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.cleanblood,f=c.area;return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsx)(i.wn,{title:"Cleaning Settings",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Clean Blood",disabled:s,onClick:function(){return t("blood")}})}),(0,r.jsxs)(i.wn,{title:"Misc Settings",children:[(0,r.jsx)(i.$n,{fluid:!0,content:f?"Reset Area Selection":"Restrict to Current Area",onClick:function(){return t("area")}}),null!==f&&(0,r.jsx)(i.az,{mb:1,children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Locked Area",children:f})})})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},3578:function(e,n,t){"use strict";t.r(n),t.d(n,{BotFloor:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.hullplating,f=c.replace,h=c.eat,m=c.make,p=c.fixfloor,x=c.nag_empty,g=c.magnet,j=c.tiles_amount;return(0,r.jsx)(l.p8,{width:500,height:510,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Floor Settings",children:[(0,r.jsx)(i.az,{mb:"5px",children:(0,r.jsx)(i.Ki.Item,{label:"Tiles Left",children:j})}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:s,onClick:function(){return t("autotile")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:s,onClick:function(){return t("replacetiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Repair damaged tiles and platings",disabled:s,onClick:function(){return t("fixfloors")}})]}),(0,r.jsxs)(i.wn,{title:"Miscellaneous",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:s,onClick:function(){return t("eattiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Make pieces of metal into tiles when empty",disabled:s,onClick:function(){return t("maketiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:x,content:"Transmit notice when empty",disabled:s,onClick:function(){return t("nagonempty")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:g,content:"Traction Magnets",disabled:s,onClick:function(){return t("anchored")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},5144:function(e,n,t){"use strict";t.r(n),t.d(n,{BotHonk:()=>a});var r=t(8138),i=t(2864),o=t(3384),l=t(9226),a=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.p8,{width:500,height:220,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(l.BotStatus,{})})})}},2078:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMed:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.shut_up,f=c.declare_crit,h=c.stationary_mode,m=c.heal_threshold,p=c.injection_amount,x=c.use_beaker,g=c.treat_virus,j=c.reagent_glass;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Communication Settings",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Speaker",checked:!d,disabled:s,onClick:function(){return t("toggle_speaker")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:f,disabled:s,onClick:function(){return t("toggle_critical_alerts")}})]}),(0,r.jsxs)(i.wn,{fill:!0,title:"Treatment Settings",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Healing Threshold",children:(0,r.jsx)(i.Ap,{value:m.value,minValue:m.min,maxValue:m.max,step:5,disabled:s,onChange:function(e,n){return t("set_heal_threshold",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Injection Level",children:(0,r.jsx)(i.Ap,{value:p.value,minValue:p.min,maxValue:p.max,step:5,format:function(e){return"".concat(e,"u")},disabled:s,onChange:function(e,n){return t("set_injection_amount",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reagent Source",children:(0,r.jsx)(i.$n,{content:x?"Beaker":"Internal Synthesizer",icon:x?"flask":"cogs",disabled:s,onClick:function(){return t("toggle_use_beaker")}})}),j&&(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsxs)(i.BJ,{inline:!0,width:"100%",children:[(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsxs)(i.z2,{value:j.amount,minValue:0,maxValue:j.max_amount,children:[j.amount," / ",j.max_amount]})}),(0,r.jsx)(i.BJ.Item,{ml:1,children:(0,r.jsx)(i.$n,{content:"Eject",disabled:s,onClick:function(){return t("eject_reagent_glass")}})})]})})]}),(0,r.jsx)(i.$n.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:g,disabled:s,onClick:function(){return t("toggle_treat_viral")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:s,onClick:function(){return t("toggle_stationary_mode")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})})}},881:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMule:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.check_id,f=c.check_weapons,h=c.check_warrant,m=c.arrest_mode,p=c.arrest_declare;return(0,r.jsx)(l.p8,{width:500,height:445,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Who To Arrest",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:s,onClick:function(){return t("authid")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:s,onClick:function(){return t("authwarrant")}})]}),(0,r.jsxs)(i.wn,{title:"Arrest Procedure",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Detain Targets Indefinitely",disabled:s,onClick:function(){return t("arrtype")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Announce Arrests On Radio",disabled:s,onClick:function(){return t("arrdeclare")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},2850:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigCells:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=e.cell,t=(0,o.Oc)().act,l=n.cell_id,a=n.occupant,c=n.crimes,s=n.brigged_by,u=n.time_left_seconds,d=n.time_set_seconds,f=n.ref,h="";return u>0&&(h+=" BrigCells__listRow--active"),(0,r.jsxs)(i.XI.Row,{className:h,children:[(0,r.jsx)(i.XI.Cell,{children:l}),(0,r.jsx)(i.XI.Cell,{children:a}),(0,r.jsx)(i.XI.Cell,{children:c}),(0,r.jsx)(i.XI.Cell,{children:s}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:d})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:u})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{type:"button",onClick:function(){t("release",{ref:f})},children:"Release"})})]})},c=function(e){var n=e.cells;return(0,r.jsxs)(i.XI,{className:"BrigCells__list",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{header:!0,children:"Cell"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Occupant"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Crimes"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Brigged By"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Brigged For"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Left"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Release"})]}),n.map(function(e){return(0,r.jsx)(a,{cell:e},e.ref)})]})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).cells;return(0,r.jsx)(l.p8,{theme:"security",width:800,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{cells:t})})})})})}},9478:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigTimer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;a.nameText=a.occupant,a.timing&&(a.prisoner_hasrec?a.nameText=(0,r.jsx)(i.az,{color:"green",children:a.occupant}):a.nameText=(0,r.jsx)(i.az,{color:"red",children:a.occupant}));var c="pencil-alt";a.prisoner_name&&!a.prisoner_hasrec&&(c="exclamation-triangle");var s=[],u=0;for(u=0;ud});var r=t(8138),i=t(4530),o=t(2864),l=t(3384),a=t(7790);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tp,CameraConsoleContent:()=>x});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(5490),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te?this.substring(0,e)+"...":this};var h=function(e,n){if(!n)return[];var t,r,i=e.findIndex(function(e){return e.name===n.name});return[null==(t=e[i-1])?void 0:t.name,null==(r=e[i+1])?void 0:r.name]},m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,c.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name})},p=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,o=i.mapRef,c=i.activeCamera,d=f(h(m(i.cameras),c),2),p=d[0],g=d[1];return(0,r.jsxs)(u.p8,{width:870,height:708,children:[(0,r.jsx)("div",{className:"CameraConsole__left",children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(l.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(x,{})})})}),(0,r.jsxs)("div",{className:"CameraConsole__right",children:[(0,r.jsxs)("div",{className:"CameraConsole__toolbar",children:[(0,r.jsx)("b",{children:"Camera: "}),c&&c.name||"—"]}),(0,r.jsxs)("div",{className:(0,a.Ly)(["CameraConsole__toolbar","CameraConsole__toolbar--right"]),children:[(0,r.jsx)(l.$n,{icon:"chevron-left",disabled:!p,onClick:function(){return t("switch_camera",{name:p})}}),(0,r.jsx)(l.$n,{icon:"chevron-right",disabled:!g,onClick:function(){return t("switch_camera",{name:g})}})]}),(0,r.jsx)(l.D1,{className:"CameraConsole__map",params:{id:o,type:"map"}})]})]})},x=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,c=f((0,o.useState)(""),2),u=c[0],d=c[1],h=i.activeCamera,p=m(i.cameras,u);return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search for a camera",onChange:function(e){return d(e)}})}),(0,r.jsx)(l.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:p.map(function(e){return(0,r.jsx)("div",{title:e.name,className:(0,a.Ly)(["Button","Button--fluid",h&&e.name===h.name?"Button--selected":"Button--color--transparent"]),onClick:function(){return t("switch_camera",{name:e.name})},children:e.name.trimLongStr(23)},e.name)})})})]})}},2094:function(e,n,t){"use strict";t.r(n),t.d(n,{Canister:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=s.portConnected,d=s.tankPressure,f=s.releasePressure,h=s.defaultReleasePressure,m=s.minReleasePressure,p=s.maxReleasePressure,x=s.valveOpen,g=s.name,j=s.canLabel,b=s.colorContainer,y=s.color_index,v=s.hasHoldingTank,w=s.holdingTank,k="";y.prim&&(k=b.prim.options[y.prim].name);var _="";y.sec&&(_=b.sec.options[y.sec].name);var C="";y.ter&&(C=b.ter.options[y.ter].name);var I="";y.quart&&(I=b.quart.options[y.quart].name);var S=[],O=[],A=[],P=[],E=0;for(E=0;El});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.scanned_card,l=e.modifying_card;return(0,r.jsx)(i.wn,{title:"Authentication",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Login/Logout",children:t?(0,r.jsx)(i.$n,{icon:"sign-out-alt",selected:!0,onClick:function(){return n("interact_scanned")},children:"Log Out: ".concat(t.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_scanned")},children:"-----"})}),(0,r.jsx)(i.Ki.Item,{label:"Card To Modify",children:l?(0,r.jsx)(i.$n,{icon:"eject",selected:!0,onClick:function(){return n("interact_modify")},children:"Remove Card: ".concat(l.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_modify")},children:"-----"})})]})})}},7542:function(e,n,t){"use strict";t.r(n),t.d(n,{CardInformation:()=>l,CardSkins:()=>a,DropdownCardSkins:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.card;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Registered Name",children:(0,r.jsx)(i.$n,{icon:t&&"Unknown"!==t.registered_name?"pencil-alt":"exclamation-triangle",selected:!!t,onClick:function(){return n("reg")},children:null==t?void 0:t.registered_name})}),(0,r.jsx)(i.Ki.Item,{label:"Account Number",children:(0,r.jsx)(i.$n,{icon:(null==t?void 0:t.associated_account_number)?"pencil-alt":"exclamation-triangle",selected:!!(null==t?void 0:t.associated_account_number),onClick:function(){return n("set_card_account_number")},children:(null==t?void 0:t.associated_account_number)?null==t?void 0:t.associated_account_number:"None"})})]})},a=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[t.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)}),!!a&&(0,r.jsx)(i.az,{children:Array.isArray(c)&&c.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,color:"purple",onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)})})]})},c=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins,s=t.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}),u=Array.isArray(c)?c.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}):[],d=s.filter(function(e){return e.value===(null==l?void 0:l.current_skin)}).length>0;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[(0,r.jsx)(i.Ki.Item,{label:"Department Skins",children:(0,r.jsx)(i.ms,{options:s,selected:d?null==l?void 0:l.current_skin_name:null,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})}),!!a&&(0,r.jsx)(i.Ki.Item,{label:"Centcom Skins",children:(0,r.jsx)(i.ms,{options:u,selected:d?null:null==l?void 0:l.current_skin_name,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})})]})}},991:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputer:()=>x,SlashedIcon:()=>f});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(1487),s=t(4287),u=t(6530),d=t(9490),f=function(e){var n=e.title,t=e.name,o=e.text;return(0,r.jsx)(i.wn,{fill:!0,title:n,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:t,size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),o]})})})},h=function(){return(0,r.jsx)(f,{title:"Warning",name:"user",text:"Not logged in"})},m=function(){return(0,r.jsx)(f,{title:"Records",name:"scroll",text:"No records"})},p=function(){return(0,r.jsx)(f,{title:"Card Missing",name:"id-card",text:"No card to modify"})},x=function(){var e,n=(0,o.Oc)(),t=n.act,f=n.data,x=f.all_centcom_skins,g=f.auth_or_ghost,j=f.authenticated,b=f.can_terminate,y=f.card_skins,v=f.cooldown_time,w=f.is_centcom,k=f.job_slots,_=f.job_formats,C=f.jobs_dept,I=f.jobs,S=f.mode,O=f.modifying_card,A=f.people_dept,P=f.priority_jobs,E=f.records,B=f.regions,z=f.scanned_card,T=f.selectedAccess,N=f.target_dept,R=(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:0===S,onClick:function(){return t("mode",{mode:0})},children:"Job Transfers"}),!N&&(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:2===S,onClick:function(){return t("mode",{mode:2})},children:"Access Modification"}),(0,r.jsx)(i.tU.Tab,{icon:"folder-open",selected:1===S,onClick:function(){return t("mode",{mode:1})},children:"Job Management"}),(0,r.jsx)(i.tU.Tab,{icon:"scroll",selected:3===S,onClick:function(){return t("mode",{mode:3})},children:"Records"}),(0,r.jsx)(i.tU.Tab,{icon:"users",selected:4===S,onClick:function(){return t("mode",{mode:4})},children:"Department"})]});switch(S){case 0:e=j&&z?O?(0,r.jsx)(u.CardComputerJobTransfer,{target_dept:N,card:O,can_terminate:b,is_centcom:w,jobs:I,job_colors:_,jobs_dept:C,card_skins:y,all_centcom_skins:x}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 1:e=g?(0,r.jsx)(s.CardComputerJobPriority,{cooldown_time:v,target_dept:N,priority_jobs:P,job_slots:k}):(0,r.jsx)(h,{});break;case 2:e=j&&z?O?(0,r.jsx)(a.AccessList,{accesses:B,selectedList:T,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 3:e=j?E.length?(0,r.jsx)(d.CardComputerRecordsLog,{authenticated:j,records:E,target_dept:N,is_centcom:w}):(0,r.jsx)(m,{}):(0,r.jsx)(h,{});break;case 4:e=j&&z?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Your Team",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Name"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Sec Status"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Actions"})]}),A.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.name}),(0,r.jsx)(i.XI.Cell,{children:e.title}),(0,r.jsx)(i.XI.Cell,{children:e.crimstat}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{disabled:!e.demotable,onClick:function(){return t("remote_demote",{remote_demote:e.name})},children:e.buttontext})})]},e.title)})]})}):(0,r.jsx)(h,{});break;default:e=(0,r.jsx)(i.wn,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,r.jsx)(l.p8,{width:760,height:800,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(c.AuthBlock,{scanned_card:z,modifying_card:O})}),(0,r.jsx)(i.BJ.Item,{children:R}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:e})]})})})}},4287:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobPriority:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.cooldown_time,l=e.job_slots,a=e.target_dept,c=e.priority_jobs;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{color:t?"red":"",children:["Next Change Available:",t||"Now"]}),(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Job Slots",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Title"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Used Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Total Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Free Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Close Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Open Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Priority"})]}),l&&l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,className:"candystripe",children:[(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.az,{color:e.is_priority?"green":"",children:e.title})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.current_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions>e.current_positions&&(0,r.jsx)(i.az,{color:"green",children:e.total_positions-e.current_positions})||(0,r.jsx)(i.az,{color:"red",children:"0"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_close,onClick:function(){return n("make_job_unavailable",{job:e.title})},children:"-"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_open,onClick:function(){return n("make_job_available",{job:e.title})},children:"+"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:a&&(0,r.jsx)(i.az,{color:"green",children:c.indexOf(e.title)>-1?"Yes":""})||(0,r.jsx)(i.$n,{selected:e.is_priority,disabled:!!t||!e.can_prioritize,onClick:function(){return n("prioritize_job",{job:e.title})},children:e.is_priority?"Yes":"No"})})]},e.title)})]})})]})}},6530:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobTransfer:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(421),a=t(7542),c=l.lm.department,s=function(e){var n=(0,o.Oc)().act,t=e.job_colors,l=e.dept_name,a=e.job_names,c=e.dept_color,s=e.default_job_color,u=void 0===s?"":s,d=e.card;return(0,r.jsx)(i.Ki.Item,{label:l,labelColor:c,children:a.map(function(e){return(0,r.jsx)(i.$n,{selected:(null==d?void 0:d.rank)===e,color:t[e]?t[e]:u,onClick:function(){return n("assign",{assign_target:e})},children:e},e)})})},u=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.target_dept,u=e.card,d=e.can_terminate,f=e.is_centcom,h=e.jobs,m=e.jobs_dept,p=e.job_colors,x=e.all_centcom_skins,g=h&&[{name:"Special",jobs:h.top},{name:"Engineering",color:c.engineering,jobs:h.engineering},{name:"Medical",color:c.medical,jobs:h.medical},{name:"Science",color:c.science,jobs:h.science},{name:"Security",color:c.security,jobs:h.security},{name:"Service",color:c.service,jobs:h.service},{name:"Supply",color:c.supply,jobs:h.supply},{name:"Retirement",jobs:h.assistant}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{title:"Card Information",children:[!l&&(0,r.jsx)(a.CardInformation,{card:u}),(0,r.jsx)(i.Ki.Item,{label:"Latest Transfer",children:(null==u?void 0:u.lastlog)||"---"})]}),(0,r.jsx)(i.wn,{title:l?"Department Job Transfer":"Job Transfer",children:(0,r.jsxs)(i.Ki,{children:[l?(0,r.jsx)(s,{dept_name:"Department",job_colors:p,job_names:void 0===m?[]:m,card:u}):(0,r.jsx)(r.Fragment,{children:g.map(function(e){return(0,r.jsx)(s,{dept_name:e.name,dept_color:e.color,job_names:e.jobs,job_colors:p,card:u})})}),!!f&&(0,r.jsx)(s,{dept_name:"Centcom",dept_color:c.centcom,job_colors:p,job_names:h.centcom,default_job_color:"purple",card:u}),(0,r.jsx)(i.Ki.Item,{label:"Demotion",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Demoted"||(null==u?void 0:u.assignment)==="Terminated",tooltip:"Assistant access, 'demoted' title.",color:"red",icon:"times",onClick:function(){return n("demote")},children:"Demoted"},"Demoted")}),!!d&&(0,r.jsx)(i.Ki.Item,{label:"Non-Crew",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Terminated",tooltip:"Zero access. Not crew.",color:"red",icon:"eraser",onClick:function(){return n("terminate")},children:"Terminated"},"Terminate")})]})}),!l&&(0,r.jsx)(a.CardSkins,{card:u,card_skins:t,is_centcom:f,all_centcom_skins:x})]})}},9490:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerRecordsLog:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.authenticated,l=e.records,a=e.target_dept,c=e.is_centcom;return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Records",buttons:(0,r.jsx)(i.$n,{icon:"times",disabled:!t||0===l.length||a,onClick:function(){return n("wipe_all_logs")},children:"Delete All Records"}),children:[(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Crewman"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Old Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"New Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Authorized By"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Time"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Reason"}),!!c&&(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Deleted By"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.transferee}),(0,r.jsx)(i.XI.Cell,{children:e.oldvalue}),(0,r.jsx)(i.XI.Cell,{children:e.newvalue}),(0,r.jsx)(i.XI.Cell,{children:e.whodidit}),(0,r.jsx)(i.XI.Cell,{children:e.timestamp}),(0,r.jsx)(i.XI.Cell,{children:e.reason}),!!c&&(0,r.jsx)(i.XI.Cell,{children:e.deletedby})]},e.timestamp)})]}),!!c&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"pencil-alt",color:"purple",disabled:!t||0===l.length,onClick:function(){return n("wipe_my_logs")},children:"Delete MY Records"})})]})}},1488:function(e,n,t){"use strict";t.r(n)},6466:function(e,n,t){"use strict";t.r(n),t.d(n,{CargoConsole:()=>f});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,ChameleonAppearances:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,l.XZ)(n,function(e){return e.name});return e.filter(t)},f=function(e){var n,t=(0,a.Oc)(),l=t.act,c=t.data,u=(n=(0,i.useState)(""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=u[0],h=u[1],m=d(c.chameleon_skins,f),p=c.selected_appearance;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for an appearance",onChange:function(e){return h(e)}})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Item Appearance",children:m.map(function(e){var n=e.name+"_"+e.icon_state;return(0,r.jsx)(o.c_,{dmIcon:e.icon,dmIconState:e.icon_state,imageSize:64,m:.5,selected:n===p,tooltip:e.name,style:{opacity:n===p&&"1"||"0.5"},onClick:function(){l("change_appearance",{new_appearance:n})}},n)})})})]})}},9072:function(e,n,t){"use strict";t.r(n),t.d(n,{ChangelogView:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=[1,5,10,20,30,50,75],s=[1,5,10],u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).chemicals;return(0,r.jsx)(l.p8,{width:420,height:400+24*Math.ceil(t.length/3),children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.amount,s=l.energy,u=l.maxEnergy;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:c.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:a===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})})]})})})},f=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=[],u=0;u<(c.length+1)%3;u++)s.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",content:e.title,style:{marginLeft:"2px",textOverflow:"ellipsis"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%"},n)})]})})},h=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.isBeakerLoaded,u=l.beakerCurrentVolume,d=l.beakerMaxVolume,f=l.beakerContents;return(0,r.jsx)(i.BJ.Item,{height:16,children:(0,r.jsx)(i.wn,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsxs)(i.az,{children:[!!c&&(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[u," / ",d," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!c,onClick:function(){return t("ejectBeaker")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:void 0===f?[]:f,buttons:function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return t("remove",{reagent:e.id,amount:-1})}}),s.map(function(n,o){return(0,r.jsx)(i.$n,{content:n,onClick:function(){return t("remove",{reagent:e.id,amount:n})}},o)}),(0,r.jsx)(i.$n,{content:"ALL",onClick:function(){return t("remove",{reagent:e.id,amount:e.volume})}})]})}})})})}},6277:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemHeater:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(3013),s=function(e){return(0,r.jsx)(a.p8,{width:350,height:275,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.targetTemp,s=a.targetTempReached,u=a.autoEject,d=a.isActive,f=a.currentTemp,h=a.isBeakerLoaded;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Settings",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Auto-eject",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){return t("toggle_autoeject")}}),(0,r.jsx)(i.$n,{content:d?"On":"Off",icon:"power-off",selected:d,disabled:!h,onClick:function(){return t("toggle_on")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.Q7,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,o.LI)(c,0),minValue:0,maxValue:1e3,onChange:function(e){return t("adjust_temperature",{target:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,r.jsx)(i.zv,{value:f,format:function(e){return(0,o.Mg)(e)+" K"}})||"—"})]})})})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.isBeakerLoaded,s=o.beakerCurrentVolume,u=o.beakerMaxVolume,d=o.beakerContents;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!a&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",onClick:function(){return t("eject_beaker")}})]}),children:(0,r.jsx)(c.BeakerContents,{beakerLoaded:a,beakerContents:d})})})}},9306:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemMaster:()=>x});var r=t(8138),i=t(7790),o=t(5490),l=t(3375),a=t(2864),c=t(3384),s=t(3013),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=[1,5,10,25,75],x=function(e){return(0,r.jsxs)(c.p8,{width:575,height:650,children:[(0,r.jsx)(u.ComplexModal,{}),(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(g,{}),(0,r.jsx)(j,{}),(0,r.jsx)(b,{}),(0,r.jsx)(C,{})]})})]})},g=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.beaker,c=o.beaker_reagents;return o.buffer_reagents.length,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!l,content:"Eject",onClick:function(){return t("eject")}}),children:l?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0&&(n=s.map(function(e){var n=e.id,i=e.sprite;return(0,r.jsx)(k,{icon:i,selected:c===n,onClick:function(){return t("set_sprite_style",{production_mode:l,style:n})}},n)})),(0,r.jsx)(w,{productionData:e.productionData,children:n&&(0,r.jsx)(i.Ki.Item,{label:"Style",children:n})})},C=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.loaded_pill_bottle_style,c=o.containerstyles,s=o.loaded_pill_bottle,u="20px",d="20px",f=c.map(function(e){var n=e.color,o=e.name,a=l===n;return(0,r.jsxs)(i.$n,{style:{position:"relative",width:u,height:d},onClick:function(){return t("set_container_style",{style:n})},icon:a?"check":"",tooltip:o,tooltipPosition:"top",children:[!a&&(0,r.jsx)("div",{style:{display:"inline-block"}}),(0,r.jsx)("span",{className:"Button",style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:u,height:d,backgroundColor:n,opacity:.6,filter:"alpha(opacity=60)"}})]},n)});return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Container Customization",buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!s,content:"Eject Container",onClick:function(){return t("ejectp")}}),children:s?(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Style",children:[(0,r.jsx)(i.$n,{style:{width:u,height:d},icon:"tint-slash",onClick:function(){return t("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),f]})}):(0,r.jsx)(i.az,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,u.modalRegisterBodyOverride)("analyze",function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=e.args.analysis;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:o.condi?"Condiment Analysis":"Reagent Analysis",children:(0,r.jsx)(i.az,{mx:"0.5rem",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:l.name}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood type",children:l.blood_type}),(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})]}),!o.condi&&(0,r.jsx)(i.$n,{icon:o.printing?"spinner":"print",disabled:o.printing,iconSpin:!!o.printing,ml:"0.5rem",content:"Print",onClick:function(){return t("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})})},2636:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningConsole:()=>c});var r=t(8138),i=t(7790),o=t(8595),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,c=o.tab,u=o.has_scanner,d=o.pod_amount;return(0,r.jsx)(a.p8,{width:640,height:520,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Cloning Console",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected scanner",children:u?"Online":"Missing"}),(0,r.jsx)(i.Ki.Item,{label:"Connected pods",children:d})]})}),(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:1===c,icon:"home",onClick:function(){return t("menu",{tab:1})},children:"Main Menu"}),(0,r.jsx)(i.tU.Tab,{selected:2===c,icon:"user",onClick:function(){return t("menu",{tab:2})},children:"Damage Configuration"})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(s,{})})]})})},s=function(e){var n,t=(0,l.Oc)().data.tab;return 1===t?n=(0,r.jsx)(u,{}):2===t&&(n=(0,r.jsx)(d,{})),n},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.pods,s=a.pod_amount,u=a.selected_pod_UID;return(0,r.jsxs)(i.az,{children:[!s&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No pods connected."}),!!s&&c.map(function(e,n){return(0,r.jsx)(i.wn,{layer:2,title:"Pod "+(n+1),children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsxs)(i.BJ.Item,{basis:"96px",shrink:0,children:[(0,r.jsx)("img",{src:(0,o.l)("pod_"+(e.cloning?"cloning":"idle")+".gif"),style:{width:"100%",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{selected:u===e.uid,onClick:function(){return t("select_pod",{uid:e.uid})},children:"Select"})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Progress",children:[!e.cloning&&(0,r.jsx)(i.az,{color:"average",children:"Pod is inactive."}),!!e.cloning&&(0,r.jsx)(i.z2,{value:e.clone_progress,maxValue:100,color:"good"})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Biomass",children:(0,r.jsxs)(i.z2,{value:e.biomass,ranges:{good:[2*e.biomass_storage_capacity/3,e.biomass_storage_capacity],average:[e.biomass_storage_capacity/3,2*e.biomass_storage_capacity/3],bad:[0,e.biomass_storage_capacity/3]},minValue:0,maxValue:e.biomass_storage_capacity,children:[e.biomass,"/",e.biomass_storage_capacity+" ("+100*e.biomass/e.biomass_storage_capacity+"%)"]})}),(0,r.jsx)(i.Ki.Item,{label:"Sanguine Reagent",children:e.sanguine_reagent}),(0,r.jsx)(i.Ki.Item,{label:"Osseous Reagent",children:e.osseous_reagent})]})})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.selected_pod_data,c=o.has_scanned,s=o.scanner_has_patient,u=o.feedback,d=o.scan_successful,m=o.cloning_cost,p=o.has_scanner,x=o.currently_scanning;return(0,r.jsxs)(i.az,{children:[!p&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No scanner connected."}),!!p&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.wn,{layer:2,title:"Scanner Info",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{icon:"hourglass-half",onClick:function(){return t("scan")},disabled:!s||x,children:"Scan"}),(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("eject")},disabled:!s||x,children:"Eject Patient"})]}),children:[!c&&!x&&(0,r.jsx)(i.az,{color:"average",children:s?"No scan detected for current patient.":"No patient is in the scanner."}),(!!c||!!x)&&(0,r.jsx)(i.az,{color:u.color,children:u.text})]}),(0,r.jsx)(i.wn,{layer:2,title:"Damages Breakdown",children:(0,r.jsxs)(i.az,{children:[(!d||!c)&&(0,r.jsx)(i.az,{color:"average",children:"No valid scan detected."}),!!d&&!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{onClick:function(){return t("fix_all")},children:"Repair All Damages"}),(0,r.jsx)(i.$n,{onClick:function(){return t("fix_none")},children:"Repair No Damages"})]}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{onClick:function(){return t("clone")},children:"Clone"})})]}),(0,r.jsxs)(i.BJ,{height:"25px",children:[(0,r.jsx)(i.BJ.Item,{width:"40%",children:(0,r.jsxs)(i.z2,{value:m[0],maxValue:a.biomass_storage_capacity,ranges:{bad:[2*a.biomass_storage_capacity/3,a.biomass_storage_capacity],average:[a.biomass_storage_capacity/3,2*a.biomass_storage_capacity/3],good:[0,a.biomass_storage_capacity/3]},color:m[0]>a.biomass?"bad":null,children:["Biomass: ",m[0],"/",a.biomass,"/",a.biomass_storage_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[1],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[1]>a.sanguine_reagent?"bad":"good",children:["Sanguine: ",m[1],"/",a.sanguine_reagent,"/",a.max_reagent_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[2],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[2]>a.osseous_reagent?"bad":"good",children:["Osseous: ",m[2],"/",a.osseous_reagent,"/",a.max_reagent_capacity]})})]}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})]})})]})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_limb_data,c=o.limb_list,s=o.desired_limb_data;return(0,r.jsx)(i.Nt,{title:"Limbs",children:c.map(function(e,n){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"15%",height:"20px",children:[a[e][4],":"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1}),0===a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{value:s[e][0]+s[e][1],maxValue:a[e][5],ranges:{good:[0,a[e][5]/3],average:[a[e][5]/3,2*a[e][5]/3],bad:[2*a[e][5]/3,a[e][5]]},children:["Post-Cloning Damage: ",(0,r.jsx)(i.In,{name:"bone"})," "+s[e][0]+" / ",(0,r.jsx)(i.In,{name:"fire"})," "+s[e][1]]})}),0!==a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][4]," is missing!"]})})]}),(0,r.jsxs)(i.BJ,{children:[!!a[e][3]&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][3],onClick:function(){return t("toggle_limb_repair",{limb:e,type:"replace"})},children:"Replace Limb"})}),!a[e][3]&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n.Checkbox,{disabled:!(a[e][0]||a[e][1]),checked:!(s[e][0]||s[e][1]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"damage"})},children:"Repair Damages"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(1&a[e][2]),checked:!(1&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"bone"})},children:"Mend Bone"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(32&a[e][2]),checked:!(32&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"ib"})},children:"Mend IB"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(128&a[e][2]),checked:!(128&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"critburn"})},children:"Mend Critical Burn"})]})]})]},e)})})},h=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_organ_data,c=o.organ_list,s=o.desired_organ_data;return(0,r.jsx)(i.Nt,{title:"Organs",children:c.map(function(e,n){return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"20%",height:"20px",children:[a[e][3],":"," "]}),"heart"!==a[e][5]&&(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ.Item,{children:[!!a[e][2]&&(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][2]&&!s[e][1],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"replace"})},children:"Replace Organ"}),!a[e][2]&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n.Checkbox,{disabled:!a[e][0],checked:!s[e][0],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"damage"})},children:"Repair Damages"})})]})}),"heart"===a[e][5]&&(0,r.jsx)(i.az,{color:"average",children:"Heart replacement is required for cloning."}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsxs)(i.BJ.Item,{width:"35%",children:[!!a[e][2]&&(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][3]," is missing!"]}),!a[e][2]&&(0,r.jsx)(i.z2,{value:s[e][0],maxValue:a[e][4],ranges:{good:[0,a[e][4]/3],average:[a[e][4]/3,2*a[e][4]/3],bad:[2*a[e][4]/3,a[e][4]]},children:"Post-Cloning Damage: "+s[e][0]})]})]})},e)})})}},1558:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningPod:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.biomass,s=a.biomass_storage_capacity,u=a.sanguine_reagent,d=a.osseous_reagent,f=a.organs,h=a.currently_cloning;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Liquid Storage",children:[(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsx)(i.z2,{value:c,ranges:{good:[2*s/3,s],average:[s/3,2*s/3],bad:[0,s/3]},minValue:0,maxValue:s})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:u+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"sanguine_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"sanguine_reagent"})}})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:d+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"osseous_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"osseous_reagent"})}})})]})]}),(0,r.jsxs)(i.wn,{title:"Organ Storage",children:[!h&&(0,r.jsxs)(i.az,{children:[!f&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No organs loaded."}),!!f&&f.map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:e.name}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Eject",onClick:function(){return t("eject_organ",{organ_ref:e.ref})}})})]},e)})]}),!!h&&(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:"5",mb:3}),(0,r.jsx)("br",{}),"Unable to access organ storage while cloning."]})})]})]})})}},1276:function(e,n,t){"use strict";t.r(n),t.d(n,{CoinMint:()=>c});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.materials,u=c.moneyBag,d=c.moneyBagContent,f=c.moneyBagMaxContent,h=(u?210:138)+64*Math.ceil(s.length/4);return(0,r.jsx)(a.p8,{width:210,height:h,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.IC,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Coin Type",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){return t("activate")}}),children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.z2,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eject",tooltip:"Eject selected material",onClick:function(){return t("ejectMat")}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:s.map(function(e){return(0,r.jsx)(i.$n,{bold:!0,inline:!0,m:.2,textAlign:"center",selected:e.id===c.chosenMaterial,tooltip:e.name,content:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",e.id])}),(0,r.jsx)(i.BJ.Item,{children:e.amount})]}),onClick:function(){return t("selectMaterial",{material:e.id})}},e.id)})})]})})}),!!u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Money Bag",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){return t("ejectBag")}}),children:(0,r.jsxs)(i.z2,{width:"100%",minValue:0,maxValue:f,value:d,children:[d," / ",f]})})})]})})})}},1572:function(e,n,t){"use strict";t.r(n),t.d(n,{HexColorInput:()=>B,ColorSelector:()=>A,ColorPickerModal:()=>O,ColorInput:()=>z});var r=t(8138),i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,n);return Math.round(t*e)/t},o=function(e){return h(l(e))},l=function(e){return("#"===e[0]&&(e=e.substring(1)),e.length<6)?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?i(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?i(parseInt(e.substring(6,8),16)/255,2):1}},a=function(e){return f(u(e))},c=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=(200-t)*r/100;return{h:i(n),s:i(l>0&&l<200?t*r/100/(l<=100?l:200-l)*100:0),l:i(l/2),a:i(o,2)}},s=function(e){var n=c(e),t=n.h,r=n.s,i=n.l;return"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)")},u=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=Math.floor(n=n/360*6),a=(r/=100)*(1-(t/=100)),c=r*(1-(n-l)*t),s=r*(1-(1-n+l)*t),u=l%6;return{r:255*[r,c,a,a,s,r][u],g:255*[s,r,r,c,a,a][u],b:255*[a,a,s,r,r,c][u],a:i(o,2)}},d=function(e){var n=e.toString(16);return n.length<2?"0"+n:n},f=function(e){var n=e.r,t=e.g,r=e.b,o=e.a,l=o<1?d(i(255*o)):"";return"#"+d(i(n))+d(i(t))+d(i(r))+l},h=function(e){var n=e.r,t=e.g,r=e.b,i=e.a,o=Math.max(n,t,r),l=o-Math.min(n,t,r),a=l?o===n?(t-r)/l:o===t?2+(r-n)/l:4+(n-t)/l:0;return{h:60*(a<0?a+6:a),s:o?l/o*100:0,v:o/255*100,a:i}},m=/^#?([0-9A-F]{3,8})$/i,p=function(e,n){var t=m.exec(e),r=t?t[1].length:0;return 3===r||6===r||!!n&&4===r||!!n&&8===r},x=t(4530),g=t(7790),j=t(6859),b=t(5490),y=t(2864),v=t(7946),w=t(8095),k=t(3384),_=t(1942),C=t(9472);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["prefixed","alpha","color","fluid","onChange"]);return(0,r.jsx)(z,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.colour_data;return(0,r.jsx)(l.p8,{width:360,height:190,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,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,r.jsx)(i.BJ,{textAlign:"center",textColor:"label",children:e.map(function(e){return(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:1,children:[e.name,":\xa0",(0,r.jsx)(i.Q7,{width:4,value:a[e.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(n){return t("setvalue",{idx:e.idx+1,value:n})}})]},e.name)})},e)})})})})})}},5325:function(e,n,t){"use strict";t.r(n),t.d(n,{CommunicationsComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(x+=" ("+a+"s)");var g=c?"Message [UNKNOWN]":"Message CentComm",b="Request Authentication Codes";return s>0&&(g+=" ("+s+"s)",b+=" ("+s+"s)"),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Captain-Only Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Alert",color:u,children:d}),(0,r.jsx)(o.Ki.Item,{label:"Change Alert",children:(0,r.jsx)(j,{levels:f,required_access:h})}),(0,r.jsx)(o.Ki.Item,{label:"Announcement",children:(0,r.jsx)(o.$n,{icon:"bullhorn",content:x,disabled:!h||a>0,onClick:function(){return t("announce")}})}),!!c&&(0,r.jsxs)(o.Ki.Item,{label:"Transmit",children:[(0,r.jsx)(o.$n,{icon:"broadcast-tower",color:"red",content:g,disabled:!h||s>0,onClick:function(){return t("MessageSyndicate")}}),(0,r.jsx)(o.$n,{icon:"sync-alt",content:"Reset Relays",disabled:!h,onClick:function(){return t("RestoreBackup")}})]})||(0,r.jsx)(o.Ki.Item,{label:"Transmit",children:(0,r.jsx)(o.$n,{icon:"broadcast-tower",content:g,disabled:!h||s>0,onClick:function(){return t("MessageCentcomm")}})}),(0,r.jsx)(o.Ki.Item,{label:"Nuclear Device",children:(0,r.jsx)(o.$n,{icon:"bomb",content:b,disabled:!h||s>0,onClick:function(){return t("nukerequest")}})})]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{fill:!0,title:"Command Staff Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Displays",children:(0,r.jsx)(o.$n,{icon:"tv",content:"Change Status Displays",disabled:!m,onClick:function(){return t("status")}})}),(0,r.jsx)(o.Ki.Item,{label:"Incoming Messages",children:(0,r.jsx)(o.$n,{icon:"folder-open",content:"View ("+p.length+")",disabled:!m,onClick:function(){return t("messagelist")}})})]})})})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.stat_display,c=i.authhead;i.current_message_title;var s=a.presets.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.name===a.type,disabled:!c,onClick:function(){return t("setstat",{statdisp:e.name})}},e.name)}),u=a.alerts.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.alert===a.icon,disabled:!c,onClick:function(){return t("setstat",{statdisp:3,alert:e.alert})}},e.alert)});return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Modify Status Screens",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Presets",children:s}),(0,r.jsx)(o.Ki.Item,{label:"Alerts",children:u}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 1",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_1,disabled:!c,onClick:function(){return t("setmsg1")}})}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 2",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_2,disabled:!c,onClick:function(){return t("setmsg2")}})})]})})})},g=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.authhead,s=a.current_message_title,u=a.current_message,d=a.messages;if(a.security_level,s)n=(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:s,buttons:(0,r.jsx)(o.$n,{icon:"times",content:"Return To Message List",disabled:!c,onClick:function(){return i("messagelist")}}),children:(0,r.jsx)(o.az,{children:u})})});else{var f=d.map(function(e){return(0,r.jsxs)(o.Ki.Item,{label:e.title,children:[(0,r.jsx)(o.$n,{icon:"eye",content:"View",disabled:!c||s===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,r.jsx)(o.$n.Confirm,{icon:"times",content:"Delete",disabled:!c,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)});n=(0,r.jsx)(o.wn,{title:"Messages Received",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,r.jsx)(o.Ki,{children:f})})}return(0,r.jsx)(o.az,{children:n})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.levels,c=e.required_access,s=e.use_confirm,u=i.security_level;return s?a.map(function(e){return(0,r.jsx)(o.$n.Confirm,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)}):a.map(function(e){return(0,r.jsx)(o.$n,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)})},b=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.is_admin,u=a.possible_cc_sounds;if(!c)return t("main");var d=s((0,i.useState)(""),2),f=d[0],h=d[1],m=s((0,i.useState)(""),2),p=m[0],x=m[1],g=s((0,i.useState)(0),2),j=g[0],b=g[1],y=s((0,i.useState)("Beep"),2),v=y[0],w=y[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Central Command Report",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Enter Subtitle here.",value:f,onChange:function(e){return h(e)}}),(0,r.jsx)(o.fs,{fluid:!0,height:"100%",rows:10,placeholder:"Enter Announcement here. Multiline input is accepted.",value:p,onChange:x}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"paper-plane",textAlign:"center",onClick:function(){t("make_cc_announcement",{subtitle:f,text:p,classified:j,beepsound:v}),x(""),h("")},children:"Send Announcement"}),(0,r.jsxs)(o.BJ,{align:"center",children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.ms,{options:u,selected:v,onSelected:function(e){return w(e)},disabled:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"volume-up",disabled:j,tooltip:"Test sound",onClick:function(){return t("test_sound",{sound:v})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n.Checkbox,{fluid:!0,checked:j,tooltip:j?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!j)},children:"Classified"})})]})]})})})}},6185:function(e,n,t){"use strict";t.r(n),t.d(n,{CompostBin:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(7946),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0,p=e.setViewingPhoto,g=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["setViewingPhoto"]);return(0,r.jsx)(o.wn,h(f({title:"Available Contracts",overflow:"auto",buttons:(0,r.jsxs)(o.$n,{disabled:!u||m,icon:"parachute-box",onClick:function(){return t("extract")},children:["Call Extraction"," ",m&&(0,r.jsx)(c.Gi,{timeEnd:d.time_left,format:function(e,n){return n.substr(3)}})]})},g),{children:l.slice().sort(function(e,n){return 1===e.status?-1:1===n.status?1:e.status-n.status}).map(function(e){var n;return(0,r.jsx)(o.wn,{title:(0,r.jsxs)(o.so,{children:[(0,r.jsx)(o.so.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,r.jsx)(o.so.Item,{basis:"content",children:e.has_photo&&(0,r.jsx)(o.$n,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return p("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,r.jsxs)(o.az,{width:"100%",children:[!!x[e.status]&&(0,r.jsx)(o.az,{color:x[e.status][1],inline:!0,mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:x[e.status][0]}),1===e.status&&(0,r.jsx)(o.$n.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return t("abort")}})]}),children:(0,r.jsxs)(o.so,{children:[(0,r.jsxs)(o.so.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,r.jsxs)(o.az,{color:"good",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,r.jsxs)(o.az,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,r.jsxs)(o.az,{color:"bad",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,r.jsxs)(o.so.Item,{flexBasis:"100%",children:[(0,r.jsxs)(o.so,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",w(e)]}),null==(n=e.difficulties)?void 0:n.map(function(n,i){return(0,r.jsx)(o.$n.Confirm,{disabled:!!s,content:n.name+" ("+n.reward+" TC)",onClick:function(){return t("activate",{uid:e.uid,difficulty:i+1})}},i)}),!!e.objective&&(0,r.jsxs)(o.az,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,r.jsx)("br",{}),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)})}))},w=function(e){if(e.objective&&!(e.status>1)){var n=e.objective.locs.user_area_id,t=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,a=e.objective.locs.target_coords,c=n===i;return(0,r.jsx)(o.so.Item,{children:(0,r.jsx)(o.In,{name:c?"dot-circle-o":"arrow-alt-circle-right-o",color:c?"green":"yellow",rotation:c?null:-(0,l.KJ)(Math.atan2(a[1]-t[1],a[0]-t[0])),lineHeight:c?null:"0.85",size:"1.5"})})}},k=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.rep,c=i.buyables;return(0,r.jsx)(o.wn,h(f({title:"Available Purchases",overflow:"auto"},e),{children:c.map(function(e){return(0,r.jsxs)(o.wn,{title:e.name,children:[e.description,(0,r.jsx)("br",{}),(0,r.jsx)(o.$n.Confirm,{disabled:l-1&&(0,r.jsxs)(o.az,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)})}))},_=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,i=[e],r=d(r),(n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(r,i||[],d(this).constructor):r.apply(this,i))).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e),n=[{key:"tick",value:function(){var e=this.props,n=this.state;n.currentIndex<=e.allMessages.length?(this.setState(function(e){return{currentIndex:e.currentIndex+1}}),n.currentDisplay.push(e.allMessages[n.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))}},{key:"componentDidMount",value:function(){var e=this,n=this.props.linesPerSecond;this.timer=setInterval(function(){return e.tick()},1e3/(void 0===n?2.5:n))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){return(0,r.jsx)(o.az,{m:1,children:this.state.currentDisplay.map(function(e){return(0,r.jsxs)(i.Fragment,{children:[e,(0,r.jsx)("br",{})]},e)})})}}],function(e,n){for(var t=0;ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.slowFactor,s=a.oneWay,u=a.position;return(0,r.jsx)(l.p8,{width:350,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,r.jsx)(i.Ki.Item,{label:"Allow reverse",children:(0,r.jsx)(i.$n.Checkbox,{checked:!s,onClick:function(){return t("toggleOneWay")}})}),(0,r.jsx)(i.Ki.Item,{label:"Slowdown factor",children:(0,r.jsxs)(i.so,{children:[(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-left",onClick:function(){return t("slowFactor",{value:c-5})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-left",onClick:function(){return t("slowFactor",{value:c-1})}})," "]}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.Ap,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,n){return t("slowFactor",{value:n})}})}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-right",onClick:function(){return t("slowFactor",{value:c+1})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-right",onClick:function(){return t("slowFactor",{value:c+5})}})," "]})]})})]})})})})}},6714:function(e,n,t){"use strict";t.r(n),t.d(n,{CrewMonitor:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(7946),u=t(421),d=t(3384);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=2||s.ignoreSensors?(0,r.jsxs)(l.az,{inline:!0,ml:1,children:["(",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.oxy,children:e.oxy}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.toxin,children:e.tox}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.burn,children:e.fire}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.brute,children:e.brute}),")"]}):null]}),(0,r.jsx)(l.XI.Cell,{children:3===e.sensor_type||s.ignoreSensors?s.isAI||s.isObserver?(0,r.jsx)(l.$n,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return t("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,r.jsx)(l.az,{inline:!0,color:"grey",children:"Not Available"})})]},n)})]})]})},g=function(e){var n,t,i=e.color,o=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["color"]);return(0,r.jsx)(s.tx.Marker,(n=function(e){for(var n=1;ns});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],c=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=function(e){return(0,r.jsx)(l.p8,{width:520,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(u,{})})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,s=l.isOperating,u=l.hasOccupant,f=l.occupant,h=void 0===f?[]:f,m=l.cellTemperature,p=l.cellTemperatureStatus,x=l.isBeakerLoaded,g=l.cooldownProgress,j=l.auto_eject_healthy,b=l.auto_eject_dead;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectOccupant")},disabled:!u,children:"Eject"}),children:u?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,r.jsx)(i.zv,{value:Math.round(h.health)})})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[h.stat][0],children:c[h.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(h.bodyTemperature)})," K"]}),(0,r.jsx)(i.Ki.Divider,{}),a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.label,children:(0,r.jsx)(i.z2,{value:h[e.type]/100,ranges:{bad:[.01,1/0]},children:(0,r.jsx)(i.zv,{value:Math.round(h[e.type])})})},e.id)})]}):(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Cell",buttons:(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("ejectBeaker")},disabled:!x,children:"Eject Beaker"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",onClick:function(){return t(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",color:p,children:[(0,r.jsx)(i.zv,{value:m})," K"]}),(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.Ki.Item,{label:"Dosage interval",children:(0,r.jsx)(i.z2,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!x&&"average",value:g,minValue:0,maxValue:100})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject healthy occupants",children:(0,r.jsx)(i.$n,{icon:j?"toggle-on":"toggle-off",selected:j,onClick:function(){return t(j?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:j?"On":"Off"})}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject dead occupants",children:(0,r.jsx)(i.$n,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return t(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"On":"Off"})})]})})})]})},d=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.isBeakerLoaded,a=t.beakerLabel,c=t.beakerVolume;return l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{inline:!0,color:!a&&"average",children:[a||"No label",":"]}),(0,r.jsx)(i.az,{inline:!0,color:!c&&"bad",ml:1,children:c?(0,r.jsx)(i.zv,{value:c,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})]}):(0,r.jsx)(i.az,{inline:!0,color:"bad",children:"No beaker loaded"})}},2394:function(e,n,t){"use strict";t.r(n),t.d(n,{CryopodConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.account_name,o=n.allow_items;return(0,r.jsx)(a.p8,{title:"Cryopod Console",width:400,height:480,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Hello, ".concat(t||"[REDACTED]","!"),children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,r.jsx)(s,{}),!!o&&(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)().data.frozen_crew;return(0,r.jsx)(i.Nt,{title:"Stored Crew",children:n.length?(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:n.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:e.rank},n)})})}):(0,r.jsx)(i.IC,{children:"No stored crew!"})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.frozen_items,c=function(e){var n=e.toString();return n.startsWith("the ")&&(n=n.slice(4,n.length)),(0,o.Sn)(n)};return(0,r.jsx)(i.Nt,{title:"Stored Items",children:a.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:c(e.name),buttons:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return t("one_item",{item:e.uid})}})},e)})})}),(0,r.jsx)(i.$n,{content:"Drop All Items",color:"red",onClick:function(){return t("all_items")}})]}):(0,r.jsx)(i.IC,{children:"No stored items!"})})}},3372:function(e,n,t){"use strict";t.r(n),t.d(n,{DNAModifier:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50],d=function(){var e,n=(0,o.Oc)(),t=(n.act,n.data),c=t.irradiating,s=t.dnaBlockSize,u=t.occupant,d=!u.isViableSubject||!u.uniqueIdentity||!u.structuralEnzymes;return c&&(e=(0,r.jsx)(v,{duration:c})),(0,r.jsxs)(l.p8,{width:660,height:800,children:[(0,r.jsx)(a.ComplexModal,{}),e,(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(f,{isDNAInvalid:d})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(h,{dnaBlockSize:s,isDNAInvalid:d})})]})})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,s=l.hasOccupant,u=l.occupant,d=e.isDNAInvalid;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,r.jsx)(i.$n,{disabled:!s,selected:a,icon:a?"toggle-on":"toggle-off",content:a?"Engaged":"Disengaged",onClick:function(){return t("toggleLock")}}),(0,r.jsx)(i.$n,{disabled:!s||a,icon:"user-slash",content:"Eject",onClick:function(){return t("ejectOccupant")}})]}),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:u.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:u.minHealth,maxValue:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[u.stat][0],children:c[u.stat][1]}),(0,r.jsx)(i.Ki.Divider,{})]})}),d?(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Radiation",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:u.radiationLevel/100,color:"average"})}),(0,r.jsx)(i.Ki.Item,{label:"Unique Enzymes",children:l.occupant.uniqueEnzymes?l.occupant.uniqueEnzymes:(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})]}):(0,r.jsx)(i.az,{color:"label",children:"Cell unoccupied."})})},h=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.selectedMenuKey,u=a.hasOccupant,d=e.dnaBlockSize,f=e.isDNAInvalid;return u?f?(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No operation possible on this subject."]})})}):("ui"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"se"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"buffer"===c?n=(0,r.jsx)(g,{}):"rejuvenators"===c&&(n=(0,r.jsx)(y,{})),(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.tU,{children:s.map(function(e,n){return(0,r.jsx)(i.tU.Tab,{icon:e[2],selected:c===e[0],onClick:function(){return l("selectMenuKey",{key:e[0]})},children:e[1]},n)})}),n]})):(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant in DNA modifier."]})})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedUIBlock,c=l.selectedUISubBlock,s=l.selectedUITarget,u=l.occupant,d=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Unique Identifier",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:u.uniqueIdentity,selectedBlock:a,selectedSubblock:c,blockSize:d,action:"selectUIBlock"})})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:15,stepPixelSize:20,value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,n){return t("changeUITarget",{value:n})}})})}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return t("pulseUIRadiation")}})]})]})})},p=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedSEBlock,c=l.selectedSESubBlock,s=l.occupant,u=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Structural Enzymes",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:s.structuralEnzymes,selectedBlock:a,selectedSubblock:c,blockSize:u,action:"selectSEBlock"})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",onClick:function(){return t("pulseSERadiation")}})})]})})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.radiationIntensity,a=t.radiationDuration;return(0,r.jsxs)(i.wn,{title:"Radiation Emitter",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Intensity",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationIntensity",{value:t})}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:a,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationDuration",{value:t})}})})]}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){return n("pulseRadiation")}})]})},g=function(){var e=(0,o.Oc)().data.buffers.map(function(e,n){return(0,r.jsx)(j,{id:n+1,name:"Buffer "+(n+1),buffer:e},n)});return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:"75%",mt:1,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Buffers",children:e})}),(0,r.jsx)(i.BJ.Item,{height:"25%",children:(0,r.jsx)(b,{})})]})},j=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.id,c=e.name,s=e.buffer,u=l.isInjectorReady,d=c+(s.data?" - "+s.label:"");return(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsxs)(i.wn,{title:d,mx:"0",lineHeight:"18px",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return t("bufferOption",{option:"clear",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return t("bufferOption",{option:"changeLabel",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data||!l.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){return t("bufferOption",{option:"saveDisk",id:a})}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Write",children:[(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUI",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUIAndUE",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveSE",id:a})}}),(0,r.jsx)(i.$n,{disabled:!l.hasDisk||!l.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return t("bufferOption",{option:"loadDisk",id:a})}})]}),!!s.data&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Subject",children:s.owner||(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.jsxs)(i.Ki.Item,{label:"Transfer to",children:[(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a})}}),(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a,block:1})}}),(0,r.jsx)(i.$n,{icon:"user",content:"Subject",mb:"0",onClick:function(){return t("bufferOption",{option:"transfer",id:a})}})]})]})]}),!s.data&&(0,r.jsx)(i.az,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.hasDisk,a=t.disk;return(0,r.jsx)(i.wn,{title:"Data Disk",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!l||!a.data,icon:"trash",content:"Wipe",onClick:function(){return n("wipeDisk")}}),(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectDisk")}})]}),children:l?a.data?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Label",children:a.label?a.label:"No label"}),(0,r.jsx)(i.Ki.Item,{label:"Subject",children:a.owner?a.owner:(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===a.type?"Unique Identifiers":"Structural Enzymes",!!a.ue&&" and Unique Enzymes"]})]}):(0,r.jsx)(i.az,{color:"label",children:"Disk is blank."}):(0,r.jsxs)(i.az,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.jsx)(i.In,{name:"save-o",size:4}),(0,r.jsx)("br",{}),"No disk inserted."]})})},y=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.isBeakerLoaded,a=t.beakerVolume,c=t.beakerLabel;return(0,r.jsx)(i.wn,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectBeaker")}}),children:l?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Inject",children:[u.map(function(e,t){return(0,r.jsx)(i.$n,{disabled:e>a,icon:"syringe",content:e,onClick:function(){return n("injectRejuvenators",{amount:e})}},t)}),(0,r.jsx)(i.$n,{disabled:a<=0,icon:"syringe",content:"All",onClick:function(){return n("injectRejuvenators",{amount:a})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Beaker",children:[(0,r.jsx)(i.az,{mb:"0.5rem",children:c||"No label"}),a?(0,r.jsxs)(i.az,{color:"good",children:[a," unit",1===a?"":"s"," remaining"]}):(0,r.jsx)(i.az,{color:"bad",children:"Empty"})]})]}):(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,align:"center",justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"flask",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]})}),(0,r.jsx)(i.BJ.Item,{bold:!0,color:"label",mb:"2rem",children:(0,r.jsx)("h3",{children:"No Beaker Loaded"})})]})})},v=function(e){var n=e.duration;return(0,r.jsxs)(i.Rr,{textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",size:5,spin:!0}),(0,r.jsx)("br",{}),(0,r.jsx)(i.az,{color:"average",children:(0,r.jsxs)("h1",{children:[(0,r.jsx)(i.In,{name:"radiation"}),"\xa0Irradiating occupant\xa0",(0,r.jsx)(i.In,{name:"radiation"})]})}),(0,r.jsx)(i.az,{color:"label",children:(0,r.jsxs)("h3",{children:["For ",n," second",1===n?"":"s"]})})]})},w=function(e){for(var n=function(e){for(var n=e/s+1,o=[],l=0;ls});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(5490),c=t(4530),s=(0,c.createContext)({categoryStyles:[],removalMode:null}),u=function(e){var n=e.decal_typepath,t=e.direction,o=e.isSelected,l=e.onSelect,c="".concat(n.replace(/\//g,"_"),"_").concat(t);return(0,r.jsx)(i.az,{m:"2px",className:(0,a.Ly)(["decal_painter32x32",c]),onClick:l,style:{outlineStyle:o&&"solid"||"none",outlineWidth:"2px",outlineColor:"orange"}})},d=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedCategory,a=t.categories;return(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{selected:e==l,onClick:function(){return n("set_category",{category:e})},children:e})})})})})},f=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.removalMode,d=(0,c.useContext)(s).categoryStyles;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.so,{wrap:"wrap",children:d.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(u,{decal_typepath:e.typepath,direction:2,isSelected:l===e.typepath&&!a,onSelect:function(){return n("set_decal_type",{decal_type:e.typepath})}})},e.typepath)})})})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.selectedDir,c=t.removalMode;return(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,0,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:0===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(u,{decal_typepath:l,direction:e,isSelected:e===a&&!c,onSelect:function(){return n("set_direction",{direction:e})}})},e)})},e)})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,a=t.availableStyles,c=t.removalMode,u=a[t.selectedCategory];return(0,r.jsx)(l.p8,{width:650,height:565,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(s.Provider,{value:{categoryStyles:u,removalMode:c},children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Preview",children:[(0,r.jsx)(h,{}),(0,r.jsx)(i.$n,{icon:"eraser",color:c?"green":"transparent",onClick:function(){return n("toggle_removal_mode")},children:"Remove decals"})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Decals",children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{})]})})]})})})})}},3883:function(e,n,t){"use strict";t.r(n),t.d(n,{DestinationTagger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.destinations,u=c.selected_destination_id,d=s[u-1];return(0,r.jsx)(l.p8,{width:355,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,textAlign:"center",title:"TagMaster 3.1",children:[(0,r.jsxs)(i.az,{width:"100%",textAlign:"center",children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Selected:"})," ",null!=(n=d.name)?n:"None"]}),(0,r.jsx)(i.az,{mt:1.5,children:(0,r.jsx)(i.BJ,{overflowY:"auto",wrap:"wrap",align:"center",justify:"space-evenly",direction:"row",children:s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{m:"2px",children:(0,r.jsx)(i.$n,{color:"transparent",width:"105px",textAlign:"center",content:e.name,selected:e.id===u,onClick:function(){return a("select_destination",{destination:e.id})}})},n)})})})]})})})})}},6381:function(e,n,t){"use strict";t.r(n),t.d(n,{DisposalBin:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data;return 2===s.mode?(n="good",t="Ready"):s.mode<=0?(n="bad",t="N/A"):1===s.mode?(n="average",t="Pressurizing"):(n="average",t="Idle"),(0,r.jsx)(l.p8,{width:300,height:260,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"State",color:n,children:t}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{ranges:{bad:[-1/0,0],average:[0,99],good:[99,1/0]},value:s.pressure,minValue:0,maxValue:100})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Handle",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:s.isAI||s.panel_open,content:"Disengaged",selected:!s.flushing,onClick:function(){return c("disengageHandle")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:s.isAI||s.panel_open,content:"Engaged",selected:s.flushing,onClick:function(){return c("engageHandle")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:-1===s.mode,content:"Off",selected:!s.mode,onClick:function(){return c("pumpOff")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:-1===s.mode,content:"On",selected:s.mode,onClick:function(){return c("pumpOn")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Eject",children:(0,r.jsx)(i.$n,{icon:"sign-out-alt",disabled:s.isAI,content:"Eject Contents",onClick:function(){return c("eject")}})})]})})]})})}},2908:function(e,n,t){"use strict";t.r(n),t.d(n,{DnaVault:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).completed;return(0,r.jsx)(a.p8,{width:350,height:270,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),!!t&&(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.dna,a=t.dna_max,c=t.plants,s=t.plants_max,u=t.animals,d=t.animals_max;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"DNA Vault Database",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Human DNA",children:(0,r.jsx)(i.z2,{value:l/a,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:l+" / "+a+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Plant DNA",children:(0,r.jsx)(i.z2,{value:c/s,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:c+" / "+s+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Animal DNA",children:(0,r.jsx)(i.z2,{value:u/d,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:u+" / "+d+" Samples"})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.choiceA,s=a.choiceB,u=a.used;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{fill:!0,title:"Personal Gene Therapy",children:[(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),!u&&(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:c,textAlign:"center",onClick:function(){return t("gene",{choice:c})}})}),(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return t("gene",{choice:s})}})})]})||(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Users DNA deemed unstable. Unable to provide more upgrades."})]})})}},2480:function(e,n,t){"use strict";t.r(n),t.d(n,{DroneConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){return(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.drone_fab,c=o.fab_power,s=o.drone_prod,u=o.drone_progress;return(0,r.jsx)(i.wn,{title:"Drone Fabricator",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"Online":"Offline",color:s?"green":"red",onClick:function(){return t("toggle_fab")}}),children:a?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Power",children:(0,r.jsxs)(i.az,{color:c?"good":"bad",children:["[ ",c?"Online":"Offline"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Drone Production",children:(0,r.jsx)(i.z2,{value:u/100,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})})]}):(0,r.jsx)(i.IC,{textAlign:"center",danger:1,children:(0,r.jsxs)(i.so,{inline:1,direction:"column",children:[(0,r.jsx)(i.so.Item,{children:"FABRICATOR NOT DETECTED."}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{icon:"search",content:"Search",onClick:function(){return t("find_fab")}})})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.drones,s=a.area_list,u=a.selected_area,d=a.ping_cd,f=function(e,n){var t,o;return 2===e?(t="bad",o="Disabled"):1!==e&&n?(t="good",o="Active"):(t="average",o="Inactive"),(0,r.jsx)(i.az,{color:t,children:o})};return(0,r.jsxs)(i.wn,{title:"Maintenance Units",children:[(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{children:"Request Drone presence in area:\xa0"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"125px",onSelected:function(e){return t("set_area",{area:e})}})})]}),(0,r.jsx)(i.$n,{content:"Send Ping",icon:"broadcast-tower",disabled:d||!c.length,title:c.length?null:"No active drones!",fluid:!0,textAlign:"center",py:.4,mt:.6,onClick:function(){return t("ping")}}),(0,r.jsx)(function(){if(c.length)return(0,r.jsx)(i.az,{py:.2,children:(0,r.jsx)(i.cG,{})})},{}),c.map(function(e){return(0,r.jsx)(i.wn,{title:(0,o.Sn)(e.name),buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sync",content:"Resync",disabled:2===e.stat||e.sync_cd,onClick:function(){return t("resync",{uid:e.uid})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Confirm,{icon:"power-off",content:"Recall",disabled:2===e.stat||e.pathfinding,tooltip:e.pathfinding?"This drone is currently pathfinding, please wait.":null,tooltipPosition:"left",color:"bad",onClick:function(){return t("recall",{uid:e.uid})}})})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:f(e.stat,e.client)}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:e.health,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Charge",children:(0,r.jsx)(i.z2,{value:e.charge,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location})]})},e.name)})]})}},1654:function(e,n,t){"use strict";t.r(n),t.d(n,{EFTPOS:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf,ERTOverview:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj?"red":"green",children:[g," total, versus ",j," spawnpoints"]})}),(0,r.jsx)(o.Ki.Item,{label:"Dispatch",children:(0,r.jsx)(o.$n,{width:10.5,textAlign:"center",icon:"ambulance",onClick:function(){return n("dispatch_ert",{silent:v})},children:"Send ERT"})})]})})})},p=function(){var e=(0,a.Oc)(),n=e.act,t=e.data.ert_request_messages;return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:t&&t.length?t.map(function(e){return(0,r.jsx)(o.wn,{title:e.time,buttons:(0,r.jsx)(o.$n,{onClick:function(){return n("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel",children:e.sender_real_name}),children:e.message},(0,l.jT)(e.time))}):(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsxs)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(o.In.Stack,{children:[(0,r.jsx)(o.In,{name:"broadcast-tower",size:5,color:"gray"}),(0,r.jsx)(o.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No ERT requests."]})})})})},x=function(){var e=(0,a.Oc)().act,n=u((0,i.useState)(""),2),t=n[0],l=n[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.fs,{placeholder:"Enter ERT denial reason here. Shift-Enter to add a new line.",fluid:!0,height:24,value:t,onChange:function(e){return l(e)}}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"times",mt:2,textAlign:"center",onClick:function(){return e("deny_ert",{reason:t})},children:"Deny ERT"})]})})}},9644:function(e,n,t){"use strict";t.r(n),t.d(n,{EconomyManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:325,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.next_payroll_time;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{label:"Pay Bonuses and Deductions",children:[(0,r.jsx)(i.Ki.Item,{label:"Global",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"global"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Members",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department_members"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Single Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(i.az,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,r.jsx)(i.$n,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return t("delay_payroll")}}),(0,r.jsx)(i.$n,{width:"auto",content:"Set Payroll Time",onClick:function(){return t("set_payroll")}}),(0,r.jsx)(i.$n,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return t("accelerate_payroll")}})]}),(0,r.jsxs)(i.IC,{children:[(0,r.jsx)("b",{children:"WARNING:"})," You take full responsibility for unbalancing the economy with these buttons!"]})]})}},6426:function(e,n,t){"use strict";t.r(n),t.d(n,{Electropack:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.power,u=c.code,d=c.frequency,f=c.minFrequency,h=c.maxFrequency;return(0,r.jsx)(a.p8,{width:360,height:135,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Frequency",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"freq"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:f/10,maxValue:h/10,value:d/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"code"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e){return t("code",{code:e})}})})]})})})})}},9480:function(e,n,t){"use strict";t.r(n),t.d(n,{Emojipedia:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";return e&&0!==e.length?(e=(0,i.pb)(e,function(e){return!!(null==e?void 0:e.name)}),n&&(e=(0,i.pb)(e,(0,a.XZ)(n,function(e){return e.name+"|"+e.description}))),(0,i.Ul)(e,function(e){return null==e?void 0:e.name})):[]},C=function(e){if(y(e),""===e)return k(x.abilities);k(_(f.map(function(e){return e.abilities}).flat(),e))},I=function(e){g(e),k(e.abilities),y("")};return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.pd,{width:"200px",placeholder:"Search Abilities",onChange:function(e){C(e)},value:b}),(0,r.jsx)(l.$n,{icon:m?"square-o":"check-square-o",selected:!m,content:"Compact",onClick:function(){return t("set_view_mode",{mode:0})}}),(0,r.jsx)(l.$n,{icon:m?"check-square-o":"square-o",selected:m,content:"Expanded",onClick:function(){return t("set_view_mode",{mode:1})}})]}),children:[(0,r.jsx)(l.tU,{children:f.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===b&&x===e,onClick:function(){I(e)},children:e.category},e)})}),w.map(function(e,n){return(0,r.jsxs)(l.az,{p:.5,mx:-1,className:"candystripe",children:[(0,r.jsxs)(l.BJ,{align:"center",children:[(0,r.jsx)(l.BJ.Item,{ml:.5,color:"#dedede",children:e.name}),h.includes(e.power_path)&&(0,r.jsx)(l.BJ.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,r.jsxs)(l.BJ.Item,{mr:3,textAlign:"right",grow:1,children:[(0,r.jsxs)(l.az,{as:"span",color:"label",children:["Cost:"," "]}),(0,r.jsx)(l.az,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,r.jsx)(l.BJ.Item,{textAlign:"right",children:(0,r.jsx)(l.$n,{mr:.5,disabled:e.cost>u||h.includes(e.power_path),content:"Evolve",onClick:function(){return t("purchase",{power_path:e.power_path})}})})]}),!!m&&(0,r.jsx)(l.BJ,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},n)})]})})}},6251:function(e,n,t){"use strict";t.r(n),t.d(n,{ExosuitFabricator:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(7946),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(0,r.jsx)(o.$n,{icon:"arrow-up",onClick:function(){return t("queueswap",{from:n+1,to:n})}}),n0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--time",children:[(0,r.jsx)(o.cG,{}),"Processing time:",(0,r.jsx)(o.In,{name:"clock",mx:"0.5rem"}),(0,r.jsx)(o.az,{inline:!0,bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(s).length>0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,r.jsx)(o.cG,{}),"Lacking materials to complete:",s.map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])})]})]})})})},j=function(e){var n,t,i=(0,c.Oc)(),a=(i.act,i.data),s=e.id,u=e.amount,d=e.lineDisplay,f=e.onClick,h=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["id","amount","lineDisplay","onClick"]),m=a.materials[s]||0,p=u||m;if(!(p<=0)||"metal"===s||"glass"===s)return(0,r.jsx)(o.BJ,(n=function(e){for(var n=1;nm&&"bad",ml:0,mr:1,children:p.toLocaleString("en-US")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{basis:"content",children:(0,r.jsx)(o.$n,{width:"85%",color:"transparent",onClick:f,children:(0,r.jsx)(o.az,{mt:1,className:(0,l.Ly)(["materials32x32",s])})})}),(0,r.jsxs)(o.BJ.Item,{grow:"1",children:[(0,r.jsx)(o.az,{className:"Exofab__material--name",children:s}),(0,r.jsxs)(o.az,{className:"Exofab__material--amount",children:[p.toLocaleString("en-US")," cm\xb3 (",Math.round(p/2e3*10)/10," ","sheets)"]})]})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,l=e.design;return(0,r.jsxs)(o.az,{className:"Exofab__design",children:[(0,r.jsx)(o.$n,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return t("build",{id:l.id})}}),(0,r.jsx)(o.$n,{icon:"plus-circle",onClick:function(){return t("queue",{id:l.id})}}),(0,r.jsx)(o.az,{className:"Exofab__design--cost",children:Object.entries(l.cost).map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])})}),(0,r.jsx)(o.BJ,{className:"Exofab__design--time",children:(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.In,{name:"clock"}),l.time>0?(0,r.jsxs)(r.Fragment,{children:[l.time/10," seconds"]}):"Instant"]})})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data.controllers;return(0,r.jsx)(u.p8,{children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(o.wn,{title:"Setup Linkage",children:(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Network Address"}),(0,r.jsx)(o.XI.Cell,{children:"Network ID"}),(0,r.jsx)(o.XI.Cell,{children:"Link"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.addr}),(0,r.jsx)(o.XI.Cell,{children:e.net_id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})},v=function(e){var n=(0,c.Oc)(),t=(n.act,n.data).tech_levels,i=e.showLevelsModal,l=e.setShowLevelsModal;return i?(0,r.jsx)(o.aF,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:(0,r.jsx)(o.wn,{title:"Current tech levels",buttons:(0,r.jsx)(o.$n,{content:"Close",onClick:function(){l(!1)}}),children:(0,r.jsx)(o.Ki,{children:t.map(function(e){var n=e.name,t=e.level;return(0,r.jsx)(o.Ki.Item,{label:n,children:t},n)})})})}):null}},9621:function(e,n,t){"use strict";t.r(n),t.d(n,{ExperimentConsole:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),c=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),s=function(e){var n=(0,o.Oc)(),t=n.act,s=n.data,u=s.open,d=s.feedback,f=s.occupant,h=s.occupant_name,m=s.occupant_status,p=function(){if(!f)return(0,r.jsx)(i.IC,{children:"No specimen detected."});var e=a.get(m);return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:h}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:e.color,children:e.text}),(0,r.jsx)(i.Ki.Item,{label:"Experiments",children:[0,1,2].map(function(e){return(0,r.jsx)(i.$n,{icon:c.get(e).icon,content:c.get(e).label,onClick:function(){return t("experiment",{experiment_type:e})}},e)})})]})}();return(0,r.jsx)(l.p8,{theme:"abductor",width:350,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Status",children:d})})}),(0,r.jsx)(i.wn,{title:"Scanner",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return t("door")}}),children:p})]})})}},5091:function(e,n,t){"use strict";t.r(n),t.d(n,{ExternalAirlockController:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n="good";return e<80?n="bad":e<95||e>110?n="average":e>120&&(n="bad"),n},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.chamber_pressure,u=(c.exterior_status,c.interior_status),d=c.processing;return(0,r.jsx)(l.p8,{width:330,height:205,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Chamber Pressure",children:(0,r.jsxs)(i.z2,{color:a(s),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,r.jsxs)(i.wn,{title:"Actions",buttons:(0,r.jsx)(i.$n,{content:"Abort",icon:"ban",color:"red",disabled:!d,onClick:function(){return t("abort")}}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:d,onClick:function(){return t("cycle_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:d,onClick:function(){return t("cycle_int")}})]}),(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_int")}})]})]})]})})}},6325:function(e,n,t){"use strict";t.r(n),t.d(n,{FaxMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:540,height:295,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:a.scan_name?"eject":"id-card",selected:a.scan_name,content:a.scan_name?a.scan_name:"-----",tooltip:a.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})}),(0,r.jsx)(i.Ki.Item,{label:"Authorize",children:(0,r.jsx)(i.$n,{icon:a.authenticated?"sign-out-alt":"id-card",selected:a.authenticated,disabled:a.nologin,content:a.realauth?"Log Out":"Log In",onClick:function(){return t("auth")}})})]})}),(0,r.jsx)(i.wn,{title:"Fax Menu",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Network",children:a.network}),(0,r.jsxs)(i.Ki.Item,{label:"Document",children:[(0,r.jsx)(i.$n,{icon:a.paper?"eject":"paperclip",disabled:!a.authenticated&&!a.paper,content:a.paper?a.paper:"-----",onClick:function(){return t("paper")}}),!!a.paper&&(0,r.jsx)(i.$n,{icon:"pencil-alt",content:"Rename",onClick:function(){return t("rename")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Sending To",children:(0,r.jsx)(i.$n,{icon:"print",content:a.destination?a.destination:"-----",disabled:!a.authenticated,onClick:function(){return t("dept")}})}),(0,r.jsx)(i.Ki.Item,{label:"Action",children:(0,r.jsx)(i.$n,{icon:"envelope",content:a.sendError?a.sendError:"Send",disabled:!a.paper||!a.destination||!a.authenticated||a.sendError,onClick:function(){return t("send")}})})]})})]})})}},9788:function(e,n,t){"use strict";t.r(n),t.d(n,{FilingCabinet:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=n.config,s=a.contents,u=c.title;return(0,r.jsx)(l.p8,{width:400,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Contents",children:[!s&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"folder-open",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"The ",u," is empty."]})}),!!s&&s.slice().map(function(e){return(0,r.jsxs)(i.BJ,{mt:.5,className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"80%",children:e.display_name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Retrieve",onClick:function(){return t("retrieve",{index:e.index})}})})]},e)})]})})})})}},26:function(e,n,t){"use strict";t.r(n),t.d(n,{FloorPainter:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=e.icon_state,a=e.direction,c=e.isSelected,s=e.onSelect;return(0,r.jsx)(i.Hg,{icon:t.icon,icon_state:l,direction:a,onClick:s,style:{borderStyle:c&&"solid"||"none",borderWidth:"2px",borderColor:"orange",padding:c&&"0px"||"2px"}})},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,f=c.wideMode;return(0,r.jsx)(l.p8,{width:405,height:475,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.wn,{title:"Floor setup",children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-left",onClick:function(){return t("cycle_style",{offset:-1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(e){return t("select_style",{style:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-right",onClick:function(){return t("cycle_style",{offset:1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eraser",color:f?"green":"transparent",onClick:function(){return t("wide_mode")},children:"Wide mode"})})]}),(0,r.jsx)(i.az,{mt:"5px",mb:"5px",children:(0,r.jsx)(i.so,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:s.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(a,{icon_state:e,isSelected:u===e,onSelect:function(){return t("select_style",{style:e})}})},e)})})}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Direction",children:(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,null,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:null===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(a,{icon_state:u,direction:e,isSelected:e===d,onSelect:function(){return t("select_direction",{direction:e})}})},e)})},e)})})})})]})})})}},1561:function(e,n,t){"use strict";t.r(n),t.d(n,{GPS:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]}),void 0!==e.due&&(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.In,{name:"arrow-up",rotation:e.due}),"\xa0--"]})]}),(0,r.jsx)(o.XI.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:d(e.position)})]},n)})})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}},1259:function(e,n,t){"use strict";t.r(n),t.d(n,{GeneModder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)().data.has_seed;return(0,r.jsxs)(l.p8,{width:950,height:650,children:[(0,r.jsx)("div",{className:"GeneModder__left",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(x,{scrollable:!0})})}),(0,r.jsx)("div",{className:"GeneModder__right",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(a.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,r.jsx)(u,{}):(0,r.jsx)(s,{})]})})})]})},s=function(e){var n=(0,o.Oc)();return(n.act,n.data).disk,(0,r.jsxs)(i.wn,{title:"Genes",fill:!0,scrollable:!0,children:[(0,r.jsx)(f,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})},u=function(e){return(0,r.jsx)(i.wn,{fill:!0,height:"85%",children:(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,r.jsx)(i.In,{name:"leaf",size:5,mb:"10px"}),(0,r.jsx)("br",{}),"The plant DNA manipulator is missing a seed."]})})})},d=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.has_seed,u=c.seed,d=c.has_disk,f=c.disk;return n=s?(0,r.jsxs)(i.BJ.Item,{mb:"-6px",mt:"-4px",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(u.image),style:{verticalAlign:"middle",width:"32px",margin:"-1px",marginLeft:"-11px"}}),(0,r.jsx)(i.$n,{content:u.name,onClick:function(){return a("eject_seed")}}),(0,r.jsx)(i.$n,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return a("variant_name")}})]}):(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:"None",onClick:function(){return a("eject_seed")}})}),t=d?f.name:"None",(0,r.jsx)(i.wn,{title:"Storage",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Plant Sample",children:n}),(0,r.jsx)(i.Ki.Item,{label:"Data Disk",children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:t,tooltip:"Select Empty Disk",onClick:function(){return a("select_empty_disk")}})})})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.disk,c=l.core_genes;return(0,r.jsxs)(i.Nt,{title:"Core Genes",open:!0,children:[c.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("extract",{id:e.id})}})})]},e)})," ",(0,r.jsx)(i.BJ,{children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract All",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("bulk_extract_core")}})})})]},"Core Genes")},h=function(e){var n=(0,o.Oc)().data,t=n.reagent_genes,i=n.has_reagent;return(0,r.jsx)(p,{title:"Reagent Genes",gene_set:t,do_we_show:i})},m=function(e){var n=(0,o.Oc)().data,t=n.trait_genes,i=n.has_trait;return(0,r.jsx)(p,{title:"Trait Genes",gene_set:t,do_we_show:i})},p=function(e){var n=e.title,t=e.gene_set,l=e.do_we_show,a=(0,o.Oc)(),c=a.act,s=a.data.disk;return(0,r.jsx)(i.Nt,{title:n,open:!0,children:l?t.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==s?void 0:s.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove",icon:"times",onClick:function(){return c("remove",{id:e.id})}})})]},e)}):(0,r.jsx)(i.BJ.Item,{children:"No Genes Detected"})},n)},x=function(e){e.title,e.gene_set,e.do_we_show;var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_seed,c=l.empty_disks,s=l.stat_disks,u=l.trait_disks,d=l.reagent_disks;return(0,r.jsxs)(i.wn,{title:"Disks",children:[(0,r.jsx)("br",{}),"Empty Disks: ",c,(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){return t("eject_empty_disk")}}),(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stats",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[s.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:["All"===e.stat?(0,r.jsx)(i.$n,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(null==e?void 0:e.ready)||!a,icon:"arrow-circle-down",onClick:function(){return t("bulk_replace_core",{index:e.index})}}):(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!e||!a,content:"Replace",onClick:function(){return t("replace",{index:e.index,stat:e.stat})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Traits",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[u.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Reagents",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})})]})]})}},6954:function(e,n,t){"use strict";t.r(n),t.d(n,{GenericCrewManifest:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(2639),a=function(e){return(0,r.jsx)(o.p8,{theme:"nologo",width:588,height:510,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{noTopPadding:!0,children:(0,r.jsx)(l.CrewManifest,{})})})})}},9031:function(e,n,t){"use strict";t.r(n),t.d(n,{GhostHudPanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data,t=n.security,a=n.medical,s=n.diagnostic,u=n.pressure,d=n.radioactivity,f=n.ahud;return(0,r.jsx)(l.p8,{width:250,height:217,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(c,{label:"Medical",type:"medical",is_active:a}),(0,r.jsx)(c,{label:"Security",type:"security",is_active:t}),(0,r.jsx)(c,{label:"Diagnostic",type:"diagnostic",is_active:s}),(0,r.jsx)(c,{label:"Pressure",type:"pressure",is_active:u}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"toggle_rad",act_off:"toggle_rad"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Antag HUD",is_active:f,act_on:"ahud_on",act_off:"ahud_off"})]})})})},c=function(e){var n=(0,o.Oc)().act,t=e.label,l=e.type,a=void 0===l?null:l,c=e.is_active,s=e.act_on,u=void 0===s?"hud_on":s,d=e.act_off,f=void 0===d?"hud_off":d;return(0,r.jsxs)(i.so,{pt:.3,color:"label",children:[(0,r.jsx)(i.so.Item,{pl:.5,align:"center",width:"80%",children:t}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{mr:.6,content:c?"On":"Off",icon:c?"toggle-on":"toggle-off",selected:c,onClick:function(){return n(c?f:u,{hud_type:a})}})})]})}},3396:function(e,n,t){"use strict";t.r(n),t.d(n,{GlandDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.glands;return(0,r.jsx)(l.p8,{width:300,height:338,theme:"abductor",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(void 0===a?[]:a).map(function(e){return(0,r.jsx)(i.$n,{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 t("dispense",{gland_id:e.id})}},e.id)})})})})}},1009:function(e,n,t){"use strict";t.r(n),t.d(n,{GravityGen:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.charging_state,s=a.charge_count,u=a.breaker,d=a.ext_power;return(0,r.jsx)(l.p8,{width:350,height:170,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[function(e){if(e>0)return(0,r.jsxs)(i.IC,{danger:!0,p:1.5,children:[(0,r.jsx)("b",{children:"WARNING:"})," Radiation Detected!"]})}(c),(0,r.jsx)(i.wn,{fill:!0,title:"Generator Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){return t("breaker")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power Status",color:d?"good":"bad",children:c>0?(0,r.jsxs)(i.az,{inline:!0,color:"average",children:["[ ",1===c?"Charging":"Discharging"," ]"]}):(0,r.jsxs)(i.az,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Gravity Charge",children:(0,r.jsx)(i.z2,{value:s/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}},6294:function(e,n,t){"use strict";t.r(n),t.d(n,{GuestPass:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(l.p8,{width:500,height:690,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){return t("mode",{mode:0})},children:"Issue Pass"}),(0,r.jsxs)(i.tU.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){return t("mode",{mode:1})},children:["Records (",c.issue_log.length,")"]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})})})})}),(0,r.jsx)(i.BJ.Item,{children:!c.showlogs&&(0,r.jsx)(i.wn,{title:"Issue Guest Pass",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Issue To",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){return t("giv_name")}})}),(0,r.jsx)(i.Ki.Item,{label:"Reason",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){return t("reason")}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){return t("duration")}})})]})})}),!c.showlogs&&(c.scan_name?(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){return t("issue")}}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(e){return t("access",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}):(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"id-card",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,r.jsx)(i.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){return t("print")}}),children:!!c.issue_log.length&&(0,r.jsx)(i.Ki,{children:c.issue_log.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{children:e},n)})})||(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"scroll",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No logs"]})})})})]})})})}},9511:function(e,n,t){"use strict";t.r(n),t.d(n,{HandheldChemDispenser:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[1,5,10,20,30,50],c=function(e){return(0,r.jsx)(l.p8,{width:390,height:430,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.amount,s=l.energy,u=l.maxEnergy,d=l.mode;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Amount",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:a.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:c===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})}),(0,r.jsx)(i.Ki.Item,{label:"Mode",verticalAlign:"middle",children:(0,r.jsxs)(i.BJ,{justify:"space-between",children:[(0,r.jsx)(i.$n,{icon:"cog",selected:"dispense"===d,content:"Dispense",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"dispense"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"remove"===d,content:"Remove",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"remove"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"isolate"===d,content:"Isolate",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"isolate"})}})]})})]})})})},u=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=l.current_reagent,u=[],d=0;d<(c.length+1)%3;d++)u.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"18%",children:(0,r.jsxs)(i.wn,{fill:!0,title:l.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:s===e.id,content:e.title,style:{marginLeft:"2px"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),u.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:"1",basis:"25%"},n)})]})})}},3365:function(e,n,t){"use strict";t.r(n),t.d(n,{HealthSensor:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,u=c.on,d=c.user_health,f=c.minHealth,h=c.maxHealth,m=c.alarm_health;return(0,r.jsx)(a.p8,{width:300,height:125,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scanning",children:(0,r.jsx)(i.$n,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return t("scan_toggle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health activation",children:(0,r.jsx)(i.Q7,{animate:!0,step:2,stepPixelSize:6,minValue:f,maxValue:h,value:m,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("alarm_health",{alarm_health:e})}})}),null!==d&&(0,r.jsx)(i.Ki.Item,{label:"User health",children:(0,r.jsx)(i.az,{color:s(d),bold:d>=100,children:(0,r.jsx)(i.zv,{value:d})})})]})})})})},s=function(e){return e>50?"green":e>0?"orange":"red"}},5880:function(e,n,t){"use strict";t.r(n),t.d(n,{Holodeck:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(3384),l=t(2864),a=t(7542),c=t(2723),s=function(){var e=(0,l.Oc)(),n=e.act,t=e.data,s=t.card,u=t.card_skins,d=t.all_centcom_skins,f=t.regions;return(0,r.jsx)(o.p8,{width:600,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Basic Information",children:[(0,r.jsx)(a.CardInformation,{card:s}),(0,r.jsx)(i.Ki.Item,{label:"Job Name",children:(0,r.jsx)(i.$n,{icon:s&&"Unknown"!==s.rank?"pencil-alt":"exclamation-triangle",selected:!!s,onClick:function(){return n("set_job_name")},children:null==s?void 0:s.rank})})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(a.DropdownCardSkins,{is_centcom:!0,card:s,card_skins:u,all_centcom_skins:d})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(c.AccessList,{accesses:f,selectedList:s.access,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})}})})]})})})}},6126:function(e,n,t){"use strict";t.r(n),t.d(n,{Instrument:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)();return n.act,n.data,(0,r.jsxs)(l.p8,{width:600,height:505,children:[(0,r.jsx)(c,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(d,{})]})})]})},c=function(e){var n=(0,o.Oc)(),t=n.act;if(n.data.help)return(0,r.jsx)(i.aF,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.jsx)(i.wn,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.jsxs)(i.az,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.jsx)("h1",{children:"Making a Song"}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsx)("h1",{children:"Instrument Advanced Settings"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Type:"}),"\xa0Whether the instrument is legacy or synthesized.",(0,r.jsx)("br",{}),"Legacy instruments have a collection of sounds that are selectively used depending on the note to play.",(0,r.jsx)("br",{}),"Synthesized instruments use a base sound and change its pitch to match the note to play."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Current:"}),"\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),"\xa0The pitch to apply to all notes of the song."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain Mode:"}),"\xa0How a played note fades out.",(0,r.jsx)("br",{}),"Linear sustain means a note will fade out at a constant rate.",(0,r.jsx)("br",{}),"Exponential sustain means a note will fade out at an exponential rate, sounding smoother."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),"\xa0The volume threshold at which a note is fully stopped."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),"\xa0Whether the last note should be sustained indefinitely."]})]}),(0,r.jsx)(i.$n,{color:"grey",content:"Close",onClick:function(){return t("help")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.lines,c=l.playing,s=l.repeat,d=l.maxRepeats,f=l.tempo,h=l.minTempo,m=l.maxTempo,p=l.tickLag,x=l.volume,g=l.minVolume,j=l.maxVolume,b=l.ready;return(0,r.jsxs)(i.wn,{m:0,title:"Instrument",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"info",content:"Help",onClick:function(){return t("help")}}),(0,r.jsx)(i.$n,{icon:"file",content:"New",onClick:function(){return t("newsong")}}),(0,r.jsx)(i.$n,{icon:"upload",content:"Import",onClick:function(){return t("import")}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Playback",children:[(0,r.jsx)(i.$n,{selected:c,disabled:0===a.length||s<0,icon:"play",content:"Play",onClick:function(){return t("play")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"stop",content:"Stop",onClick:function(){return t("stop")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Repeat",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:0,maxValue:d,value:s,stepPixelSize:59,onChange:function(e,n){return t("repeat",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Tempo",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{disabled:f>=m,content:"-",as:"span",mr:"0.5rem",onClick:function(){return t("tempo",{new:f+p})}}),Math.round(600/f)," BPM",(0,r.jsx)(i.$n,{disabled:f<=h,content:"+",as:"span",ml:"0.5rem",onClick:function(){return t("tempo",{new:f-p})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Volume",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:g,maxValue:j,value:x,stepPixelSize:6,tickWhileDragging:!0,onChange:function(e,n){return t("setvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:b?(0,r.jsx)(i.az,{color:"good",children:"Ready"}):(0,r.jsx)(i.az,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.jsx)(u,{})]})},u=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.allowedInstrumentNames,u=c.instrumentLoaded,d=c.instrument,f=c.canNoteShift,h=c.noteShift,m=c.noteShiftMin,p=c.noteShiftMax,x=c.sustainMode,g=c.sustainLinearDuration,j=c.sustainExponentialDropoff,b=c.legacy,y=c.sustainDropoffVolume,v=c.sustainHeldNote;return 1===x?(n="Linear",t=(0,r.jsx)(i.Ap,{minValue:.1,maxValue:5,value:g,step:.5,stepPixelSize:85,format:function(e){return Math.round(100*e)/100+" seconds"},onChange:function(e,n){return a("setlinearfalloff",{new:n/10})}})):2===x&&(n="Exponential",t=(0,r.jsx)(i.Ap,{minValue:1.025,maxValue:10,value:j,step:.01,format:function(e){return Math.round(1e3*e)/1e3+"% per decisecond"},onChange:function(e,n){return a("setexpfalloff",{new:n})}})),s.sort(),(0,r.jsx)(i.az,{my:-1,children:(0,r.jsx)(i.Nt,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.jsxs)(i.wn,{mt:-1,children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:b?"Legacy":"Synthesized"}),(0,r.jsx)(i.Ki.Item,{label:"Current",children:u?(0,r.jsx)(i.ms,{options:s,selected:d,width:"50%",onSelected:function(e){return a("switchinstrument",{name:e})}}):(0,r.jsx)(i.az,{color:"bad",children:"None!"})}),!!(!b&&f)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Note Shift/Note Transpose",children:(0,r.jsx)(i.Ap,{minValue:m,maxValue:p,value:h,stepPixelSize:2,format:function(e){return e+" keys / "+Math.round(e/12*100)/100+" octaves"},onChange:function(e,n){return a("setnoteshift",{new:n})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Sustain Mode",children:[(0,r.jsx)(i.ms,{options:["Linear","Exponential"],selected:n,mb:"0.4rem",onSelected:function(e){return a("setsustainmode",{new:e})}}),t]}),(0,r.jsx)(i.Ki.Item,{label:"Volume Dropoff Threshold",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,n){return a("setdropoffvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Sustain indefinitely last held note",children:(0,r.jsx)(i.$n,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"Yes":"No",onClick:function(){return a("togglesustainhold")}})})]})]}),(0,r.jsx)(i.$n,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return a("reset")}})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.playing,c=l.lines,s=l.editing;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!s||a,icon:"plus",content:"Add Line",onClick:function(){return t("newline",{line:c.length+1})}}),(0,r.jsx)(i.$n,{selected:!s,icon:s?"chevron-up":"chevron-down",onClick:function(){return t("edit")}})]}),children:!!s&&(c.length>0?(0,r.jsx)(i.Ki,{children:c.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:n+1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:a,icon:"pen",onClick:function(){return t("modifyline",{line:n+1})}}),(0,r.jsx)(i.$n,{disabled:a,icon:"trash",onClick:function(){return t("deleteline",{line:n+1})}})]}),children:e},n)})}):(0,r.jsx)(i.az,{color:"label",children:"Song is empty."}))})}},1783:function(e,n,t){"use strict";t.r(n),t.d(n,{KeyComboModal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=48&&e.keyCode<=57)&&(n+="Shift"),3===e.location&&(n+="Numpad"),h(e))if(e.shiftKey&&e.keyCode>=48&&e.keyCode<=57)n+="Shift"+(e.keyCode-48);else{var t=e.key.toUpperCase();n+=m[t]||t}return n},x=function(e){var n=(0,a.Oc)(),t=n.act,d=n.data,m=d.init_value,x=d.large_buttons,g=d.message,j=void 0===g?"":g,b=d.title,y=d.timeout,v=f((0,i.useState)(m),2),w=v[0],k=v[1],_=f((0,i.useState)(!0),2),C=_[0],I=_[1],S=function(e){if(!C){e.key===l._.Enter&&t("submit",{entry:w}),(0,l.KL)(e.key)&&t("cancel");return}if(e.preventDefault(),h(e)){O(p(e)),I(!1);return}if(e.key===l._.Escape){O(m),I(!1);return}},O=function(e){e!==w&&k(e)},A=130+(j.length>30?Math.ceil(j.length/3):0)+(j.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:b,width:240,height:A,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){S(e)},children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.y5,{}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:C,content:C&&null!==C?"Awaiting input...":""+w,width:"100%",textAlign:"center",onClick:function(){O(m),I(!0)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})]})})]})}},3928:function(e,n,t){"use strict";t.r(n),t.d(n,{KeycardAuth:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=(0,r.jsx)(i.wn,{title:"Keycard Authentication Device",children:(0,r.jsx)(i.az,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!a.swiping&&!a.busy)return(0,r.jsx)(l.p8,{width:540,height:280,children:(0,r.jsxs)(l.p8.Content,{children:[c,(0,r.jsx)(i.wn,{title:"Choose Action",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Red Alert",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",disabled:!a.redAvailable,onClick:function(){return t("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,r.jsx)(i.Ki.Item,{label:"ERT",children:(0,r.jsx)(i.$n,{icon:"broadcast-tower",onClick:function(){return t("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Maint Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Station-Wide Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})});var s=(0,r.jsx)(i.az,{color:"red",children:"Waiting for YOU to swipe your ID..."});return a.hasSwiped||a.ertreason||"Emergency Response Team"!==a.event?a.hasConfirm?s=(0,r.jsx)(i.az,{color:"green",children:"Request Confirmed!"}):a.isRemote?s=(0,r.jsx)(i.az,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):a.hasSwiped&&(s=(0,r.jsx)(i.az,{color:"orange",children:"Waiting for second person to confirm..."})):s=(0,r.jsx)(i.az,{color:"red",children:"Fill out the reason for your ERT request."}),(0,r.jsx)(l.p8,{width:540,height:265,children:(0,r.jsxs)(l.p8.Content,{children:[c,"Emergency Response Team"===a.event&&(0,r.jsx)(i.wn,{title:"Reason for ERT Call",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{color:a.ertreason?"":"red",icon:a.ertreason?"check":"pencil-alt",content:a.ertreason?a.ertreason:"-----",disabled:a.busy,onClick:function(){return t("ert")}})})}),(0,r.jsx)(i.wn,{title:a.event,buttons:(0,r.jsx)(i.$n,{icon:"arrow-circle-left",content:"Back",disabled:a.busy||a.hasConfirm,onClick:function(){return t("reset")}}),children:s})]})})}},6706:function(e,n,t){"use strict";t.r(n),t.d(n,{KitchenMachine:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.config,u=t.ingredients,d=t.operating,f=c.title;return(0,r.jsx)(l.p8,{width:400,height:320,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.Operating,{operating:d,name:f}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(s,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:u.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.inactive,c=l.tooltip;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"power-off",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return t("cook")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return t("eject")}})})]})})}},9846:function(e,n,t){"use strict";t.r(n),t.d(n,{LawManager:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.isAdmin,d=a.isSlaved,f=a.isMalf,h=a.isAIMalf,m=a.view;return(0,r.jsx)(l.p8,{width:800,height:f?620:365,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!(u&&d)&&(0,r.jsxs)(i.IC,{children:["This unit is slaved to ",d,"."]}),!!(f||h)&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:"Law Management",selected:0===m,onClick:function(){return t("set_view",{set_view:0})}}),(0,r.jsx)(i.$n,{content:"Lawsets",selected:1===m,onClick:function(){return t("set_view",{set_view:1})}})]}),0===m&&(0,r.jsx)(c,{}),1===m&&(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_zeroth_laws,c=l.zeroth_laws,s=l.has_ion_laws,d=l.ion_laws,f=l.ion_law_nr,h=l.has_inherent_laws,m=l.inherent_laws,p=l.has_supplied_laws,x=l.supplied_laws,g=l.channels,j=l.channel,b=l.isMalf,y=l.isAdmin,v=l.zeroth_law,w=l.ion_law,k=l.inherent_law,_=l.supplied_law,C=l.supplied_law_position;return(0,r.jsxs)(r.Fragment,{children:[!!a&&(0,r.jsx)(u,{title:"ERR_NULL_VALUE",laws:c,isMalf:b}),!!s&&(0,r.jsx)(u,{title:"".concat(f),laws:d,isMalf:b}),!!h&&(0,r.jsx)(u,{title:"Inherent",laws:m,isMalf:b}),!!p&&(0,r.jsx)(u,{title:"Supplied",laws:x,isMalf:b}),(0,r.jsx)(i.wn,{title:"Statement Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Statement Channel",children:g.map(function(e){return(0,r.jsx)(i.$n,{content:e.channel,selected:e.channel===j,onClick:function(){return t("law_channel",{law_channel:e.channel})}},e.channel)})}),(0,r.jsx)(i.Ki.Item,{label:"State Laws",children:(0,r.jsx)(i.$n,{content:"State Laws",onClick:function(){return t("state_laws")}})}),(0,r.jsx)(i.Ki.Item,{label:"Law Notification",children:(0,r.jsx)(i.$n,{content:"Notify",onClick:function(){return t("notify_laws")}})})]})}),!!b&&(0,r.jsx)(i.wn,{title:"Add Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Type"}),(0,r.jsx)(i.XI.Cell,{width:"60%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"20%",children:"Actions"})]}),!!(y&&!a)&&(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Zero"}),(0,r.jsx)(i.XI.Cell,{children:v}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_zeroth_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_zeroth_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Ion"}),(0,r.jsx)(i.XI.Cell,{children:w}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_ion_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_ion_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Inherent"}),(0,r.jsx)(i.XI.Cell,{children:k}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_inherent_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_inherent_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Supplied"}),(0,r.jsx)(i.XI.Cell,{children:_}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:C,onClick:function(){return t("change_supplied_law_position")}})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_supplied_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_supplied_law")}})]})]})]})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.law_sets;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsx)(i.wn,{title:e.name+" - "+e.header,buttons:(0,r.jsx)(i.$n,{content:"Load Laws",icon:"download",onClick:function(){return t("transfer_laws",{transfer_laws:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)})]})},e.name)})})},u=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.isMalf,a=e.laws,c=e.title;return(0,r.jsx)(i.wn,{title:c+" Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"69%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"21%",children:"State?"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.index}),(0,r.jsx)(i.XI.Cell,{children:e.law}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return t("state_law",{ref:e.ref,state_law:+!e.state})}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("edit_law",{edit_law:e.ref})}}),(0,r.jsx)(i.$n,{content:"Delete",icon:"trash",color:"red",onClick:function(){return t("delete_law",{delete_law:e.ref})}})]})]})]},e.law)})]})})}},3788:function(e,n,t){"use strict";t.r(n),t.d(n,{LawyerSim:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.crim_name,u=a.crim_job,d=a.crimes_list,f=a.total_sent,h=a.off_name,m=a.station_loc,p=a.arrest_desc,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Magistrate Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the station's Magistrate and review Security's arrest records!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must review ",(0,r.jsx)("b",{children:g})," arrest records, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a Magistrate working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like listed crimes, station name, job, and the circumstances around their arrest!"}),(0,r.jsx)(i.Ki.Item,{label:"5#",color:"silver",children:"Be sure to verify that the arresting officer had just cause. If the suspect should never have been in handcuffs, it's invalid!"}),(0,r.jsx)(i.Ki.Item,{label:"6#",color:"silver",children:"The sentencing should match the crimes committed. Review Space Law for the exact times!"}),(0,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad records!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are reviewing the arrest records of people working on a Nanotrasen station, so don't approve ",(0,r.jsx)("b",{children:"crimes"})," that ",(0,r.jsx)("b",{children:"aren't in Space Law"}),"!"]}),(0,r.jsx)(i.Ki.Item,{label:"9#",color:"silver",children:"Keep your eyes open for nonexistant jobs. If it isn't a valid job, it's possible something went wrong, and the record should be denied!"}),(0,r.jsx)(i.Ki.Item,{label:"10#",color:"silver",children:"Don't let the Clown fool you, they're subject to Space Law the same as anyone else!"})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Arrest Records",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Record Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Job",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Crimes",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Sentencing",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Arresting Officer's Name",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Station",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Manner of Arrest",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the record!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Invalid",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("deny")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Valid",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("approve")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},3023:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e?"caution":"default",onClick:function(){return i("set_rating",{rating_value:e})}})},n)}),(0,r.jsxs)(o.BJ.Item,{bold:!0,ml:2,fontSize:"150%",children:[a+"/10",(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},h=function(e){var n=(0,l.Oc)().data,t=e.tabIndex,i=e.setTabIndex,a=n.login_state;return(0,r.jsx)(o.BJ.Item,{mb:1,children:(0,r.jsxs)(o.tU,{fluid:!0,textAlign:"center",children:[(0,r.jsx)(o.tU.Tab,{selected:0===t,onClick:function(){return i(0)},children:"Book Archives"}),(0,r.jsx)(o.tU.Tab,{selected:1===t,onClick:function(){return i(1)},children:"Corporate Literature"}),(0,r.jsx)(o.tU.Tab,{selected:2===t,onClick:function(){return i(2)},children:"Upload Book"}),1===a&&(0,r.jsx)(o.tU.Tab,{selected:3===t,onClick:function(){return i(3)},children:"Patron Manager"}),(0,r.jsx)(o.tU.Tab,{selected:4===t,onClick:function(){return i(4)},children:"Inventory"})]})})},m=function(e){switch(e.tabIndex){case 0:return(0,r.jsx)(x,{});case 1:return(0,r.jsx)(g,{});case 2:return(0,r.jsx)(j,{});case 3:return(0,r.jsx)(b,{});case 4:return(0,r.jsx)(y,{});default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.searchcontent,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{width:"35%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.title||"Input Title",onClick:function(){return(0,c.modalOpen)("edit_search_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.author||"Input Author",onClick:function(){return(0,c.modalOpen)("edit_search_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Ratings",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{mr:1,width:"min-content",content:a.ratingmin,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmin")}})}),(0,r.jsx)(o.BJ.Item,{children:"To"}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{ml:1,width:"min-content",content:a.ratingmax,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmax")}})})]})})]})]}),(0,r.jsxs)(o.BJ.Item,{width:"40%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{mt:2,children:(0,r.jsx)(o.ms,{mt:.6,width:"190px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_search_category",{category_id:d[e]})}})})})}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_search_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,r.jsx)(o.$n,{content:"Clear Search",icon:"eraser",onClick:function(){return t("clear_search")}}),a.ckey?(0,r.jsx)(o.$n,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return t("clear_ckey_search")}}):(0,r.jsx)(o.$n,{content:"Find My Books",icon:"search",onClick:function(){return t("find_users_books",{user_ckey:u})}})]})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.external_booklist,s=i.archive_pagenumber,u=i.num_pages,d=i.login_state;return(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.$n,{icon:"angle-double-left",disabled:1===s,onClick:function(){return t("deincrementpagemax")}}),(0,r.jsx)(o.$n,{icon:"chevron-left",disabled:1===s,onClick:function(){return t("deincrementpage")}}),(0,r.jsx)(o.$n,{bold:!0,content:s,onClick:function(){return(0,c.modalOpen)("setpagenumber")}}),(0,r.jsx)(o.$n,{icon:"chevron-right",disabled:s===u,onClick:function(){return t("incrementpage")}}),(0,r.jsx)(o.$n,{icon:"angle-double-right",disabled:s===u,onClick:function(){return t("incrementpagemax")}})]}),children:[(0,r.jsx)(p,{}),(0,r.jsx)("hr",{}),(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Ratings"}),(0,r.jsx)(o.XI.Cell,{children:"Category"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,r.jsxs)(o.XI.Cell,{children:[e.rating,(0,r.jsx)(o.In,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,r.jsx)(o.XI.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===d&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_external_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},e.id)})]})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.programmatic_booklist,s=i.login_state;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:2}),e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===s&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_programmatic_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},n)})]})})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.selectedbook,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,r.jsx)(o.$n.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:a.copyright,content:"Upload Book",onClick:function(){return t("uploadbook",{user_ckey:u})}}),children:[a.copyright?(0,r.jsx)(o.IC,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,r.jsx)("br",{}),(0,r.jsxs)(o.az,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.title,onClick:function(){return(0,c.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.author,onClick:function(){return(0,c.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{children:(0,r.jsx)(o.ms,{width:"240px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_upload_category",{category_id:d[e]})}})})})]}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,disabled:a.copyright,selected:!0,icon:"unlink",onClick:function(){return t("toggle_upload_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsx)(o.BJ.Item,{mr:75,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Summary",children:(0,r.jsx)(o.$n,{icon:"pen",width:"auto",disabled:a.copyright,content:"Edit Summary",onClick:function(){return(0,c.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(o.Ki.Item,{children:a.summary})]})})]})]})},b=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.checkout_data;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Patron"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Time Left"}),(0,r.jsx)(o.XI.Cell,{children:"Actions"})]}),i.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.In,{name:"user-tag"}),e.patron_name]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.title}),(0,r.jsx)(o.XI.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:(0,r.jsx)(o.$n,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return t("reportlost",{libraryid:e.libraryid})}})})]},n)})]})})},y=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).inventory_list;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"LIB ID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Status"})]}),t.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.libraryid}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book"})," ",e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},n)})]})})};(0,c.modalRegisterBodyOverride)("expand_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,s=i.user_ckey;return(0,r.jsxs)(o.wn,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsx)(o.Ki.Item,{label:"Summary",children:a.summary}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.rating,(0,r.jsx)(o.In,{name:"star",color:"yellow",verticalAlign:"top"})]}),!a.isProgrammatic&&(0,r.jsx)(o.Ki.Item,{label:"Categories",children:a.categories.join(", ")})]}),(0,r.jsx)("br",{}),s===a.ckey&&(0,r.jsx)(o.$n,{content:"Delete Book",icon:"trash",color:"red",disabled:a.isProgrammatic,onClick:function(){return t("delete_book",{bookid:a.id,user_ckey:s})}}),(0,r.jsx)(o.$n,{content:"Report Book",icon:"flag",color:"red",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("report_book",{bookid:a.id})}}),(0,r.jsx)(o.$n,{content:"Rate Book",icon:"star",color:"caution",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("rate_info",{bookid:a.id})}})]})}),(0,c.modalRegisterBodyOverride)("report_book",function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=e.args,s=a.selected_report,u=a.report_categories,d=a.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:c.title}),(0,r.jsx)(o.Ki.Item,{label:"Reasons",children:(0,r.jsx)(o.az,{children:u.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.$n,{content:e.description,selected:e.category_id===s,onClick:function(){return t("set_report",{report_type:e.category_id})}}),(0,r.jsx)("br",{})]},n)})})})]}),(0,r.jsx)(o.$n.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return t("submit_report",{bookid:c.id,user_ckey:d})}})]})}),(0,c.modalRegisterBodyOverride)("rate_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,c=i.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.current_rating?a.current_rating:0,(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,r.jsx)(o.Ki.Item,{label:"Total Ratings",children:a.total_ratings?a.total_ratings:0})]}),(0,r.jsx)(f,{}),(0,r.jsx)(o.$n.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return t("rate_book",{bookid:a.id,user_ckey:c})}})]})})},183:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:600,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)();switch((n.act,n.data).pagestate){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(f,{});case 3:return(0,r.jsx)(d,{});default:return"WE SHOULDN'T BE HERE!"}},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data,(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,a.modalOpen)("specify_ssid_delete")}}),(0,r.jsx)(i.$n,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_delete")}}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_search")}}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return t("view_reported_books")}})]})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.reports;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"All Reported Books",(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Uploader CKEY"}),(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{children:"Report Type"}),(0,r.jsx)(i.XI.Cell,{children:"Reporter Ckey"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.uploader_ckey}),(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.report_description}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.reporter_ckey}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return t("unflag_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.ckey,c=l.booklist;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"Books uploaded by ",a,(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),c.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})}},1536:function(e,n,t){"use strict";t.r(n),t.d(n,{ListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t10),2),I=C[0],S=C[1],O=f((0,i.useState)(""),2),A=O[0],P=O[1],E=function(e){var n,t,r,i,o=T.length-1;e===l.R?null===k||k===o?(_(0),null==(n=document.getElementById("0"))||n.scrollIntoView()):(_(k+1),null==(t=document.getElementById((k+1).toString()))||t.scrollIntoView()):e===l.gf&&(null===k||0===k?(_(o),null==(r=document.getElementById(o.toString()))||r.scrollIntoView()):(_(k-1),null==(i=document.getElementById((k-1).toString()))||i.scrollIntoView()))},B=function(e){var n=String.fromCharCode(e),t=x.find(function(e){return null==e?void 0:e.toLowerCase().startsWith(null==n?void 0:n.toLowerCase())});if(t){var r,i=x.indexOf(t);_(i),null==(r=document.getElementById(i.toString()))||r.scrollIntoView()}},z=function(){S(!I),P("")},T=x.filter(function(e){return null==e?void 0:e.toLowerCase().includes(A.toLowerCase())}),N=350+Math.ceil(j.length/3);return I||setTimeout(function(){var e;return null==(e=document.getElementById(k.toString()))?void 0:e.focus()},1),(0,r.jsxs)(c.p8,{title:v,width:325,height:N,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;(n===l.R||n===l.gf)&&(e.preventDefault(),E(n)),n===l.Ri&&(e.preventDefault(),t("submit",{entry:T[k]})),!I&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),B(n)),n===l.s6&&(e.preventDefault(),t("cancel"))},children:(0,r.jsx)(o.wn,{buttons:(0,r.jsx)(o.$n,{compact:!0,icon:I?"search":"font",selected:!0,tooltip:I?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){return z()}}),className:"ListInput__Section",fill:!0,title:j,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(m,{filteredItems:T,onClick:function(e){e!==k&&_(e)},onFocusSearch:function(){S(!1),S(!0)},searchBarVisible:I,selected:k})}),(0,r.jsx)(o.BJ.Item,{m:0,children:I&&(0,r.jsx)(p,{filteredItems:T,onSearch:function(e){var n;e!==A&&(P(e),_(0),null==(n=document.getElementById("0"))||n.scrollIntoView())},searchQuery:A,selected:k})}),(0,r.jsx)(o.BJ.Item,{mt:.5,children:(0,r.jsx)(s.InputButtons,{input:T[k]})})]})})})]})},m=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onClick,c=e.onFocusSearch,s=e.searchBarVisible,u=e.selected;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:t.map(function(e,a){return(0,r.jsx)(o.$n,{fluid:!0,color:"transparent",id:a,onClick:function(){return i(a)},onMouseDown:function(e){2===e.detail&&(e.preventDefault(),n("submit",{entry:t[u]}))},onKeyDown:function(e){var n=window.event?e.which:e.keyCode;s&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),c())},selected:a===u,style:{animation:"none",transition:"none"},children:e.replace(/^\w/,function(e){return e.toUpperCase()})},a)})})},p=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onSearch,l=e.searchQuery,c=e.selected;return(0,r.jsx)(o.pd,{width:"100%",autoFocus:!0,autoSelect:!0,placeholder:"Search...",value:l,onChange:function(e){return i(e)},onEnter:function(){n("submit",{entry:t[c]})}})}},7239:function(e,n,t){"use strict";t.r(n),t.d(n,{Loadout:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?Object.entries(s.gears).reduce(function(e,n){var t=u(n,2),r=(t[0],t[1]);return e.concat(Object.entries(r).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}}))},[]).filter(function(e){return I(e.gear)}):Object.entries(s.gears[p]).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}})).sort(d[v]),_&&(n=n.reverse()),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:p,buttons:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.ms,{height:1.66,selected:v,options:Object.keys(d),onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:_?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:_?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){return C(!_)}})}),x&&(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{width:20,placeholder:"Search...",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"magnifying-glass",selected:x,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){g(!x),b("")}})})]}),children:n.map(function(e){var n=e.key,t=e.gear,i=Object.keys(s.selected_gears).includes(n),l=1===t.cost?"".concat(t.cost," Point"):"".concat(t.cost," Points"),a=(0,r.jsxs)(o.az,{children:[t.name.length>12&&(0,r.jsx)(o.az,{children:t.name}),t.gear_tier>f&&(0,r.jsx)(o.az,{mt:t.name.length>12&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),d=(0,r.jsxs)(r.Fragment,{children:[t.allowed_roles&&(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"user",tooltip:(0,r.jsx)(o.wn,{m:-1,title:"Allowed Roles",children:t.allowed_roles.map(function(e){return(0,r.jsx)(o.az,{children:e},e)})}),tooltipPosition:"left"}),Object.entries(t.tweaks).map(function(e){var n=u(e,2),t=n[0];return n[1].map(function(e){return(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:e.icon,tooltip:e.tooltip,tooltipPosition:"top"},t)})}),(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"info",tooltip:t.desc,tooltipPosition:"top"})]}),p=(0,r.jsxs)(o.az,{className:"Loadout-InfoBox",children:[(0,r.jsx)(o.az,{style:{flexGrow:1},fontSize:1,color:"gold",opacity:.75,children:t.gear_tier>0&&"Tier ".concat(t.gear_tier)}),(0,r.jsx)(o.az,{fontSize:.75,opacity:.66,children:l})]});return(0,r.jsx)(o.c_,{m:.5,imageSize:84,dmIcon:t.icon,dmIconState:t.icon_state,tooltip:(t.name.length>12||t.gear_tier>0)&&a,tooltipPosition:"bottom",selected:i,disabled:t.gear_tier>f||h+t.cost>m&&!i,buttons:d,buttonsAlt:p,onClick:function(){return c("toggle_gear",{gear:n})},children:t.name},n)})})},p=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.setTweakedGear,c=Object.entries(i.gears).reduce(function(e,n){var t=u(n,2),r=Object.entries((t[0],t[1])).filter(function(e){var n=u(e,1)[0];return Object.keys(i.selected_gears).includes(n)}).map(function(e){var n=u(e,2);return function(e){for(var n=1;n0&&(0,r.jsx)(o.$n,{icon:"gears",iconColor:"gray",width:"33px",onClick:function(){return l(e)}}),(0,r.jsx)(o.$n,{icon:"times",iconColor:"red",width:"32px",onClick:function(){return t("toggle_gear",{gear:e.key})}})]}),children:e.name},e.key)})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{children:(0,r.jsx)(o.z2,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[.66*i.max_gear_slots,i.max_gear_slots],good:[0,.66*i.max_gear_slots]},children:(0,r.jsxs)(o.az,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},x=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.tweakedGear,c=e.setTweakedGear;return(0,r.jsx)(o.Rr,{children:(0,r.jsx)(o.az,{className:"Loadout-Modal__background",children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,width:20,height:20,title:l.name,buttons:(0,r.jsx)(o.$n,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){return c("")}}),children:(0,r.jsx)(o.Ki,{children:Object.entries(l.tweaks).map(function(e){var n=u(e,2),a=n[0];return n[1].map(function(e){var n=i.selected_gears[l.key][a];return(0,r.jsxs)(o.Ki.Item,{label:e.name,color:n?"":"gray",buttons:(0,r.jsx)(o.$n,{color:"transparent",icon:"pen",onClick:function(){return t("set_tweak",{gear:l.key,tweak:a})}}),children:[n||"Default",(0,r.jsx)(o.az,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{backgroundColor:"".concat(n)}})]},a)})})})})})})}},1387:function(e,n,t){"use strict";t.r(n),t.d(n,{LoreConsole:()=>no});var r,i=t(8138),o=t(2864),l=t(4530),a=t(7790),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/,b=RegExp(j.source,"g"),y=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,v=RegExp(y.source,"g"),w={"&":"&","<":"<",">":">",'"':""","'":"'"},k=function(e){return w[e]};function _(e,n){if(n){if(j.test(e))return e.replace(b,k)}else if(y.test(e))return e.replace(v,k);return e}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function I(e){return e.replace(C,function(e,n){return"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}var S=/(^|[^\[])\^/g;function O(e,n){e="string"==typeof e?e:e.source,n=n||"";var t={replace:function(n,r){return r=(r=r.source||r).replace(S,"$1"),e=e.replace(n,r),t},getRegex:function(){return new RegExp(e,n)}};return t}var A=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(e,n,t){var r,i,o,l;if(e){try{r=decodeURIComponent(I(t)).replace(A,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}n&&!P.test(t)&&(i=n,o=t,B[" "+i]||(z.test(i)?B[" "+i]=i+"/":B[" "+i]=$(i,"/",!0)),l=-1===(i=B[" "+i]).indexOf(":"),t="//"===o.substring(0,2)?l?o:i.replace(T,"$1")+o:"/"!==o.charAt(0)?i+o:l?o:i.replace(N,"$1")+o);try{t=encodeURI(t).replace(/%25/g,"%")}catch(e){return null}return t}var B={},z=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,N=/^([^:]+:\/*[^/]*)[\s\S]*$/,R={exec:function(){}};function D(e,n){var t=e.replace(/\|/g,function(e,n,t){for(var r=!1,i=n;--i>=0&&"\\"===t[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),t.length>n)t.splice(n);else for(;t.length1;)1&n&&(t+=e),n>>=1,e+=e;return t+e}function L(e,n,t,r){var i=n.href,o=n.title?_(n.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:t,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:o,text:_(l)}}var K=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"space",value:function(e){var n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}},{key:"code",value:function(e){var n=this.rules.block.code.exec(e);if(n){var t=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:$(t,"\n")}}}},{key:"fences",value:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map(function(e){var n=e.match(/^\s+/);return null===n?e:(function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),1!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,1)||function(e,n){if(e){if("string"==typeof e)return s(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,1)}}(n,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].length>=r.length?e.slice(r.length):e}).join("\n")}(t,n[3]||"");return{type:"code",raw:t,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}},{key:"heading",value:function(e){var n=this.rules.block.heading.exec(e);if(n){var t=n[2].trim();if(/#$/.test(t)){var r=$(t,"#");this.options.pedantic?t=r.trim():(!r||/ $/.test(r))&&(t=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:t,tokens:this.lexer.inline(t)}}}},{key:"hr",value:function(e){var n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}},{key:"blockquote",value:function(e){var n=this.rules.block.blockquote.exec(e);if(n){var t=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;var i=this.lexer.blockTokens(t);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:t}}}},{key:"list",value:function(e){var n=this.rules.block.list.exec(e);if(n){var t,r,i,o,l,a,c,s,u,d,f,h,m=n[1].trim(),p=m.length>1,x={type:"list",raw:"",ordered:p,start:p?+m.slice(0,-1):"",loose:!1,items:[]};m=p?"\\d{1,9}\\".concat(m.slice(-1)):"\\".concat(m),this.options.pedantic&&(m=p?m:"[*+-]");for(var g=new RegExp("^( {0,3}".concat(m,")((?:[ ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,!(!(n=g.exec(e))||this.rules.block.hr.test(e)));){if(t=n[0],e=e.substring(t.length),s=n[2].split("\n",1)[0].replace(/^\t+/,function(e){return" ".repeat(3*e.length)}),u=e.split("\n",1)[0],this.options.pedantic?(o=2,f=s.trimLeft()):(o=(o=n[2].search(/[^ ]/))>4?1:o,f=s.slice(o),o+=n[1].length),a=!1,!s&&/^ *$/.test(u)&&(t+=u+"\n",e=e.substring(u.length+1),h=!0),!h)for(var j=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),y=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),v=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(y.test(u)||v.test(u)||j.test(u)||b.test(e)));){if(u.search(/[^ ]/)>=o||!u.trim())f+="\n"+u.slice(o);else{if(a||s.search(/[^ ]/)>=4||y.test(s)||v.test(s)||b.test(s))break;f+="\n"+u}a||u.trim()||(a=!0),t+=d+"\n",e=e.substring(d.length+1),s=u.slice(o)}!x.loose&&(c?x.loose=!0:/\n *\n *$/.test(t)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),x.items.push({type:"list_item",raw:t,task:!!r,checked:i,loose:!1,text:f}),x.raw+=t}x.items[x.items.length-1].raw=t.trimRight(),x.items[x.items.length-1].text=f.trimRight(),x.raw=x.raw.trimRight();var w=x.items.length;for(l=0;l0&&k.some(function(e){return/\n.*\n/.test(e.raw)})}if(x.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:t,raw:n[0],href:r,title:i}}}},{key:"table",value:function(e){var n=this.rules.block.table.exec(e);if(n){var t={type:"table",header:D(n[1]).map(function(e){return{text:e}}),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=n[0];var r,i,o,l,a=t.align.length;for(r=0;r/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):_(n[0]):n[0]}}},{key:"link",value:function(e){var n=this.rules.inline.link.exec(e);if(n){var t=n[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var r=$(t.slice(0,-1),"\\");if((t.length-r.length)%2==0)return}else{var i=function(e,n){if(-1===e.indexOf(")"))return -1;for(var t=e.length,r=0,i=0;i-1){var o=(0===n[0].indexOf("!")?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,o).trim(),n[3]=""}}var l=n[2],a="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);c&&(l=c[1],a=c[3])}else a=n[3]?n[3].slice(1,-1):"";return l=l.trim(),/^$/.test(t)?l.slice(1):l.slice(1,-1)),L(n,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},n[0],this.lexer)}}},{key:"reflink",value:function(e,n){var t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){var r=(t[2]||t[1]).replace(/\s+/g," ");if(!(r=n[r.toLowerCase()])){var i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return L(t,r,t[0],this.lexer)}}},{key:"emStrong",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&!(r[3]&&t.match(RegExp("[\\p{L}\\p{N}]","u")))){var i=r[1]||r[2]||"";if(!i||i&&(""===t||this.rules.inline.punctuation.exec(t))){var o,l,a=r[0].length-1,c=a,s=0,u="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,n=n.slice(-1*e.length+a);null!=(r=u.exec(n));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]){if(l=o.length,r[3]||r[4]){c+=l;continue}if((r[5]||r[6])&&a%3&&!((a+l)%3)){s+=l;continue}if(!((c-=l)>0)){l=Math.min(l,l+c+s);var d=e.slice(0,a+r.index+(r[0].length-o.length)+l);if(Math.min(a,l)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}}}}},{key:"codespan",value:function(e){var n=this.rules.inline.code.exec(e);if(n){var t=n[2].replace(/\n/g," "),r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=_(t,!0),{type:"codespan",raw:n[0],text:t}}}},{key:"br",value:function(e){var n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}},{key:"del",value:function(e){var n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}},{key:"autolink",value:function(e,n){var t,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(t=_(this.options.mangle?n(i[1]):i[1])):t=_(i[1]),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e,n){var t,r,i,o;if(t=this.rules.inline.url.exec(e)){if("@"===t[2])i="mailto:"+(r=_(this.options.mangle?n(t[0]):t[0]));else{do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0];while(o!==t[0]);r=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,n){var t,r=this.rules.inline.text.exec(e);if(r)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):_(r[0]):r[0]:_(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:t}}}]),e}(),J={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:R,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};J._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,J._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,J.def=O(J.def).replace("label",J._label).replace("title",J._title).getRegex(),J.bullet=/(?:[*+-]|\d{1,9}[.)])/,J.listItemStart=O(/^( *)(bull) */).replace("bull",J.bullet).getRegex(),J.list=O(J.list).replace(/bull/g,J.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+J.def.source+")").getRegex(),J._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",J._comment=/|$)/,J.html=O(J.html,"i").replace("comment",J._comment).replace("tag",J._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.blockquote=O(J.blockquote).replace("paragraph",J.paragraph).getRegex(),J.normal=m({},J),J.gfm=p(m({},J.normal),{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),J.gfm.table=O(J.gfm.table).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.gfm.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",J.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.pedantic=p(m({},J.normal),{html:O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",J._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(J.normal._paragraph).replace("hr",J.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",J.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r}X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=O(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,X._comment=O(J._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.emStrong.lDelim=O(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=O(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=O(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,X.autolink=O(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=O(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=O(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=O(X.reflink).replace("label",X._label).replace("ref",J._label).getRegex(),X.nolink=O(X.nolink).replace("ref",J._label).getRegex(),X.reflinkSearch=O(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=m({},X),X.pedantic=p(m({},X.normal),{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=p(m({},X.normal),{escape:O(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,function(e,n,t){return n+" ".repeat(t.length)});e&&"break"!==(o=this,function(){if(o.options.extensions&&o.options.extensions.block&&o.options.extensions.block.some(function(t){return!!(n=t.call({lexer:l},e,a))&&(e=e.substring(n.raw.length),a.push(n),!0)}))return"continue";if(n=o.tokenizer.space(e))return e=e.substring(n.raw.length),1===n.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(n),"continue";if(n=o.tokenizer.code(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if((n=o.tokenizer.fences(e))||(n=o.tokenizer.heading(e))||(n=o.tokenizer.hr(e))||(n=o.tokenizer.blockquote(e))||(n=o.tokenizer.list(e))||(n=o.tokenizer.html(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(n=o.tokenizer.def(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.raw,o.inlineQueue[o.inlineQueue.length-1].src=t.text):o.tokens.links[n.tag]||(o.tokens.links[n.tag]={href:n.href,title:n.title}),"continue";if((n=o.tokenizer.table(e))||(n=o.tokenizer.lheading(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(r=e,o.options.extensions&&o.options.extensions.startBlock){var c=1/0,s=e.slice(1),u=void 0;o.options.extensions.startBlock.forEach(function(e){"number"==typeof(u=e.call({lexer:this},s))&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(r=e.substring(0,c+1))}if(o.state.top&&(n=o.tokenizer.paragraph(r)))return t=a[a.length-1],i&&"paragraph"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),i=r.length!==e.length,e=e.substring(n.raw.length),"continue";if(n=o.tokenizer.text(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&"text"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(o.options.silent)return console.error(d),"break";throw Error(d)}}()););return this.state.top=!0,a}},{key:"inline",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:n}),n}},{key:"inlineTokens",value:function(e){var n,t,r,i,o,l,a,c=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(u));)d.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,i.index+i[0].length-2)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e&&"break"!==(a=this,function(){if(o||(l=""),o=!1,a.options.extensions&&a.options.extensions.inline&&a.options.extensions.inline.some(function(t){return!!(n=t.call({lexer:c},e,s))&&(e=e.substring(n.raw.length),s.push(n),!0)}))return"continue";if(n=a.tokenizer.escape(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.tag(e))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(n=a.tokenizer.link(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.reflink(e,a.tokens.links))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if((n=a.tokenizer.emStrong(e,u,l))||(n=a.tokenizer.codespan(e))||(n=a.tokenizer.br(e))||(n=a.tokenizer.del(e))||(n=a.tokenizer.autolink(e,F))||!a.state.inLink&&(n=a.tokenizer.url(e,F)))return e=e.substring(n.raw.length),s.push(n),"continue";if(r=e,a.options.extensions&&a.options.extensions.startInline){var i=1/0,d=e.slice(1),f=void 0;a.options.extensions.startInline.forEach(function(e){"number"==typeof(f=e.call({lexer:this},d))&&f>=0&&(i=Math.min(i,f))}),i<1/0&&i>=0&&(r=e.substring(0,i+1))}if(n=a.tokenizer.inlineText(r,U))return e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),o=!0,(t=s[s.length-1])&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(a.options.silent)return console.error(h),"break";throw Error(h)}}()););return s}}],[{key:"rules",get:function(){return{block:J,inline:X}}},{key:"lex",value:function(n,t){return new e(t).lex(n)}},{key:"lexInline",value:function(n,t){return new e(t).inlineTokens(n)}}]),e}(),H=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"code",value:function(e,n,t){var r=(n||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(t=!0,e=i)}return(e=e.replace(/\n$/,"")+"\n",r)?'
'+(t?e:_(e,!0))+"
\n":"
"+(t?e:_(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"
\n".concat(e,"
\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,n,t,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(t);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
\n":"
\n"}},{key:"list",value:function(e,n,t){var r=n?"ol":"ul";return"<"+r+(n&&1!==t?' start="'+t+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,n){return n&&(n="".concat(n,"")),"\n\n"+e+"\n"+n+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,n){var t=n.header?"th":"td";return(n.align?"<".concat(t,' align="').concat(n.align,'">'):"<".concat(t,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='"}},{key:"image",value:function(e,n,t){if(null===(e=E(this.options.sanitize,this.options.baseUrl,e)))return t;var r='').concat(t,'":">"}},{key:"text",value:function(e){return e}}]),e}(),W=function(){function e(){u(this,e)}return f(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,n,t){return""+t}},{key:"image",value:function(e,n,t){return""+t}},{key:"br",value:function(){return""}}]),e}(),q=function(){function e(){u(this,e),this.seen={}}return f(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,n){var t=e,r=0;if(this.seen.hasOwnProperty(t)){r=this.seen[e];do t=e+"-"+ ++r;while(this.seen.hasOwnProperty(t))}return n||(this.seen[e]=r,this.seen[t]=0),t}},{key:"slug",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.serialize(e);return this.getNextSafeSlug(t,n.dryrun)}}]),e}(),G=function(){function e(n){u(this,e),this.options=n||g,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new q}return f(e,[{key:"parse",value:function(e){var n,t,r,i,o,l,a,c,s,u,d,f,h,m,p,x,g,j,b,y=!(arguments.length>1)||void 0===arguments[1]||arguments[1],v="",w=e.length;for(n=0;n0&&"paragraph"===p.tokens[0].type?(p.tokens[0].text=j+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&"text"===p.tokens[0].tokens[0].type&&(p.tokens[0].tokens[0].text=j+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:j}):m+=j),m+=this.parse(p.tokens,h),s+=this.renderer.listitem(m,g,x);v+=this.renderer.list(s,d,f);continue;case"html":v+=this.renderer.html(u.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(s=u.tokens?this.parseInline(u.tokens):u.text;n+1";return c?Promise.resolve(n):s?void s(null,n):n}if(c)return Promise.reject(e);if(s)return void s(e);throw e});if(null==t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if((u=r)&&u.sanitize&&!u.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),r.hooks&&(r.hooks.options=r),i){var a,c,s,u,d,f=r.highlight;try{r.hooks&&(t=r.hooks.preprocess(t)),d=e(t,r)}catch(e){return l(e)}var h=function(e){var t;if(!e)try{r.walkTokens&&Z.walkTokens(d,r.walkTokens),t=n(d,r),r.hooks&&(t=r.hooks.postprocess(t))}catch(n){e=n}return r.highlight=f,e?l(e):i(null,t)};if(!f||f.length<3||(delete r.highlight,!d.length))return h();var p=0;return Z.walkTokens(d,function(e){"code"===e.type&&(p++,setTimeout(function(){f(e.text,e.lang,function(n,t){if(n)return h(n);null!=t&&t!==e.text&&(e.text=t,e.escaped=!0),0==--p&&h()})},0))}),void(0===p&&h())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(function(n){return e(n,r)}).then(function(e){return r.walkTokens?Promise.all(Z.walkTokens(e,r.walkTokens)).then(function(){return e}):e}).then(function(e){return n(e,r)}).then(function(e){return r.hooks?r.hooks.postprocess(e):e}).catch(l);try{r.hooks&&(t=r.hooks.preprocess(t));var x=e(t,r);r.walkTokens&&Z.walkTokens(x,r.walkTokens);var g=n(x,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(e){return l(e)}}}function Z(e,n,t){return Q(V.lex,G.parse)(e,n,t)}function ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?t-2:0),i=2;i1?n-1:0),r=1;r1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:ej;if(et&&et(e,null),!eg(n))return e;let r=n.length;for(;r--;){let i=n[r];if("string"==typeof i){let e=t(i);e!==i&&(er(n)||(n[r]=e),i=e)}e[i]=!0}return e}function eT(e){let n=ec(null);for(let r of en(e)){var t=function(e){if(Array.isArray(e))return e}(r)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,l,a=[],c=!0,s=!1;try{o=(t=t.call(e)).next,!1;for(;!(c=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}(r,2)||function(e,n){if(e){if("string"==typeof e)return ee(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ee(e,2):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let i=t[0],o=t[1];eO(e,i)&&(eg(o)?n[i]=function(e){for(let n=0;n/g),eq=ea(/\${[\w\W]*/g),eG=ea(/^data-[\-\w.\u00B7-\uFFFF]+$/),eY=ea(/^aria-[\-\w]+$/),eQ=ea(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eZ=ea(/^(?:\w+script|data):/i),e0=ea(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e1=ea(/^html$/i),e2=ea(/^[a-z][.\w]*(-[.\w]+)+$/i),e8=ea(/<[/\w!]/g),e3=ea(/<[/\w]/g),e5=ea(/<\/no(script|embed|frames)/i),e4=ea(/\/>/i),e6=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));let i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},e7=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e9=function(e,n,t,r){return eO(e,n)&&eg(e[n])?ez(r.base?eT(r.base):{},e[n],r.transform):t};var ne=function e(){let n,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=n=>e(n);if(i.version="3.4.11",i.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return i.isSupported=!1,i;let o=r.document,l=o,a=l.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,s=r.Node,u=r.Element,d=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let f=r.DOMParser,h=r.trustedTypes,m=u.prototype,p=eN(m,"cloneNode"),x=eN(m,"remove"),g=eN(m,"nextSibling"),j=eN(m,"childNodes"),b=eN(m,"parentNode"),y=eN(m,"shadowRoot"),v=eN(m,"attributes"),w=s&&s.prototype?eN(s.prototype,"nodeType"):null,k=s&&s.prototype?eN(s.prototype,"nodeName"):null;if("function"==typeof c){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let _="",C=!1,I=0,S=function(){if(I>0)throw eE('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},O=function(e){S(),I++;try{return n.createHTML(e)}finally{I--}},A=function(e){S(),I++;try{return n.createScriptURL(e)}finally{I--}},P=o,E=P.implementation,B=P.createNodeIterator,z=P.createDocumentFragment,T=P.getElementsByTagName,N=l.importNode,R=e7();i.isSupported="function"==typeof en&&"function"==typeof b&&E&&void 0!==E.createHTMLDocument;let D=eQ,$=null,M=ez({},[...eR,...eD,...e$,...eL,...eJ]),L=null,K=ez({},[...eX,...eU,...eF,...eV]),J=Object.seal(ec(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,U=null,F=Object.seal(ec(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),V=!0,H=!0,W=!1,q=!0,G=!1,Y=!0,Q=!1,Z=!1,ee=null,et=null,er=!1,ei=!1,eo=!1,es=!1,eu=!0,ed=!1,eB="user-content-",ne=!0,nn=!1,nt={},nr=null,ni=ez({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),no=null,nl=ez({},["audio","video","img","source","image","track"]),na=null,nc=ez({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ns="http://www.w3.org/1998/Math/MathML",nu="http://www.w3.org/2000/svg",nd="http://www.w3.org/1999/xhtml",nf=nd,nh=!1,nm=null,np=ez({},[ns,nu,nd],eb),nx=el(["mi","mo","mn","ms","mtext"]),ng=ez({},nx),nj=el(["annotation-xml"]),nb=ez({},nj),ny=ez({},["title","style","font","a","script"]),nv=null,nw=["application/xhtml+xml","text/html"],nk=null,n_=null,nC=o.createElement("form"),nI=function(e){return e instanceof RegExp||e instanceof Function},nS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n_&&n_===e)return;e&&"object"==typeof e||(e={}),e=eT(e),nk="application/xhtml+xml"===(nv=-1===nw.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?eb:ej,$=e9(e,"ALLOWED_TAGS",M,{transform:nk}),L=e9(e,"ALLOWED_ATTR",K,{transform:nk}),nm=e9(e,"ALLOWED_NAMESPACES",np,{transform:eb}),na=e9(e,"ADD_URI_SAFE_ATTR",nc,{transform:nk,base:nc}),no=e9(e,"ADD_DATA_URI_TAGS",nl,{transform:nk,base:nl}),nr=e9(e,"FORBID_CONTENTS",ni,{transform:nk}),X=e9(e,"FORBID_TAGS",eT({}),{transform:nk}),U=e9(e,"FORBID_ATTR",eT({}),{transform:nk}),nt=!!eO(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?eT(e.USE_PROFILES):e.USE_PROFILES),V=!1!==e.ALLOW_ARIA_ATTR,H=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ei=e.RETURN_DOM||!1,eo=e.RETURN_DOM_FRAGMENT||!1,es=e.RETURN_TRUSTED_TYPE||!1,er=e.FORCE_BODY||!1,eu=!1!==e.SANITIZE_DOM,ed=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,nn=e.IN_PLACE||!1,D=!function(e){try{return eP(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?eQ:e.ALLOWED_URI_REGEXP,nf="string"==typeof e.NAMESPACE?e.NAMESPACE:nd,ng=eO(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?eT(e.MATHML_TEXT_INTEGRATION_POINTS):ez({},nx),nb=eO(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?eT(e.HTML_INTEGRATION_POINTS):ez({},nj);let r=eO(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?eT(e.CUSTOM_ELEMENT_HANDLING):ec(null);if(J=ec(null),eO(r,"tagNameCheck")&&nI(r.tagNameCheck)&&(J.tagNameCheck=r.tagNameCheck),eO(r,"attributeNameCheck")&&nI(r.attributeNameCheck)&&(J.attributeNameCheck=r.attributeNameCheck),eO(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(J.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),ea(J),G&&(H=!1),eo&&(ei=!0),nt&&($=ez({},eJ),L=ec(null),!0===nt.html&&(ez($,eR),ez(L,eX)),!0===nt.svg&&(ez($,eD),ez(L,eU),ez(L,eV)),!0===nt.svgFilters&&(ez($,e$),ez(L,eU),ez(L,eV)),!0===nt.mathMl&&(ez($,eL),ez(L,eF),ez(L,eV))),F.tagCheck=null,F.attributeCheck=null,eO(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?F.tagCheck=e.ADD_TAGS:eg(e.ADD_TAGS)&&($===M&&($=eT($)),ez($,e.ADD_TAGS,nk))),eO(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?F.attributeCheck=e.ADD_ATTR:eg(e.ADD_ATTR)&&(L===K&&(L=eT(L)),ez(L,e.ADD_ATTR,nk))),eO(e,"ADD_URI_SAFE_ATTR")&&eg(e.ADD_URI_SAFE_ATTR)&&ez(na,e.ADD_URI_SAFE_ATTR,nk),eO(e,"FORBID_CONTENTS")&&eg(e.FORBID_CONTENTS)&&(nr===ni&&(nr=eT(nr)),ez(nr,e.FORBID_CONTENTS,nk)),eO(e,"ADD_FORBID_CONTENTS")&&eg(e.ADD_FORBID_CONTENTS)&&(nr===ni&&(nr=eT(nr)),ez(nr,e.ADD_FORBID_CONTENTS,nk)),ne&&($["#text"]=!0),Q&&ez($,["html","head","body"]),$.table&&(ez($,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw eE('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw eE('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let t=n;n=e.TRUSTED_TYPES_POLICY;try{_=O("")}catch(e){throw n=t,e}}else null===e.TRUSTED_TYPES_POLICY?(n=void 0,_=""):(void 0===n&&(C||(t=e6(h,a),C=!0),n=t),n&&"string"==typeof _&&(_=O("")));el&&el(e),n_=e},nO=ez({},[...eD,...e$,...eM]),nA=ez({},[...eL,...eK]),nP=function(e){var n,t,r;let i=b(e);i&&i.tagName||(i={namespaceURI:nf,tagName:"template"});let o=ej(e.tagName),l=ej(i.tagName);return!!nm[e.namespaceURI]&&(e.namespaceURI===nu?(n=i).namespaceURI===nd?"svg"===o:n.namespaceURI===ns?"svg"===o&&("annotation-xml"===l||ng[l]):!!nO[o]:e.namespaceURI===ns?(t=i).namespaceURI===nd?"math"===o:t.namespaceURI===nu?"math"===o&&nb[l]:!!nA[o]:e.namespaceURI===nd?((r=i).namespaceURI!==nu||!!nb[l])&&(r.namespaceURI!==ns||!!ng[l])&&!nA[o]&&(ny[o]||!nO[o]):"application/xhtml+xml"===nv&&!!nm[e.namespaceURI])},nE=function(e){ep(i.removed,{element:e});try{b(e).removeChild(e)}catch(n){if(x(e),!b(e))throw eE("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nB=function(e){let n=j(e);if(n){let e=[];ef(n,n=>{ep(e,n)}),ef(e,e=>{try{x(e)}catch(e){}})}let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(e){}}},nz=function(e,n){try{ep(i.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){ep(i.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e)if(ei||eo)try{nE(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},nT=function(e){let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if("string"==typeof i&&!L[nk(i)])try{e.removeAttribute(i)}catch(e){}}},nN=function(e){let n=[e];for(;n.length>0;){let e=n.pop();(w?w(e):e.nodeType)===1&&nT(e);let t=j(e);if(t)for(let e=t.length-1;e>=0;--e)n.push(t[e])}},nR=function(e){let t=null,r=null;if(er)e=""+e;else{let n=ey(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===nv&&nf===nd&&(e=''+e+"");let i=n?O(e):e;if(nf===nd)try{t=new f().parseFromString(i,nv)}catch(e){}if(!t||!t.documentElement){t=E.createDocument(nf,"template",null);try{t.documentElement.innerHTML=nh?_:i}catch(e){}}let l=t.body||t.documentElement;return(e&&r&&l.insertBefore(o.createTextNode(r),l.childNodes[0]||null),nf===nd)?T.call(t,Q?"html":"body")[0]:Q?t.documentElement:l},nD=function(e){return B.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},n$=function(e){return e=ev(e,eH," "),e=ev(e,eW," "),e=ev(e,eq," ")},nM=function(e){var n;e.normalize();let t=B.call(e.ownerDocument||e,e,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null),r=t.nextNode();for(;r;)r.data=n$(r.data),r=t.nextNode();let i=null==(n=e.querySelectorAll)?void 0:n.call(e,"template");i&&ef(i,e=>{nK(e.content)&&nM(e.content)})},nL=function(e){let n=k?k(e):null;return"string"==typeof n&&"form"===nk(n)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==v(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==j(e))},nK=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return 11===w(e)}catch(e){return!1}},nJ=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return"number"==typeof w(e)}catch(e){return!1}};function nX(e,n,t){0!==e.length&&ef(e,e=>{e.call(i,n,t,n_)})}let nU=function(e,n){if(!X[n]&&nW(n)&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,n)||J.tagNameCheck instanceof Function&&J.tagNameCheck(n)))return!1;if(ne&&!nr[n]){let n=b(e),t=j(e);if(t&&n){let r=t.length;for(let i=r-1;i>=0;--i){let r=nn?t[i]:p(t[i],!0);n.insertBefore(r,g(e))}}}return nE(e),!0},nF=function(e){if(nX(R.beforeSanitizeElements,e,null),nL(e))return nE(e),!0;let n=nk(k?k(e):e.nodeName);if(nX(R.uponSanitizeElement,e,{tagName:n,allowedTags:$}),Y&&e.hasChildNodes()&&!nJ(e.firstElementChild)&&eP(e8,e.textContent)&&eP(e8,e.innerHTML)||Y&&e.namespaceURI===nd&&"style"===n&&nJ(e.firstElementChild)||7===e.nodeType||Y&&8===e.nodeType&&eP(e3,e.data)||0)return nE(e),!0;if(X[n]||!(F.tagCheck instanceof Function&&F.tagCheck(n))&&!$[n])return nU(e,n);if((w?w(e):e.nodeType)===1&&!nP(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&eP(e5,e.innerHTML))return nE(e),!0;if(G&&3===e.nodeType){let n=n$(e.textContent);e.textContent!==n&&(ep(i.removed,{element:e.cloneNode()}),e.textContent=n)}return nX(R.afterSanitizeElements,e,null),!1},nV=function(e,n,t){if(U[n]||eu&&("id"===n||"name"===n)&&(t in o||t in nC))return!1;let r=L[n]||F.attributeCheck instanceof Function&&F.attributeCheck(n,e);if(H&&eP(eG,n));else if(V&&eP(eY,n));else if(r){if(na[n]);else if(eP(D,ev(t,e0,"")));else if(("src"===n||"xlink:href"===n||"href"===n)&&"script"!==e&&0===ew(t,"data:")&&no[e]);else if(W&&!eP(eZ,ev(t,e0,"")));else if(t)return!1}else if(!(nW(e)&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,e)||J.tagNameCheck instanceof Function&&J.tagNameCheck(e))&&(J.attributeNameCheck instanceof RegExp&&eP(J.attributeNameCheck,n)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(n,e))||"is"===n&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t))))return!1;return!0},nH=ez({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),nW=function(e){return!nH[ej(e)]&&eP(e2,e)},nq=function(e,t,r,i){if(n&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!r)switch(h.getAttributeType(e,t)){case"TrustedHTML":return O(i);case"TrustedScriptURL":return A(i)}return i},nG=function(e,n,t,r){try{t?e.setAttributeNS(t,n,r):e.setAttribute(n,r),nL(e)?nE(e):em(i.removed)}catch(t){nz(n,e)}},nY=function(e){nX(R.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||nL(e))return;let t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},r=n.length,i=nk(e.nodeName);for(;r--;){let o=n[r],l=o.name,a=o.namespaceURI,c=o.value,s=nk(l),u="value"===l?c:ek(c);if(t.attrName=s,t.attrValue=u,t.keepAttr=!0,t.forceKeepAttr=void 0,nX(R.uponSanitizeAttribute,e,t),u=t.attrValue,ed&&("id"===s||"name"===s)&&0!==ew(u,eB)&&(nz(l,e),u=eB+u),Y&&eP(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)||"attributename"===s&&ey(u,"href")){nz(l,e);continue}if(!t.forceKeepAttr){if(!t.keepAttr||!q&&eP(e4,u)||(G&&(u=n$(u)),!nV(i,s,u))){nz(l,e);continue}(u=nq(i,s,a,u))!==c&&nG(e,l,a,u)}}nX(R.afterSanitizeAttributes,e,null)},nQ=function(e){let n=null,t=nD(e);for(nX(R.beforeSanitizeShadowDOM,e,null);n=t.nextNode();)if(nX(R.uponSanitizeShadowNode,n,null),nF(n),nY(n),nK(n.content)&&nQ(n.content),(w?w(n):n.nodeType)===1){let e=y(n);nK(e)&&(nZ(e),nQ(e))}nX(R.afterSanitizeShadowDOM,e,null)},nZ=function(e){let n=[{node:e,shadow:null}];for(;n.length>0;){let e=n.pop();if(e.shadow){nQ(e.shadow);continue}let t=e.node,r=(w?w(t):t.nodeType)===1,i=j(t);if(i)for(let e=i.length-1;e>=0;--e)n.push({node:i[e],shadow:null});if(r){let e=k?k(t):null;if("string"==typeof e&&"template"===nk(e)){let e=t.content;nK(e)&&n.push({node:e,shadow:null})}}if(r){let e=y(t);nK(e)&&n.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,c=null;if((nh=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nJ(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return e_(e);case"boolean":return eC(e);case"bigint":return eI?eI(e):"0";case"symbol":return eS?eS(e):"Symbol()";case"undefined":default:return eA(e);case"function":case"object":{if(null===e)return eA(e);let n=eN(e,"toString");if("function"==typeof n){let t=n(e);return"string"==typeof t?t:eA(t)}return eA(e)}}}(e)))throw eE("dirty is not a string, aborting");if(!i.isSupported)return e;Z?($=ee,L=et):nS(t),(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&($=eT($)),R.uponSanitizeAttribute.length>0&&(L=eT(L)),i.removed=[];let s=nn&&"string"!=typeof e&&nJ(e);if(s){let n=k?k(e):e.nodeName;if("string"==typeof n){let e=nk(n);if(!$[e]||X[e])throw eE("root node is forbidden and cannot be sanitized in-place")}if(nL(e))throw eE("root node is clobbered and cannot be sanitized in-place");try{nZ(e)}catch(n){throw nB(e),n}}else if(nJ(e))1===(o=(r=nR("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),nZ(o);else{if(!ei&&!G&&!Q&&-1===e.indexOf("<"))return n&&es?O(e):e;if(!(r=nR(e)))return ei?null:es?_:""}r&&er&&nE(r.firstChild);let u=nD(s?e:r);try{for(;a=u.nextNode();)nF(a),nY(a),nK(a.content)&&nQ(a.content)}catch(n){throw s&&nB(e),n}if(s)return ef(i.removed,e=>{e.element&&nN(e.element)}),G&&nM(e),e;if(ei){if(G&&nM(r),eo)for(c=z.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(L.shadowroot||L.shadowrootmode)&&(c=N.call(l,c,!0)),c}let d=Q?r.outerHTML:r.innerHTML;return Q&&$["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&eP(e1,r.ownerDocument.doctype.name)&&(d="\n"+d),G&&(d=n$(d)),n&&es?O(d):d},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nS(e),Z=!0,ee=$,et=L},i.clearConfig=function(){n_=null,Z=!1,ee=null,et=null,n=t,_=""},i.isValidAttribute=function(e,n,t){return n_||nS({}),nV(nk(e),nk(n),t)},i.addHook=function(e,n){"function"!=typeof n||eO(R,e)&&ep(R[e],n)},i.removeHook=function(e,n){if(eO(R,e)){if(void 0!==n){let t=eh(R[e],n);return -1===t?void 0:ex(R[e],t,1)[0]}return em(R[e])}},i.removeHooks=function(e){eO(R,e)&&(R[e]=[])},i.removeAllHooks=function(){R=e7()},i}(),nn=["b","blockquote","br","center","code","dd","del","div","dl","dt","em","font","h1","h2","h3","h4","h5","h6","hr","i","ins","li","menu","ol","p","pre","span","strong","table","tbody","td","th","thead","tfoot","tr","u","ul"],nt=["img"],nr=["class","style","background"];function ni(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&(0,i.jsx)(a.BJ.Item,{children:(0,i.jsx)(a.wn,{fill:!0,title:"Page ".concat(s+1,"/").concat(t.length),textAlign:"center",children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Previous",fontSize:"150%",icon:"arrow-left",lineHeight:2,disabled:s<=0,onClick:function(){return u(s-1)}})}),(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Next",fontSize:"150%",icon:"arrow-right",lineHeight:2,disabled:s>=t.length-1,onClick:function(){return u(s+1)}})})]})})}),(0,i.jsxs)(a.BJ.Item,{children:[(0,i.jsx)("h1",{children:d.title&&d.title}),(0,i.jsx)("div",{className:"LoreConsole__entryText",dangerouslySetInnerHTML:{__html:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nr,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:nt;return n&&(t=t.concat(i)),ne.sanitize(e,{ALLOWED_TAGS:t,FORBID_ATTR:r})}(Z(d.body,{breaks:!0,smartypants:!0,smartLists:!0,baseUrl:"thisshouldbreakhttp"}))}})]})]})})}},5531:function(e,n,t){"use strict";t.r(n),t.d(n,{MODsuit:()=>_,MODsuitContent:()=>k});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,r.jsxs)(o.XI.Cell,{textAlign:"center",children:[(0,r.jsx)(o.$n,{onClick:function(){return t("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:j(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,r.jsx)(o.$n,{onClick:function(){return h(e.ref)},icon:"cog",selected:f===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===Object.keys(e.configuration_data).length}),(0,r.jsx)(o.$n,{onClick:function(){return t("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,r.jsx)(o.az,{children:e.description})]})})},e.ref)})||(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{textAlign:"center",children:"No Modules Detected"})})})})},k=function(){var e=(0,l.Oc)().data.interface_break;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!e,children:!!e&&(0,r.jsx)(p,{})||(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(b,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(y,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(v,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(w,{})})]})})},_=function(){var e=(0,l.Oc)().data.ui_theme;return(0,r.jsx)(a.p8,{theme:e,width:400,height:620,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(k,{})})})})}},5247:function(e,n,t){"use strict";t.r(n),t.d(n,{MagnetController:()=>d});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Set(["metal","glass"]),c=function(){return(0,r.jsx)(l.p8,{width:300,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s,{})})})},s=function(){return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metals",children:(0,r.jsxs)(i.XI,{className:"materials-table",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{header:!0,pl:"0.5rem",py:"0.5rem",children:"Material"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Sheets"}),(0,r.jsx)(u,{})]}),(0,r.jsx)(d,{})]})})},u=function(){if((0,o.Oc)().data.showPoints)return(0,r.jsx)(i.XI.Cell,{header:!0,children:"Points"})},d=function(){return(0,o.Oc)().data.materials.filter(function(e){return e.amount>=1||a.has(e.id)}).map(function(e){return(0,r.jsx)(f,{material:e},e.id)})},f=function(e){var n=e.material,t=n.id,l=n.amount,a=(0,o.Oc)().data,c=a.icon,s=a.showPoints,u=a.staticMaterials[t],d=u.iconState,f=u.name,h=u.points;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsxs)(i.XI.Cell,{children:[d?(0,r.jsx)(i.Hg,{icon:c,icon_state:d,verticalAlign:"middle"}):(0,r.jsx)(i.In,{name:"sheet-plastic",verticalAlign:"middle"}),null!=f?f:t]}),(0,r.jsx)(i.XI.Cell,{color:l>=1?"good":"gray",children:l}),!!s&&h&&(0,r.jsx)(i.XI.Cell,{children:h})]})}},2433:function(e,n,t){"use strict";t.r(n),t.d(n,{MechBayConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.recharge_port,c=a&&a.mech,s=c&&c.cell,u=c&&c.name;return(0,r.jsx)(l.p8,{width:400,height:155,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Sync",onClick:function(){return t("reconnect")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||(0,r.jsx)(i.z2,{value:c.health/c.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||!s&&(0,r.jsx)(i.IC,{children:"No cell is installed."})||(0,r.jsxs)(i.z2,{value:s.charge/s.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,r.jsx)(i.zv,{value:s.charge})," / "+s.maxcharge]})})]})})})})}},3763:function(e,n,t){"use strict";t.r(n),t.d(n,{MechaControlConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.beacons,u=c.stored_data;return u.length?(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Log",buttons:(0,r.jsx)(i.$n,{icon:"window-close",onClick:function(){return t("clear_log")}}),children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{color:"label",children:["(",e.time,")"]}),(0,r.jsx)(i.az,{children:(0,o.jT)(e.message)})]},e.time)})})})}):(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:s.length&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"comment",onClick:function(){return t("send_message",{mt:e.uid})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"eye",onClick:function(){return t("get_log",{mt:e.uid})},children:"View Log"}),(0,r.jsx)(i.$n.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return t("shock",{mt:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{ranges:{good:[.75*e.maxHealth,1/0],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-1/0,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:e.cell&&(0,r.jsx)(i.z2,{ranges:{good:[.75*e.cellMaxCharge,1/0],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-1/0,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,r.jsx)(i.IC,{children:"No Cell Installed"})}),(0,r.jsxs)(i.Ki.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,r.jsx)(i.Ki.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,o.Sn)(e.location)||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,r.jsx)(i.Ki.Item,{label:"Cargo Space",children:(0,r.jsx)(i.z2,{ranges:{bad:[.75*e.cargoMax,1/0],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-1/0,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)})||(0,r.jsx)(i.IC,{children:"No mecha beacons found."})})})}},9548:function(e,n,t){"use strict";t.r(n),t.d(n,{MedicalRecords:()=>b});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4900),s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.product,c=e.productImage,s=e.productCategory,u=i.user_money;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"32px",margin:"0px"}})}),(0,r.jsx)(o.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(o.$n,{disabled:a.price>u,icon:"shopping-cart",content:a.price,textAlign:"left",onClick:function(){return t("purchase",{name:a.name,category:s})}})})]})},u=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default).tabIndex,a=n.products,u=n.imagelist,d=["apparel","toy","decoration"];return(0,r.jsx)(o.XI,{children:a[d[t]].map(function(e){return(0,r.jsx)(s,{product:e,productImage:u[e.path],productCategory:d[t]},e.name)})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,s=i.user_cash,d=i.inserted_cash;return(0,r.jsx)(a.p8,{title:"Merch Computer",width:450,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:"User",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,r.jsx)("b",{children:d})," credits inserted."]}),(0,r.jsx)(o.$n,{disabled:!d,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return t("change")}})]}),children:(0,r.jsxs)(o.BJ.Item,{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!==s&&(0,r.jsxs)(o.az,{mt:"0.5rem",children:["Your balance is ",(0,r.jsxs)("b",{children:[s||0," credits"]}),"."]})]})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsxs)(c.default.Default,{tabIndex:1,children:[(0,r.jsx)(f,{}),(0,r.jsx)(u,{})]})})})]})})})},f=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default),a=t.tabIndex,s=t.setTabIndex;return n.login_state,(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{icon:"dice",selected:1===a,onClick:function(){return s(1)},children:"Toys"}),(0,r.jsx)(o.tU.Tab,{icon:"flag",selected:2===a,onClick:function(){return s(2)},children:"Decorations"})]})}},6231:function(e,n,t){"use strict";t.r(n),t.d(n,{MiningVendor:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e[1].price,e[1]}).sort(d[h]);if(0!==t.length)return m&&(t=t.reverse()),g=!0,(0,r.jsx)(x,{title:e[0],items:t,gridLayout:u},e[0])});return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:g?j:(0,r.jsx)(o.az,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e){var n=e.gridLayout,t=e.setGridLayout,i=e.setSearchText,l=e.sortOrder,a=e.setSortOrder,c=e.descending,s=e.setDescending;return(0,r.jsx)(o.az,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{fluid:!0,mt:.2,placeholder:"Search by item name..",onChange:function(e){return i(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:n?"list":"table-cells-large",height:1.75,tooltip:n?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){return t(!n)}})}),(0,r.jsx)(o.BJ.Item,{basis:"30%",children:(0,r.jsx)(o.ms,{selected:l,options:Object.keys(d),width:"100%",onSelected:function(e){return a(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:c?"arrow-down":"arrow-up",height:1.75,tooltip:c?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){return s(!c)}})})]})})},x=function(e){var n,t,i=(0,a.Oc)(),l=i.act,c=i.data,s=e.title,u=e.items,d=e.gridLayout,f=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["title","items","gridLayout"]);return(0,r.jsx)(o.Nt,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.cand_name,u=a.cand_birth,d=a.cand_age,f=a.cand_species,h=a.cand_planet,m=a.cand_job,p=a.cand_records,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,r.jsx)("b",{children:g})," candidates, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,r.jsxs)(i.Ki.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,r.jsx)("b",{children:"company morals"}),"!"]}),(0,r.jsx)(i.Ki.Item,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad applications!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,r.jsx)("b",{children:"jobs"})," that they ",(0,r.jsx)("b",{children:"don't offer"}),"!"]}),(0,r.jsxs)(i.Ki.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,r.jsx)("b",{children:"naming schemes"}),", no company wants a Vox named Joe!"]}),(0,r.jsxs)(i.Ki.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,r.jsx)("b",{children:"clowns"})," are never denied by the company, no matter what."]})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Species",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Age",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Date of Birth",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Planet of Origin",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Requested Job",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Employment Records",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("dismiss")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("hire")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},452:function(e,n,t){"use strict";t.r(n),t.d(n,{Newscaster:()=>v});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(421),s=t(3384),u=t(4744),d=t(7482);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||g(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}}var j=["security","engineering","medical","science","service","supply"],b={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"}},y=(0,i.createContext)(null),v=function(e){var n,t=(0,a.Oc)(),c=t.act,f=t.data,h=f.is_security,m=f.is_admin,p=f.is_silent,g=f.is_printing,j=f.screen,b=f.channels,v=f.channel_idx,C=void 0===v?-1:v,I=x((0,i.useState)(!1),2),O=I[0],A=I[1],P=x((0,i.useState)(""),2),E=P[0],B=P[1],z=x((0,i.useState)(!1),2),T=z[0],N=z[1],R=x((0,i.useState)([]),2),D=R[0],$=R[1];0===j||2===j?n=(0,r.jsx)(k,{}):1===j&&(n=(0,r.jsx)(_,{}));var M=b.reduce(function(e,n){return e+n.unread},0);return(0,r.jsxs)(s.p8,{theme:h&&"security",width:800,height:600,children:[(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B},children:E?(0,r.jsx)(S,{}):(0,r.jsx)(u.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"})}),(0,r.jsx)(s.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.wn,{fill:!0,className:(0,l.Ly)(["Newscaster__menu",O&&"Newscaster__menu--open"]),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(w,{icon:"bars",title:"Toggle Menu",onClick:function(){return A(!O)}}),(0,r.jsx)(w,{icon:"newspaper",title:"Headlines",selected:0===j,onClick:function(){return c("headlines")},children:M>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:M>=10?"9+":M})}),(0,r.jsx)(w,{icon:"briefcase",title:"Job Openings",selected:1===j,onClick:function(){return c("jobs")}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:b.map(function(e){return(0,r.jsx)(w,{icon:e.icon,title:e.name,selected:2===j&&b[C-1]===e,onClick:function(){return c("channel",{uid:e.uid})},children:e.unread>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)})}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.cG,{}),(!!h||!!m)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("wanted_notice")}}),(0,r.jsx)(w,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return N(!T)}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(w,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("create_story")}}),(0,r.jsx)(w,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,u.modalOpen)("create_channel")}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(w,{icon:g?"spinner":"print",iconSpin:g,title:g?"Printing...":"Print Newspaper",onClick:function(){return c("print_newspaper")}}),(0,r.jsx)(w,{icon:p?"volume-mute":"volume-up",title:"Mute: "+(p?"On":"Off"),onClick:function(){return c("toggle_mute")}})]})]})}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,width:"100%",children:[(0,r.jsx)(d.TemporaryNotice,{}),(0,r.jsx)(y.Provider,{value:{viewingPhoto:E,setViewingPhoto:B,censorMode:T,fullStories:D,setFullStories:$},children:n})]})]})})]})},w=function(e){(0,a.Oc)().act;var n=e.icon,t=e.iconSpin,i=e.selected,c=void 0!==i&&i,s=e.security,u=e.onClick,d=e.title,f=e.children,x=p(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,r.jsxs)(o.BJ,m(h({align:"center",className:(0,l.Ly)(["Newscaster__menuButton",c&&"Newscaster__menuButton--selected",void 0!==s&&s&&"Newscaster__menuButton--security"]),onClick:u},x),{children:[(0,r.jsxs)(o.BJ.Item,{children:[c&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--selectedBar"}),(0,r.jsx)(o.In,{name:void 0===n?"":n,spin:t,size:"2"})]}),(0,r.jsx)(o.BJ.Item,{className:"Newscaster__menuButton--title",children:d}),f]}))},k=function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.screen,s=l.is_admin,d=l.channel_idx,f=l.channel_can_manage,p=l.channels,x=l.stories,g=l.wanted,j=(0,i.useContext)(y),b=j.fullStories,v=j.censorMode,w=2===c&&d>-1?p[d-1]:null;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!g&&(0,r.jsx)(C,{story:g,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:w?w.icon:"newspaper",mr:"0.5rem"}),w?w.name:"Headlines"]}),children:x.length>0?x.slice().reverse().map(function(e){return!b.includes(e.uid)&&e.body.length+3>128?m(h({},e),{body_short:e.body.substr(0,124)+"..."}):e}).map(function(e,n){return(0,r.jsx)(C,{story:e},n)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no stories at this time."]})}),!!w&&(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,height:"40%",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"info-circle",mr:"0.5rem"}),"About"]}),buttons:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(o.$n,{disabled:!!w.admin&&!s,selected:w.censored,icon:w.censored?"comment-slash":"comment",content:w.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return t("censor_channel",{uid:w.uid})}}),(0,r.jsx)(o.$n,{disabled:!f,icon:"cog",content:"Manage",onClick:function(){return(0,u.modalOpen)("manage_channel",{uid:w.uid})}})]}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:w.description||"N/A"}),(0,r.jsx)(o.Ki.Item,{label:"Owner",children:w.author||"N/A"}),!!s&&(0,r.jsx)(o.Ki.Item,{label:"Ckey",children:w.author_ckey}),(0,r.jsx)(o.Ki.Item,{label:"Public",children:w.public?"Yes":"No"}),(0,r.jsxs)(o.Ki.Item,{label:"Total Views",children:[(0,r.jsx)(o.In,{name:"eye",mr:"0.5rem"}),x.reduce(function(e,n){return e+n.view_count},0).toLocaleString()]})]})})]})},_=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),i=t.jobs,c=t.wanted,s=Object.entries(i).reduce(function(e,n){var t=x(n,2);return e+(t[0],t[1]).length},0);return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(C,{story:c,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,m:0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"briefcase",mr:"0.5rem"}),"Job Openings"]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:s>0?j.map(function(e){return Object.assign({},b[e],{id:e,jobs:i[e]})}).filter(function(e){return!!e&&e.jobs.length>0}).map(function(e){return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map(function(e){return(0,r.jsxs)(o.az,{class:(0,l.Ly)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["• ",e.title]},e.title)})},e.id)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no openings at this time."]})}),(0,r.jsxs)(o.wn,{height:"17%",children:["Interested in serving Nanotrasen?",(0,r.jsx)("br",{}),"Sign up for any of the above position now at the ",(0,r.jsx)("b",{children:"Head of Personnel's Office!"}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{as:"small",color:"label",children:"By accepting employment at Nanotrasen or any of its installations, you additionally agree to the terms and conditions provided by the company, including Standard Operating Procedure and Space Law."})]})]})},C=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=e.story,d=e.wanted,h=void 0!==d&&d,m=s.is_admin,p=(0,i.useContext)(y),x=p.fullStories,j=p.setFullStories,b=p.censorMode;return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__story",h&&"Newscaster__story--wanted"]),title:(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(o.In,{name:"exclamation-circle",mr:"0.5rem"}),2&u.censor_flags&&"[REDACTED]"||u.title||"News from "+u.author]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",children:(0,r.jsxs)(o.az,{color:"label",children:[!h&&b&&(0,r.jsx)(o.az,{inline:!0,children:(0,r.jsx)(o.$n,{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 t("censor_story",{uid:u.uid})}})}),(0,r.jsxs)(o.az,{inline:!0,children:[(0,r.jsx)(o.In,{name:"user"})," ",u.author," |\xa0",!!m&&(0,r.jsxs)(r.Fragment,{children:["ckey: ",u.author_ckey," |\xa0"]}),!h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"eye"})," ",u.view_count.toLocaleString()," |\xa0"]}),(0,r.jsx)(o.In,{name:"clock"})," ",(0,c.fF)(u.publish_time,s.world_time)]})]})}),children:(0,r.jsx)(o.az,{children:2&u.censor_flags?"[REDACTED]":(0,r.jsxs)(r.Fragment,{children:[!!u.has_photo&&(0,r.jsx)(I,{name:"story_photo_"+u.uid+".png",style:{float:"right"},ml:"0.5rem"}),(u.body_short||u.body).split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),u.body_short&&(0,r.jsx)(o.$n,{content:"Read more..",mt:"0.5rem",onClick:function(){return j(((function(e){if(Array.isArray(e))return f(e)})(x)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(x)||g(x)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u.uid]))}}),(0,r.jsx)(o.az,{clear:"right"})]})})})},I=function(e){var n=e.name,t=p(e,["name"]),l=(0,i.useContext)(y).setViewingPhoto;return(0,r.jsx)(o.az,h({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},t))},S=function(e){var n=(0,i.useContext)(y),t=n.viewingPhoto,l=n.setViewingPhoto;return(0,r.jsxs)(o.aF,{className:"Newscaster__photoZoom",children:[(0,r.jsx)(o.az,{as:"img",src:t}),(0,r.jsx)(o.$n,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return l("")}})]})},O=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),l=!!e.args.uid&&t.channels.filter(function(n){return n.uid===e.args.uid}).pop();if("manage_channel"===e.id&&!l)return void(0,u.modalClose)();var c="manage_channel"===e.id,s=!!e.args.is_admin,d=e.args.scanned_user,f=x((0,i.useState)((null==l?void 0:l.author)||d||"Unknown"),2),h=f[0],m=f[1],p=x((0,i.useState)((null==l?void 0:l.name)||""),2),g=p[0],j=p[1],b=x((0,i.useState)((null==l?void 0:l.description)||""),2),y=b[0],v=b[1],w=x((0,i.useState)((null==l?void 0:l.icon)||"newspaper"),2),k=w[0],_=w[1],C=x((0,i.useState)(!!c&&!!(null==l?void 0:l.public)),2),I=C[0],S=C[1],O=x((0,i.useState)((null==l?void 0:l.admin)===1),2),A=O[0],P=O[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:c?"Manage "+l.name:"Create New Channel",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Owner",children:(0,r.jsx)(o.pd,{disabled:!s,width:"100%",value:h,onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:g,onChange:function(e){return j(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:y,onChange:function(e){return v(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Icon",children:[(0,r.jsx)(o.pd,{disabled:!s,value:k,width:"35%",mr:"0.5rem",onChange:function(e){return _(e)}}),(0,r.jsx)(o.In,{name:k,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,r.jsx)(o.Ki.Item,{label:"Accept Public Stories?",children:(0,r.jsx)(o.$n,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"Yes":"No",onClick:function(){return S(!I)}})}),s&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return P(!A)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===h.trim().length||0===g.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:h,name:g.substr(0,49),description:y.substr(0,128),icon:k,public:+!!I,admin_locked:+!!A})}})]})};(0,u.modalRegisterBodyOverride)("create_channel",O),(0,u.modalRegisterBodyOverride)("manage_channel",O),(0,u.modalRegisterBodyOverride)("create_story",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.channels,d=l.channel_idx,f=void 0===d?-1:d,h=!!e.args.is_admin,m=e.args.scanned_user,p=s.slice().sort(function(e,n){if(f<0)return 0;var t=s[f-1];return t.uid===e.uid?-1:t.uid===n.uid?1:void 0}).filter(function(e){return h||!e.frozen&&(e.author===m||!!e.public)}),g=x((0,i.useState)(m||"Unknown"),2),j=g[0],b=g[1],y=x((0,i.useState)(p.length>0?p[0].name:""),2),v=y[0],w=y[1],k=x((0,i.useState)(""),2),_=k[0],C=k[1],S=x((0,i.useState)(""),2),O=S[0],A=S[1],P=x((0,i.useState)(!1),2),E=P[0],B=P[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.pd,{disabled:!h,width:"100%",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Channel",verticalAlign:"top",children:(0,r.jsx)(o.ms,{selected:v,options:p.map(function(e){return e.name}),mb:"0",width:"100%",onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.Ki.Divider,{}),(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onChange:function(e){return C(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Story Text",verticalAlign:"top",children:(0,r.jsx)(o.pd,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:O,onChange:function(e){return A(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return t(c?"eject_photo":"attach_photo")}})}),(0,r.jsx)(o.Ki.Item,{label:"Preview",verticalAlign:"top",children:(0,r.jsx)(o.wn,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,r.jsxs)(o.az,{mt:"0.5rem",children:[!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}}),O.split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),(0,r.jsx)(o.az,{clear:"right"})]})})}),h&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:E,icon:E?"lock":"lock-open",content:E?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return B(!E)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===j.trim().length||0===v.trim().length||0===_.trim().length||0===O.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)("create_story","",{author:j,channel:v,title:_.substr(0,127),body:O.substr(0,1023),admin_locked:+!!E})}})]})}),(0,u.modalRegisterBodyOverride)("wanted_notice",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.wanted,d=!!e.args.is_admin,f=e.args.scanned_user,h=x((0,i.useState)((null==s?void 0:s.author)||f||"Unknown"),2),m=h[0],p=h[1],g=x((0,i.useState)((null==s?void 0:s.title.substr(8))||""),2),j=g[0],b=g[1],y=x((0,i.useState)((null==s?void 0:s.body)||""),2),v=y[0],w=y[1],k=x((0,i.useState)((null==s?void 0:s.admin_locked)===1),2),_=k[0],C=k[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Authority",children:(0,r.jsx)(o.pd,{disabled:!d,width:"100%",value:m,onChange:function(e){return p(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",value:j,maxLength:"128",onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onChange:function(e){return w(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return t(c?"eject_photo":"attach_photo")}}),!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}})]}),d&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return C(!_)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:!s,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){t("clear_wanted_notice"),(0,u.modalClose)()}}),(0,r.jsx)(o.$n.Confirm,{disabled:0===m.trim().length||0===j.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:m,name:j.substr(0,127),description:v.substr(0,511),admin_locked:+!!_})}})]})})},6563:function(e,n,t){"use strict";t.r(n),t.d(n,{Noticeboard:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.papers;return(0,r.jsx)(a.p8,{width:600,height:300,theme:"noticeboard",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,children:c.map(function(e){return(0,r.jsx)(i.BJ.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){return t("interact",{paper:e.ref})},onContextMenu:function(n){n.preventDefault(),t("showFull",{paper:e.ref})},children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,fontSize:.75,title:e.name,children:(0,o.jT)(e.contents)})},e.ref)})})})})}},5867:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearBomb:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return a.extended?(0,r.jsx)(l.p8,{width:350,height:290,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Auth Disk",children:(0,r.jsx)(i.$n,{icon:a.authdisk?"eject":"id-card",selected:a.authdisk,content:a.diskname?a.diskname:"-----",tooltip:a.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return t("auth")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auth Code",children:(0,r.jsx)(i.$n,{icon:"key",disabled:!a.authdisk,selected:a.authcode,content:a.codemsg,onClick:function(){return t("code")}})})]})}),(0,r.jsx)(i.wn,{title:"Arming & Disarming",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Bolted to floor",children:(0,r.jsx)(i.$n,{icon:a.anchored?"check":"times",selected:a.anchored,disabled:!a.authdisk,content:a.anchored?"YES":"NO",onClick:function(){return t("toggle_anchor")}})}),(0,r.jsx)(i.Ki.Item,{label:"Time Left",children:(0,r.jsx)(i.$n,{icon:"stopwatch",content:a.time,disabled:!a.authfull,tooltip:"Set Timer",onClick:function(){return t("set_time")}})}),(0,r.jsx)(i.Ki.Item,{label:"Safety",children:(0,r.jsx)(i.$n,{icon:a.safety?"check":"times",selected:a.safety,disabled:!a.authfull,content:a.safety?"ON":"OFF",tooltip:a.safety?"Disable Safety":"Enable Safety",onClick:function(){return t("toggle_safety")}})}),(0,r.jsx)(i.Ki.Item,{label:"Arm/Disarm",children:(0,r.jsx)(i.$n,{icon:(a.timer,"bomb"),disabled:a.safety||!a.authfull,color:"red",content:a.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return t("toggle_armed")}})})]})})]})}):(0,r.jsx)(l.p8,{width:350,height:115,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Deployment",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return t("deploy")}})})})})}},7579:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearRodFabricator:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:p.neighbor_requirements.map(function(e,n){return(0,r.jsx)(o.az,{children:e},n)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:"None"})]})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.wn,{title:"Required Materials",children:p.materials&&0!==Object.keys(p.materials).length?(0,r.jsx)(o.XI,{children:Object.entries(p.materials).map(function(e,n){var t=s(e,2),i=t[0],l=t[1],a=Object.entries(f.resources||{}).find(function(e){var n=s(e,2),t=n[0];return n[1],t===i}),c=(a?a[1].amount:0)>=l;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,className:c?null:"color-red",children:i}),(0,r.jsx)(o.XI.Cell,{className:c?null:"color-red",children:l}),(0,r.jsxs)(o.XI.Cell,{className:c?null:"color-red",children:["(",Math.round(l/2e3)," sheets)"]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials required."})}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{icon:"wrench",content:"Fabricate",color:"good",onClick:function(){return h("fabricate_rod",{type_path:p.type_path})}})]})]})})]}),v===d&&(0,r.jsx)(o.wn,{title:"Material Storage",fill:!0,children:f.resources&&0!==Object.keys(f.resources).length?(0,r.jsx)(o.XI,{children:Object.entries(f.resources).map(function(e,n){var t=s(e,2),i=t[0],l=t[1];return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,children:i}),(0,r.jsxs)(o.XI.Cell,{children:[l.amount," units"]}),(0,r.jsxs)(o.XI.Cell,{children:["(",l.sheets," sheets)"]}),(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.$n,{content:"1",onClick:function(){return h("eject_material",{id:l.id,amount:"1"})}}),(0,r.jsx)(o.$n,{content:"C",onClick:function(){return h("eject_material",{id:l.id,amount:"custom"})}}),l.sheets>=5&&(0,r.jsx)(o.$n,{content:"5",onClick:function(){return h("eject_material",{id:l.id,amount:"5"})}}),(0,r.jsx)(o.$n,{content:"All",onClick:function(){return h("eject_material",{id:l.id,amount:l.sheets.toString()})}})]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials loaded."})})]})]})})})}},8007:function(e,n,t){"use strict";t.r(n),t.d(n,{NumberInputModal:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&x?5:0);return(0,r.jsxs)(c.p8,{title:y,width:270,height:_,children:[b&&(0,r.jsx)(u.Loader,{value:b}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.Ri&&f("submit",{entry:w}),n===l.s6&&f("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(h,{input:w,onClick:function(e){e!==w&&k(e)},onChange:function(e){e!==w&&k(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})})})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.min_value,c=i.max_value,s=i.init_value,u=i.round_value,d=e.input,f=e.onClick,h=e.onChange,m=Math.round(d!==l?Math.max(d/2,l):c/2),p=d===l&&l>0||1===d;return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===l,icon:"angle-double-left",onClick:function(){return f(l)},tooltip:d===l?"Min":"Min (".concat(l,")")})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.SM,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!u,minValue:l,maxValue:c,value:d,onChange:h,onEnter:function(e){return t("submit",{entry:e})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===c,icon:"angle-double-right",onClick:function(){return f(c)},tooltip:d===c?"Max":"Max (".concat(c,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:p,icon:"divide",onClick:function(){return f(m)},tooltip:p?"Split":"Split (".concat(m,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===s,icon:"redo",onClick:function(){return f(s)},tooltip:s?"Reset (".concat(s,")"):"Reset"})})]})}},4965:function(e,n,t){"use strict";t.r(n),t.d(n,{ObjAccessModifier:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(9281),a=function(){return(0,r.jsx)(o.p8,{width:500,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(l.ChooseAccess,{})})})})}},6499:function(e,n,t){"use strict";t.r(n),t.d(n,{OperatingComputer:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],c=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,1/0]},u=["bad","average","average","good","average","average","bad"],d=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.hasOccupant,u=c.choice;return n=u?(0,r.jsx)(m,{}):s?(0,r.jsx)(f,{}):(0,r.jsx)(h,{}),(0,r.jsx)(l.p8,{width:650,height:455,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:!u,icon:"user",onClick:function(){return a("choiceOff")},children:"Patient"}),(0,r.jsx)(i.tU.Tab,{selected:!!u,icon:"cog",onClick:function(){return a("choiceOn")},children:"Options"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:n})})]})})})},f=function(e){var n=(0,o.Oc)().data.occupant,t=n.activeSurgeries;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Patient",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:n.name}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:a[n.stat][0],children:a[n.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),c.map(function(e,t){return(0,r.jsx)(i.Ki.Item,{label:e[0]+" Damage",children:(0,r.jsx)(i.z2,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:Math.round(n[e[1]])},t)},t)}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[Math.round(n.btCelsius),"\xb0C, ",Math.round(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",children:[n.pulse," BPM"]})]})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Active surgeries",level:"2",children:n.inSurgery&&t?t.map(function(e,n){return(0,r.jsx)(i.wn,{style:{textTransform:"capitalize"},title:e.name+" ("+e.location+")",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Next Step",children:e.step},n)},n)},n)}):(0,r.jsx)(i.az,{color:"label",children:"No procedure ongoing."})})})]})},h=function(){return(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No patient detected."]})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.verbose,c=l.health,s=l.healthAlarm,u=l.oxy,d=l.oxyAlarm,f=l.crit;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Loudspeaker",children:(0,r.jsx)(i.$n,{selected:a,icon:a?"toggle-on":"toggle-off",content:a?"On":"Off",onClick:function(){return t(a?"verboseOff":"verboseOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer",children:(0,r.jsx)(i.$n,{selected:c,icon:c?"toggle-on":"toggle-off",content:c?"On":"Off",onClick:function(){return t(c?"healthOff":"healthOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:s,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("health_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm",children:(0,r.jsx)(i.$n,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return t(u?"oxyOff":"oxyOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:d,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("oxy_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Critical Alert",children:(0,r.jsx)(i.$n,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){return t(f?"critOff":"critOn")}})})]})}},7701:function(e,n,t){"use strict";t.r(n),t.d(n,{Orbit:()=>j});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn},p=function(e,n){var t=e.name,r=n.name;if(!t||!r)return 0;var i=t.match(f),o=r.match(f);return i&&o&&t.replace(f,"")===r.replace(f,"")?parseInt(i[1],10)-parseInt(o[1],10):m(t,r)},x=function(e){var n=e.searchText,t=e.source,i=e.title,l=e.color,a=e.sorted,c=t.filter(h(n));return a&&c.sort(p),t.length>0&&(0,r.jsx)(o.wn,{title:"".concat(i," - (").concat(t.length,")"),children:c.map(function(e){return(0,r.jsx)(g,{thing:e,color:l},e.name)})})},g=function(e){var n=(0,c.Oc)().act,t=e.color,i=e.thing;return(0,r.jsxs)(o.$n,{color:t,tooltip:i.assigned_role?(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.az,{as:"img",mr:"0.5em",className:(0,l.Ly)(["job_icons16x16",i.assigned_role_sprite])})," ",i.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,r.jsxs)(o.az,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,r.jsx)(o.In,{name:"eye"}),")"]})]})},j=function(e){var n=(0,c.Oc)(),t=n.act,l=n.data,a=l.alive,u=l.antagonists,f=l.highlights,j=l.response_teams,b=l.tourist,y=(l.auto_observe,l.dead),v=l.ssd,w=l.ghosts,k=l.misc,_=l.npcs,C=d((0,i.useState)(""),2),I=C[0],S=C[1],O={},A=!0,P=!1,E=void 0;try{for(var B,z=u[Symbol.iterator]();!(A=(B=z.next()).done);A=!0){var T=B.value;void 0===O[T.antag]&&(O[T.antag]=[]),O[T.antag].push(T)}}catch(e){P=!0,E=e}finally{try{A||null==z.return||z.return()}finally{if(P)throw E}}var N=Object.entries(O);N.sort(function(e,n){return m(e[0],n[0])});var R=function(e){for(var n=0,r=[N.map(function(e){var n=d(e,2);return n[0],n[1]}),b,f,a,w,v,y,_,k];n0&&(0,r.jsx)(o.wn,{title:"Antagonists",children:N.map(function(e){var n=d(e,2),t=n[0],i=n[1];return(0,r.jsx)(o.wn,{title:"".concat(t," - (").concat(i.length,")"),level:2,children:i.filter(h(I)).sort(p).map(function(e){return(0,r.jsx)(g,{color:"bad",thing:e},e.name)})},t)})}),f.length>0&&(0,r.jsx)(x,{title:"Highlights",source:f,searchText:I,color:"teal"}),(0,r.jsx)(x,{title:"Response Teams",source:j,searchText:I,color:"purple"}),(0,r.jsx)(x,{title:"Tourists",source:b,searchText:I,color:"violet"}),(0,r.jsx)(x,{title:"Alive",source:a,searchText:I,color:"good"}),(0,r.jsx)(x,{title:"Ghosts",source:w,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"SSD",source:v,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"Dead",source:y,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"NPCs",source:_,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"Misc",source:k,searchText:I,sorted:!1})]})})}},5802:function(e,n,t){"use strict";t.r(n),t.d(n,{OreRedemption:()=>f});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384);function c(){return(c=Object.assign||function(e){for(var n=1;n0?"good":"grey",bold:a>0&&"good",children:a.toLocaleString("en-US")+" pts"})}),(0,r.jsx)(i.cG,{}),f?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Design disk",children:[(0,r.jsx)(i.$n,{selected:!0,bold:!0,icon:"eject",content:f.name,tooltip:"Ejects the design disk.",onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{disabled:!f.design||!f.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return t("download")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Stored design",children:(0,r.jsx)(i.az,{color:f.design&&(f.compatible?"good":"bad"),children:f.design||"N/A"})})]}):(0,r.jsx)(i.az,{color:"label",children:"No design disk inserted."})]}))},m=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).sheets,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"20%",children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(g,{ore:e},e.id)})]}))})},p=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).alloys,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(j,{ore:e},e.id)})]}))})},x=function(e){var n;return(0,r.jsx)(i.az,{className:"OreHeader",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:e.title}),null==(n=e.columns)?void 0:n.map(function(e){return(0,r.jsx)(i.BJ.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)})]})})},g=function(e){var n=(0,l.Oc)().act,t=e.ore;if(!t.value||!(t.amount<=0)||["metal","glass"].indexOf(t.id)>-1)return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"45%",align:"middle",children:(0,r.jsxs)(i.BJ,{align:"center",children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",t.id])}),(0,r.jsx)(i.BJ.Item,{children:t.name})]})}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",children:t.value}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),step:1,stepPixelSize:6,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})},j=function(e){var n=(0,l.Oc)().act,t=e.ore;return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"7%",align:"middle",children:(0,r.jsx)(i.az,{className:(0,o.Ly)(["alloys32x32",t.id])})}),(0,r.jsx)(i.BJ.Item,{basis:"30%",textAlign:"middle",align:"center",children:t.name}),(0,r.jsx)(i.BJ.Item,{basis:"35%",textAlign:"middle",color:t.amount>=1?"good":"gray",align:"center",children:t.description}),(0,r.jsx)(i.BJ.Item,{basis:"10%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),stepPixelSize:6,step:1,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})}},4235:function(e,n,t){"use strict";t.r(n),t.d(n,{PAI:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(222),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.app_template,u=a.app_icon,d=a.app_title,f=s(c);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{p:1,fill:!0,scrollable:!0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:u,mr:1}),d,"pai_main_menu"!==c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){return t("Back")}}),(0,r.jsx)(i.$n,{content:"Home",icon:"arrow-up",onClick:function(){return t("MASTER_back")}})]})]}),children:(0,r.jsx)(f,{})})})})})})}},2740:function(e,n,t){"use strict";t.r(n),t.d(n,{PDA:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(2721),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=t.app;if(!t.owner)return(0,r.jsx)(l.p8,{width:350,height:105,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var c=s(a.template);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:a.icon,mr:1}),a.name]}),children:(0,r.jsx)(c,{})})}),(0,r.jsx)(i.BJ.Item,{mt:7.5,children:(0,r.jsx)(f,{})})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.idInserted,c=l.idLink,s=l.stationTime,u=l.cartridge_name;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{ml:.5,children:(0,r.jsx)(i.$n,{icon:"id-card",color:"transparent",onClick:function(){return t("Authenticate")},content:a?c:"No ID Inserted"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sd-card",color:"transparent",onClick:function(){return t("Eject")},content:u?["Eject "+u]:"No Cartridge Inserted"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:s})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app;return(0,r.jsx)(i.az,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[!!l.has_back&&(0,r.jsx)(i.BJ.Item,{basis:"33%",mr:-.5,children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return t("Back")}})}),(0,r.jsx)(i.BJ.Item,{basis:l.has_back?"33%":"100%",children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){t("Home")}})})]})})}},377:function(e,n,t){"use strict";t.r(n),t.d(n,{Pacman:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,u=s.active,d=s.anchored,f=s.broken,h=s.emagged,m=s.fuel_type,p=s.fuel_usage,x=s.fuel_stored,g=s.fuel_cap,j=s.is_ai,b=s.tmp_current,y=s.tmp_max,v=s.tmp_overheat,w=s.output_max,k=s.power_gen,_=s.output_set,C=s.has_fuel,I=Math.round(x/p*2),S=Math.round(I/60);return(0,r.jsx)(c.p8,{width:500,height:225,children:(0,r.jsxs)(c.p8.Content,{children:[(f||!d)&&(0,r.jsxs)(i.wn,{title:"Status",children:[!!f&&(0,r.jsx)(i.az,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!d&&(0,r.jsx)(i.az,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!d&&(0,r.jsxs)("div",{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!C,selected:u,onClick:function(){return t("toggle_power")}}),children:(0,r.jsxs)(i.so,{direction:"row",children:[(0,r.jsx)(i.so.Item,{width:"50%",className:"ml-1",children:(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Power setting",children:[(0,r.jsx)(i.Q7,{value:_,minValue:1,maxValue:w*(h?2.5:1),step:1,className:"mt-1",onChange:function(e){return t("change_power",{change_power:e})}}),"(",(0,o.d5)(_*k),")"]})})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{value:b/y,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[b," ℃"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[v>50&&(0,r.jsx)(i.az,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,r.jsx)(i.az,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,r.jsx)(i.az,{color:"orange",children:"Temperature High"}),0===v&&(0,r.jsx)(i.az,{color:"green",children:"Optimal"})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Fuel",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||j||!C,onClick:function(){return t("eject_fuel")}}),children:(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Fuel level",children:(0,r.jsxs)(i.z2,{value:x/g,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(x/1e3)," dm\xb3"]})})]})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fuel usage",children:[p/1e3," dm\xb3/s"]}),(0,r.jsxs)(i.Ki.Item,{label:"Fuel depletion",children:[!!C&&(p?I>120?"".concat(S," minutes"):"".concat(I," seconds"):"N/A"),!C&&(0,r.jsx)(i.az,{color:"red",children:"Out of fuel"})]})]})})]})})]})]})})}},9454:function(e,n,t){"use strict";t.r(n),t.d(n,{PanDEMIC:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)().data,a=t.reporting,u=t.analyzing,d=t.beakerLoaded,h=t.beakerContainsBlood,m=t.beakerContainsVirus,p=t.resistances,g=void 0===p?[]:p;return d?h?h&&!m&&(n=(0,r.jsx)(r.Fragment,{children:"No disease detected in provided blood sample."})):n=(0,r.jsx)(r.Fragment,{children:"No blood sample found in the loaded container."}):n=(0,r.jsx)(r.Fragment,{children:"No container loaded."}),(0,r.jsx)(l.p8,{width:700,height:640,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{operating:u||a,name:"PanD.E.M.I.C"}),n&&!m?(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{fill:!0,vertical:!0}),children:(0,r.jsx)(i.IC,{children:n})}):(0,r.jsx)(f,{}),(null==g?void 0:g.length)>0&&(0,r.jsx)(x,{align:"bottom"})]})})})},c=function(e){var n=e.operating,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.analyzing,s=a.analysisTime,u=a.analysisDuration,d=a.analysisDifficulty,f=a.totalContribution,h=a.analysisContributions,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(d)}),h.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:Math.floor(e.amount)},n)}),(0,r.jsx)(i.Ki.Item,{label:"Total",children:Math.floor(f)}),(0,r.jsx)(i.Ki.Item,{label:"Analysis Result",children:d-f<0?"Disease Analyzed Successfully":"Analysis Failed"})]});if(n)return c?(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"Analyzing ",Math.floor(100-100*s/u),"%"]})})}):(0,r.jsx)(i.aF,{backgroundColor:"rgba(0, 0, 0, 1)",children:(0,r.jsx)(i.wn,{title:"Analysis Results",backgroundColor:"rgba(0, 0, 0, 1)",bold:!0,children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.Ki,{children:m}),(0,r.jsx)(i.$n,{textAlign:"center",onClick:function(){return l("close_report")},children:"Close"})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.beakerLoaded;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return t("eject_beaker")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!l,onClick:function(){return t("destroy_eject_beaker")}})]})},u=function(e){var n,t,l,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.analysisDifficulty,d=s.analysisContributions,f=s.beakerContainsVirus,h=s.analyzing,m=s.canAnalyze,p=e.strain,x=p.commonName,g=p.description,j=p.strainID,b=p.sample_stage,y=p.known,v=p.diseaseAgent,w=p.bloodDNA,k=p.bloodType,_=p.possibleCures,C=p.transmissionRoute,I=p.isAdvanced,S=p.RequiredCures,O=p.Stabilized,A=p.StrainTracker,P=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",children:w?(0,r.jsx)("span",{style:{fontFamily:"'Courier New', monospace"},children:w}):"Undetectable"}),(0,r.jsx)(i.Ki.Item,{label:"Blood Type",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=k?k:"Undetectable"}})})]});if(!f)return(0,r.jsx)(i.Ki,{children:P});var E=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(u)}),d.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:(0,r.jsx)(i.z2,{maxValue:Math.min(e.maxAmount,u),minValue:0,value:e.amount,ranges:{good:[.66*Math.min(e.maxAmount,u),1/0],average:[.33*Math.min(e.maxAmount,u),.66*Math.min(e.maxAmount,u)],bad:[-1/0,.33*Math.min(e.maxAmount,u)]},children:e.amount})},n)})]});if(I)return n=null!=x&&"Unknown"!==x?(0,r.jsx)(i.$n,{icon:"print",content:"Print Release Forms",disabled:!y,onClick:function(){return c("print_release_forms",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}):(0,r.jsx)(i.$n,{icon:"pen",content:null!=x&&"Unknown"!==x?"Rename Disease":"Name Disease",disabled:!y,onClick:function(){return c("name_strain",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}),I&&(t=(0,r.jsx)(i.$n,{content:"Analyze",disabled:!m||h,onClick:function(){return c("analyze_strain",{strain_index:e.strainIndex})}}),l=(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Delete Data",confirmContent:"Delete Data",disabled:!e.strain.known,onClick:function(){return c("remove_from_database",{strain_id:e.strain.strainFullID})}})),(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsxs)(i.BJ,{align:"left",children:[n,t,l]}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Common Name",className:"common-name-label",children:null!=x?x:"Unknown"}),g&&(0,r.jsx)(i.Ki.Item,{label:"Description",children:g}),(0,r.jsx)(i.Ki.Item,{label:"Strain ID",children:j}),m?E:"",(0,r.jsx)(i.Ki.Item,{label:"Sample Stage",children:b}),(0,r.jsx)(i.Ki.Item,{label:"Disease Agent",children:v}),P,(0,r.jsx)(i.Ki.Item,{label:"Spread Vector",children:null!=C?C:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Possible Cures",children:null!=_?_:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Required Cures",children:null!=S?S:"None"}),I?(0,r.jsx)(i.Ki.Item,{label:"Stabilized",children:1===O?"Yes":"No"}):"",I?(0,r.jsx)(i.Ki.Item,{label:"Tracked Strain",children:A&&""!==A?A:"None"}):""]})]})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=!!t.data.synthesisCooldown,c=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:a?"spinner":"clone",iconSpin:a,content:"Clone",disabled:a,onClick:function(){return l("clone_strain",{strain_index:e.strainIndex})}}),e.sectionButtons]});return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.wn,{title:null!=(n=e.sectionTitle)?n:"Strain Information",buttons:c,children:(0,r.jsx)(u,{strain:e.strain,strainIndex:e.strainIndex})})})},f=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,u=c.selectedStrainIndex,f=c.strains,h=f[u-1];if(0===f.length)return(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.IC,{children:"No disease detected in provided blood sample."})});if(1===f.length)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{strain:f[0],strainIndex:1,sectionButtons:(0,r.jsx)(s,{})}),(null==(t=f[0].symptoms)?void 0:t.length)>0&&(0,r.jsx)(m,{strain:f[0]})]});var p=(0,r.jsx)(s,{});return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Culture Information",fill:!0,buttons:p,children:[(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.tU,{children:f.map(function(e,n){var t;return(0,r.jsx)(i.tU.Tab,{icon:"virus",selected:u-1===n,onClick:function(){return a("switch_strain",{strain_index:n+1})},children:null!=(t=e.commonName)?t:"Unknown"},n)})})}),(0,r.jsx)(d,{strain:h,strainIndex:u}),(null==(n=h.symptoms)?void 0:n.length)>0&&(0,r.jsx)(m,{className:"remove-section-bottom-padding",strain:h})]})})},h=function(e){return e.reduce(function(e,n){return e+n},0)},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.predictions,c=l.symptom_names,s=l.analyzing,u=l.analysisDuration,d=e.strain,f=d.baseStats,m=d.symptoms,p=d.known;return(0,r.jsx)(i.so.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Infection Symptoms",fill:!0,className:e.className,children:(0,r.jsxs)(i.XI,{className:"symptoms-table",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{children:"Stealth"}),(0,r.jsx)(i.XI.Cell,{children:"Resistance"}),(0,r.jsx)(i.XI.Cell,{children:"Stage Speed"}),(0,r.jsx)(i.XI.Cell,{children:"Transmissibility"})]}),m.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[p||"UNKNOWN"!==e.name?(0,r.jsx)(i.XI.Cell,{children:e.name}):(0,r.jsx)(i.ms,{options:c.sort(function(e,n){return e.localeCompare(n)}),width:"180px",selected:a[n],disabled:s||-2===u,onSelected:function(e){return t("set_prediction",{pred_index:n+1,pred_value:e})}}),(0,r.jsx)(i.XI.Cell,{children:e.stealth}),(0,r.jsx)(i.XI.Cell,{children:e.resistance}),(0,r.jsx)(i.XI.Cell,{children:e.stageSpeed}),(0,r.jsx)(i.XI.Cell,{children:e.transmissibility})]},n)}),(0,r.jsx)(i.XI.Row,{className:"table-spacer"}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Base Stats"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.transmissibility:"UNKNOWN"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Total"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stealth}))+f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.resistance}))+f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stageSpeed}))+f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.transmissibility}))+f.transmissibility:"UNKNOWN"})]})]})})})},p=["flask","vial","eye-dropper"],x=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.synthesisCooldown,c=(l.beakerContainsVirus,l.resistances);return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Antibodies",fill:!0,children:(0,r.jsx)(i.BJ,{wrap:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:p[n%p.length],disabled:!!a,onClick:function(){return t("clone_vaccine",{resistance_index:n+1})},mr:"0.5em"}),e]},n)})})})})}},3566:function(e,n,t){"use strict";t.r(n),t.d(n,{ParticleAccelerator:()=>u});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(7946),c=t(3384),s=function(e){switch(e){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.assembled,u=a.power,h=a.strength,m=a.max_strength,p=(a.icon,a.layout_1,a.layout_2,a.layout_3,a.orientation);return(0,r.jsx)(c.p8,{width:395,height:s?160:"north"===p||"south"===p?540:465,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Control Panel",buttons:(0,r.jsx)(i.$n,{dmIcon:"sync",content:"Connect",onClick:function(){return t("scan")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",mb:"5px",children:(0,r.jsx)(i.az,{color:s?"good":"bad",children:s?"Operational":"Error: Verify Configuration"})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Strength",children:[(0,r.jsx)(i.$n,{icon:"backward",disabled:!s||0===h,onClick:function(){return t("remove_strength")},mr:"4px"}),h,(0,r.jsx)(i.$n,{icon:"forward",disabled:!s||h===m,onClick:function(){return t("add_strength")},ml:"4px"})]})]})}),s?"":(0,r.jsx)(i.wn,{title:p?"EM Acceleration Chamber Orientation: "+(0,o.ZH)(p):"Place EM Acceleration Chamber Next To Console",children:0===p?"":"north"===p||"south"===p?(0,r.jsx)(f,{}):(0,r.jsx)(d,{})})]})})},d=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,a=t.layout_1,c=t.layout_2,u=t.layout_3,d=t.orientation;return(0,r.jsxs)(i.XI,{children:[(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?a:u).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:c.slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?u:a).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})},f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,c=t.layout_1,u=t.layout_2,d=t.layout_3,f=t.orientation;return(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?c:d).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{children:u.slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?d:c).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,tooltip:e.status,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})}},3371:function(e,n,t){"use strict";t.r(n),t.d(n,{PdaPainter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.has_pda;return(0,r.jsx)(l.p8,{width:510,height:505,children:(0,r.jsx)(l.p8.Content,{children:n?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,r.jsx)(i.In,{name:"download",size:5,mb:"10px"}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.pda_colors;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.XI,{className:"PdaPainter__list",children:Object.keys(l).map(function(e){return(0,r.jsxs)(i.XI.Row,{onClick:function(){return t("choose_pda",{selectedPda:e})},children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/png;base64,".concat(l[e][0]),style:{verticalAlign:"middle",width:"32px",margin:"0px",imageRendering:"pixelated"}})}),(0,r.jsx)(i.XI.Cell,{children:e})]},e)})})})})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.current_appearance,c=l.preview_appearance;return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Current PDA",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(a),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return t("eject_pda")}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return t("paint_pda")}})]}),(0,r.jsx)(i.wn,{title:"Preview",children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}})})]})}},6144:function(e,n,t){"use strict";t.r(n),t.d(n,{PersonalCrafting:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.busy,d=a.category,f=a.display_craftable_only,h=a.display_compact,m=a.prev_cat,p=a.next_cat,x=a.subcategory,g=a.prev_subcat,j=a.next_subcat;return(0,r.jsx)(l.p8,{width:700,height:800,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!u&&(0,r.jsxs)(i.Rr,{fontSize:"32px",children:[(0,r.jsx)(i.In,{name:"cog",spin:1})," Crafting..."]}),(0,r.jsxs)(i.wn,{title:d,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Show Craftable Only",icon:f?"check-square-o":"square-o",selected:f,onClick:function(){return t("toggle_recipes")}}),(0,r.jsx)(i.$n,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return t("toggle_compact")}})]}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:m,icon:"arrow-left",onClick:function(){return t("backwardCat")}}),(0,r.jsx)(i.$n,{content:p,icon:"arrow-right",onClick:function(){return t("forwardCat")}})]}),x&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:g,icon:"arrow-left",onClick:function(){return t("backwardSubCat")}}),(0,r.jsx)(i.$n,{content:j,icon:"arrow-right",onClick:function(){return t("forwardSubCat")}})]}),h?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsx)(i.az,{mt:1,children:(0,r.jsxs)(i.Ki,{children:[c.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}),!a&&s.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsxs)(i.az,{mt:1,children:[c.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)}),!a&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)})]})}},2327:function(e,n,t){"use strict";t.r(n),t.d(n,{Photocopier:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:400,height:440,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{title:"Photocopier",color:"silver",children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Copies:"}),(0,r.jsx)(i.BJ.Item,{width:"2em",bold:!0,children:a.copynumber}),(0,r.jsxs)(i.BJ.Item,{style:{float:"right"},children:[(0,r.jsx)(i.$n,{icon:"minus",textAlign:"center",content:"",onClick:function(){return t("minus")}}),(0,r.jsx)(i.$n,{icon:"plus",textAlign:"center",content:"",onClick:function(){return t("add")}})]})]}),(0,r.jsxs)(i.BJ,{mb:2,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Toner:"}),(0,r.jsx)(i.BJ.Item,{bold:!0,children:a.toner})]}),(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Document:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.copyitem&&!a.mob,content:a.copyitem?a.copyitem:a.mob?a.mob+"'s ass!":"document",onClick:function(){return t("removedocument")}})})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Folder:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.folder,content:a.folder?a.folder:"folder",onClick:function(){return t("removefolder")}})})]})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(c,{})}),(0,r.jsx)(s,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.issilicon;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"copy",textAlign:"center",content:"Copy",onClick:function(){return t("copy")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"file-import",textAlign:"center",content:"Scan",onClick:function(){return t("scandocument")}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"file",color:"green",textAlign:"center",content:"Print Text",onClick:function(){return t("ai_text")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"image",color:"green",textAlign:"center",content:"Print Image",onClick:function(){return t("ai_pic")}})]})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Scanned Files",children:l.files.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:l.toner<=0,onClick:function(){return t("filecopy",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return t("deletefile",{uid:e.uid})}})]})},e.name)})})}},7331:function(e,n,t){"use strict";t.r(n),t.d(n,{PoolController:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["tempKey"]),s=c[l];if(!s)return null;var u=(0,o.Oc)(),d=u.data,f=u.act,h=d.currentTemp,m=s.label,p=s.icon;return(0,r.jsxs)(i.$n,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.direction,s=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Pump Direction",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:4,icon:"sign-in-alt",content:"In",selected:!c,onClick:function(){return t("set_direction",{direction:0})}}),(0,r.jsx)(i.$n,{width:4,icon:"sign-out-alt",content:"Out",selected:c,onClick:function(){return t("set_direction",{direction:1})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Port status",children:(0,r.jsx)(i.az,{color:s?"green":"average",bold:1,ml:.5,children:s?"Connected":"Disconnected"})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.target_pressure,s=l.max_target_pressure,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_pressure",{pressure:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_target_pressure,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},7920:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableScrubber:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Port Status:"}),(0,r.jsx)(i.BJ.Item,{color:c?"green":"average",bold:1,ml:6,children:c?"Connected":"Disconnected"})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.rate,s=l.max_rate,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_rate",{rate:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_rate,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},2854:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableTurret:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.locked,u=c.on,d=c.lethal,f=c.lethal_is_configurable,h=c.targetting_is_configurable,m=c.check_weapons,p=c.neutralize_noaccess,x=c.access_is_configurable,g=c.regions,j=c.selectedAccess,b=c.one_access,y=c.neutralize_norecord,v=c.neutralize_criminals,w=c.neutralize_all,k=c.neutralize_unidentified,_=c.neutralize_cyborgs;return(0,r.jsx)(l.p8,{width:475,height:750,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.BJ.Item,{m:0,children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return t("power")}})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Lethals",children:(0,r.jsx)(i.$n,{icon:d?"exclamation-triangle":"times",content:d?"On":"Off",color:d?"bad":"",disabled:s,onClick:function(){return t("lethal")}})}),!!x&&(0,r.jsx)(i.Ki.Item,{label:"One Access Mode",children:(0,r.jsx)(i.$n,{icon:b?"address-card":"exclamation-triangle",content:b?"On":"Off",selected:b,disabled:s,onClick:function(){return t("one_access")}})})]})})}),!!h&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Humanoid Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:v,content:"Wanted Criminals",disabled:s,onClick:function(){return t("autharrest")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:y,content:"No Sec Record",disabled:s,onClick:function(){return t("authnorecord")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Access",disabled:s,onClick:function(){return t("authaccess")}})]}),(0,r.jsxs)(i.wn,{title:"Other Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:k,content:"Unidentified Lifesigns (Xenos, Animals, Etc)",disabled:s,onClick:function(){return t("authxeno")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:_,content:"Cyborgs",disabled:s,onClick:function(){return t("authborgs")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:w,content:"All Non-Synthetics",disabled:s,onClick:function(){return t("authsynth")}})]})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!x&&(0,r.jsx)(a.AccessList,{accesses:g,selectedList:j,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})})]})})})}},1784:function(e,n,t){"use strict";t.r(n),t.d(n,{PowerMonitor:()=>m,PowerMonitorMainContent:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(6859),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t50?"battery-half":"battery-quarter";break;case"C":i="bolt";break;case"F":i="battery-full";break;case"M":i="slash"}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.In,{width:"18px",textAlign:"center",name:i,color:"N"===n&&(t>50?"yellow":"red")||"C"===n&&"yellow"||"F"===n&&"green"||"M"===n&&"orange"}),(0,r.jsx)(l.az,{inline:!0,width:"36px",textAlign:"right",children:(0,a.Mg)(t)+"%"})]})},b=function(e){switch(e.status){case"AOn":n=!0,t=!0;break;case"AOff":n=!0,t=!1;break;case"On":n=!1,t=!0;break;case"Off":n=!1,t=!1}var n,t,i=(t?"On":"Off")+" [".concat(n?"auto":"manual","]");return(0,r.jsx)(l.m_,{content:i,children:(0,r.jsx)(l.BK,{color:t?"good":"bad",content:n?void 0:"M"})})}},8011:function(e,n,t){"use strict";t.r(n),t.d(n,{PrisonerImplantManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=t(7352),s=t(736),u=function(e){var n=(0,o.Oc)(),t=n.act,u=n.data,d=u.loginState,f=u.prisonerInfo,h=u.chemicalInfo,m=u.trackingInfo;if(!d.logged_in)return(0,r.jsx)(l.p8,{theme:"security",width:500,height:850,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s.LoginScreen,{})})});var p=[1,5,10];return(0,r.jsxs)(l.p8,{theme:"security",width:500,height:850,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.LoginInfo,{}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:f.name?"eject":"id-card",selected:f.name,content:f.name?f.name:"-----",tooltip:f.name?"Eject ID":"Insert ID",onClick:function(){return t("id_card")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Points",children:[null!==f.points?f.points:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"minus-square",disabled:null===f.points,content:"Reset",onClick:function(){return t("reset_points")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Point Goal",children:[null!==f.goal?f.goal:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"pen",disabled:null===f.goal,content:"Edit",onClick:function(){return(0,a.modalOpen)("set_points")}})]}),(0,r.jsx)(i.Ki.Item,{children:(0,r.jsxs)("box",{hidden:null===f.goal,children:["1 minute of prison time should roughly equate to 150 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Sentences should not exceed 5000 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Permanent prisoners should not be given a point goal.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle."]})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Tracking Implants",children:m.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.subject]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:e.health}),(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){return(0,a.modalOpen)("warn",{uid:e.uid})}})})]})]},e.subject)]}),(0,r.jsx)("br",{})]})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.name]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Reagents",children:e.volume})}),p.map(function(n){return(0,r.jsx)(i.$n,{mt:2,disabled:e.volumea});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.can_go_home,s=a.emagged,u=a.id_inserted,d=a.id_name,f=a.id_points,h=a.id_goal,m=+!s,p=c?"Completed!":"Insufficient";s&&(p="ERR0R");var x="No ID inserted";return u?x=(0,r.jsx)(i.z2,{value:f/h,ranges:{good:[m,1/0],bad:[-1/0,m]},children:f+" / "+h+" "+p}):s&&(x="ERR0R COMPLETED?!@"),(0,r.jsx)(l.p8,{width:315,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:x}),(0,r.jsx)(i.Ki.Item,{label:"Shuttle controls",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Move shuttle",disabled:!c,onClick:function(){return t("move_shuttle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inserted ID",children:(0,r.jsx)(i.$n,{fluid:!0,content:u?d:"-------------",onClick:function(){return t("handle_id")}})})]})})})}},9083:function(e,n,t){"use strict";t.r(n),t.d(n,{PrizeCounter:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu;return(0,r.jsx)(o.c_,{fluid:!0,title:e.name,dmIcon:e.icon,dmIconState:e.icon_state,buttonsAlt:(0,r.jsxs)(o.$n,{bold:!0,fontSize:1.5,tooltip:n&&"Not enough tickets",disabled:n,onClick:function(){return t("purchase",{purchase:e.itemID})},children:[e.cost,(0,r.jsx)(o.In,{m:0,mt:.25,name:"ticket",color:n?"bad":"good",size:1.6})]}),children:e.desc},e.name)})})})})})})}},7692:function(e,n,t){"use strict";t.r(n),t.d(n,{QuirkMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e.cost},j=function(e){var n=p.has(e.name);if(n){var r=u(h.filter(function(n){return n!==e.name}),d.all_quirks);if(e.cost<0&&r<0)return}else if(e.cost>0&&!g(e))return;m(n?h.filter(function(n){return n!==e.name}):((function(e){if(Array.isArray(e))return c(e)})(h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(h)||s(h)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e.name])),t(n?"remove_quirk":"add_quirk",{path:e.path})},b=function(e,n,t,i){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{p:.5,mb:1,color:t,style:{border:"1px solid ".concat(t),backgroundColor:"rgba(".concat("green"===t?"0,128,0":"255,0,0",",0.1)")},children:[(0,r.jsx)(o.In,{name:i})," ",n]}),e.map(function(e){var n=p.has(e.name),t=e.cost>0?"-".concat(e.cost):"+".concat(Math.abs(e.cost)),i=e.cost>0?"bad":"good",l=!1,a=n?"Remove":"Select",c=n?"bad":"good";if(n){var s=u(h.filter(function(n){return n!==e.name}),d.all_quirks);e.cost<0&&s<0&&(l=!0,a="Locked (Balance)",c="average")}else e.cost>0&&!g(e)&&(l=!0,a="Locked",c="average");return(0,r.jsx)(o.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(o.$n,{color:c,content:a,disabled:l,onClick:function(){return j(e)},fluid:!0}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:e.desc}),(0,r.jsx)(o.Ki.Item,{label:"Effect",children:(0,r.jsx)(o.az,{color:i,bold:!0,children:t})})]})},e.name)})]})};return(0,r.jsx)(a.p8,{width:750,height:550,theme:"ntos",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,basis:500,children:(0,r.jsx)(o.wn,{title:"Available Quirks",fill:!0,scrollable:!0,children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[b(d.all_quirks.filter(function(e){return e.cost<0}),"Negative Quirks (Add Points)","green","minus-circle"),b(d.all_quirks.filter(function(e){return e.cost>0}),"Positive Quirks (Cost Points)","bad","plus-circle")]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.cG,{vertical:!0})}),(0,r.jsx)(o.BJ.Item,{basis:250,children:(0,r.jsxs)(o.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(o.wn,{title:"Balance",children:(0,r.jsx)(o.az,{bold:!0,color:x>=0?"good":"bad",fontSize:"18px",children:x})}),(0,r.jsx)(o.wn,{title:"Selected Quirks",fill:!0,scrollable:!0,children:h.length?h.map(function(e){var n=d.all_quirks.find(function(n){return n.name===e});if(!n)return null;var t=n.cost>0?"-".concat(n.cost):"+".concat(Math.abs(n.cost)),i=n.cost>0?"var(--color-bad)":"var(--color-good)";return(0,r.jsx)(o.az,{mb:.5,p:.5,style:{borderLeft:"3px solid ".concat(i)},children:(0,r.jsxs)(o.BJ,{justify:"space-between",children:[(0,r.jsx)(o.az,{bold:!0,children:e}),(0,r.jsx)(o.az,{children:t})]})},e)}):(0,r.jsx)(o.az,{italic:!0,children:"No quirks selected."})})]})})]})})})}},7076:function(e,n,t){"use strict";t.r(n),t.d(n,{RCD:()=>s});var r=t(8138);t(4530);var i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(4744),s=function(){return(0,r.jsxs)(l.p8,{width:480,height:670,children:[(0,r.jsx)(c.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})})]})},u=function(){var e=(0,o.Oc)().data,n=e.matter,t=e.max_matter,l=.7*t,a=.25*t;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Matter Storage",children:(0,r.jsx)(i.z2,{ranges:{good:[l,1/0],average:[a,l],bad:[-1/0,a]},value:n,maxValue:t,children:(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:"".concat(n," / ").concat(t," units")})})})})},d=function(){return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Construction Type",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(f,{mode_type:"Floors and Walls"}),(0,r.jsx)(f,{mode_type:"Airlocks"}),(0,r.jsx)(f,{mode_type:"Windows"}),(0,r.jsx)(f,{mode_type:"Deconstruction"})]})})})},f=function(e){var n=e.mode_type,t=(0,o.Oc)(),l=t.act,a=t.data.mode;return(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",content:n,selected:+(a===n),onClick:function(){return l("mode",{mode:n})}})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.door_name,a=t.electrochromic,s=t.airlock_glass;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Airlock Settings",children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,r.jsxs)(r.Fragment,{children:["Rename: ",(0,r.jsx)("b",{children:l})]}),onClick:function(){return(0,c.modalOpen)("renameAirlock")}})}),(0,r.jsx)(i.BJ.Item,{children:1===s&&(0,r.jsx)(i.$n,{fluid:!0,icon:a?"toggle-on":"toggle-off",content:"Electrochromic",selected:a,onClick:function(){return n("electrochromic")}})})]})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.tab,c=t.locked,s=t.one_access,u=t.selected_accesses,d=t.regions;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.tU,{fluid:!0,children:[(0,r.jsx)(i.tU.Tab,{icon:"cog",selected:1===l,onClick:function(){return n("set_tab",{tab:1})},children:"Airlock Types"}),(0,r.jsx)(i.tU.Tab,{selected:2===l,icon:"list",onClick:function(){return n("set_tab",{tab:2})},children:"Airlock Access"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:1===l?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Types",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:0})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:1})})]})}):2===l&&c?(0,r.jsx)(i.wn,{fill:!0,title:"Access",buttons:(0,r.jsx)(i.$n,{icon:"lock-open",content:"Unlock",onClick:function(){return n("set_lock",{new_lock:"unlock"})}}),children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:5,mb:3}),(0,r.jsx)("br",{}),"Airlock access selection is currently locked."]})})}):(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"lock",content:"Lock",onClick:function(){return n("set_lock",{new_lock:"lock"})}}),usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return n("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,width:4,content:"All",onClick:function(){return n("set_one_access",{access:"all"})}})]}),accesses:d,selectedList:u,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})},grantableList:[]})})]})},p=function(e){var n=e.check_number,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.door_types_ui_list,s=a.door_type,u=c.filter(function(e,t){return t%2===n});return(0,r.jsx)(i.BJ.Item,{children:u.map(function(e,n){return(0,r.jsx)(i.BJ,{mb:.5,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,selected:s===e.type,content:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"3px",marginRight:"6px",marginLeft:"-3px"}}),e.name]}),onClick:function(){return l("door_type",{door_type:e.type})}})})},n)})})}},1703:function(e,n,t){"use strict";t.r(n),t.d(n,{RPD:()=>s});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.mainmenu,s=o.mode;return(0,r.jsx)(c.p8,{width:550,height:440,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{icon:e.icon,selected:e.mode===s,onClick:function(){return t("mode",{mode:e.mode})},children:e.category},e.category)})})}),function(e){switch(e){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(d,{});case 3:return(0,r.jsx)(h,{});case 4:return(0,r.jsx)(m,{});case 5:return(0,r.jsx)(p,{});case 6:return(0,r.jsx)(x,{});default:return"WE SHOULDN'T BE HERE!"}}(s)]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.pipemenu,u=c.pipe_category,d=c.pipelist,h=c.whatpipe,m=c.iconrotation;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:s.map(function(e){return(0,r.jsx)(i.tU.Tab,{textAlign:"center",selected:e.pipemode===u,onClick:function(){return t("pipe_category",{pipe_category:e.pipemode})},children:e.category},e.category)})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.pd,{fluid:!0,placeholder:"Enter pipe label",onChange:function(e){return t("set_label",{set_label:e})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:d.filter(function(e){return 1===e.pipe_type}).filter(function(e){return e.pipe_category===u}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===h,onClick:function(){return t("whatpipe",{whatpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),d.filter(function(e){return 1===e.pipe_type&&e.pipe_id===h&&1!==e.orientations}).map(function(e){return(0,r.jsx)(i.az,{children:e.bendy?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})})]}),(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]})},e.pipe_id)})]})})})})]})})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatdpipe,d=c.iconrotation;return c.auto_wrench_toggle,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 2===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatdpipe",{whatdpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 2===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.iconrotation,c=o.auto_wrench_toggle;return(0,r.jsxs)(i.BJ,{mb:1,textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Auto-orientation",selected:0===a,onClick:function(){return t("iconrotation",{iconrotation:0})}})}),(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:c,content:"Auto-anchor",onClick:function(){return t("auto_wrench_toggle")}})})]})},h=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"sync-alt",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to rotate loose pipes..."]})})})})},m=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"arrows-alt-h",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to flip loose pipes..."]})})})})},p=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"recycle",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to eat loose pipes..."]})})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatttube,d=c.iconrotation;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 3===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatttube",{whatttube:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 3===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})}},8930:function(e,n,t){"use strict";t.r(n),t.d(n,{Radio:()=>u});var r=t(8138),i=t(8587),o=t(7790),l=t(6859),a=t(2864),c=t(421),s=t(3384),u=function(e){var n=(0,a.Oc)(),t=n.act,u=n.data,d=u.freqlock,f=u.frequency,h=u.minFrequency,m=u.maxFrequency,p=u.canReset,x=u.listening,g=u.broadcasting,j=u.loudspeaker,b=u.has_loudspeaker,y=u.ichannels,v=u.schannels,w=c.Fo.find(function(e){return e.freq===f}),k=!!w&&!!w.name,_=[];c.Fo.forEach(function(e){_[e.name]=e.color});var C=(0,i.Tj)(v,function(e,n){return{name:n,status:!!e}}),I=(0,i.Tj)(y,function(e,n){return{name:n,freq:e}});return(0,r.jsx)(s.p8,{width:375,height:130+21.2*C.length+11*I.length,children:(0,r.jsx)(s.p8.Content,{scrollable:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Frequency",children:[d&&(0,r.jsx)(o.az,{inline:!0,color:"light-gray",children:(0,l.Mg)(f/10,1)+" kHz"})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q7,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:h/10,maxValue:m/10,value:f/10,format:function(e){return(0,l.Mg)(e,1)},onChange:function(e){return t("frequency",{adjust:e-f/10})}}),(0,r.jsx)(o.$n,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return t("frequency",{tune:"reset"})}})]}),k&&w&&(0,r.jsxs)(o.az,{inline:!0,color:w.color,ml:2,children:["[",w.name,"]"]})]}),(0,r.jsxs)(o.Ki.Item,{label:"Audio",children:[(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:x?"volume-up":"volume-mute",selected:x,color:x?"":"bad",tooltip:x?"Disable Incoming":"Enable Incoming",onClick:function(){return t("listen")}}),(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:g?"microphone":"microphone-slash",selected:g,tooltip:g?"Disable Hotmic":"Enable Hotmic",onClick:function(){return t("broadcast")}}),!!b&&(0,r.jsx)(o.$n,{ml:1,icon:"bullhorn",selected:j,content:"Loudspeaker",tooltip:j?"Disable Loudspeaker":"Enable Loudspeaker",onClick:function(){return t("loudspeaker")}})]}),0!==v.length&&(0,r.jsx)(o.Ki.Item,{label:"Keyed Channels",children:C.map(function(e){return(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.$n,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:"",onClick:function(){return t("channel",{channel:e.name})}}),(0,r.jsx)(o.az,{inline:!0,color:_[e.name],children:e.name})]},e.name)})}),0!==I.length&&(0,r.jsx)(o.Ki.Item,{label:"Standard Channel",children:I.map(function(e){return(0,r.jsx)(o.$n,{icon:"arrow-right",content:e.name,selected:k&&w&&w.name===e.name,onClick:function(){return t("ichannel",{ichannel:e.freq})}},"i_"+e.name)})})]})})})})}},4097:function(e,n,t){"use strict";t.r(n),t.d(n,{RankedListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:null;if(null!==a){var i=function(e){if(Array.isArray(e))return u(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||f(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i.splice(a,1)[0];null===r?i.push(o):i.splice(r,0,o),t(i),c(null),e.stopPropagation()}};return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,onDrop:function(e){return m(e)},onDragOver:h,children:(0,r.jsx)(o.XI,{children:n.map(function(e,n){return(0,r.jsx)(o.XI.Row,{style:{padding:"8px"},draggable:!0,onDragStart:function(){return s(n)},onDragOver:h,onDrop:function(e){return m(e,n)},children:(0,r.jsx)(o.$n,{fluid:!0,py:"0.25rem",color:"transparent",style:{animation:"none",transition:"none",cursor:"move"},icon:"grip-lines",children:e.replace(/^\w/,function(e){return e.toUpperCase()})})},n)})})})}},4087:function(e,n,t){"use strict";t.r(n),t.d(n,{ReactorMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),C=(t=Math).max.apply(t,[1].concat(function(e){if(Array.isArray(e))return s(e)}(n=_.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:500,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power Generation",children:(0,r.jsx)(i.z2,{value:x,minValue:0,maxValue:2e3,ranges:x<=1e4?{good:[400,1/0],average:[200,400],bad:[-1/0,200]}:{good:[-1/0,1/0]},children:(0,o.Mg)(x<1e4?x:x/1e3)+(x<1e4?" KW":" MW")})}),(0,r.jsx)(i.Ki.Item,{label:"Reactivity Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:u(g),minValue:0,maxValue:u(1e4),ranges:{teal:[-1/0,u(80)],good:[u(80),u(373)],average:[u(373),u(1e3)],bad:[u(1e3),1/0]},children:(0,o.Mg)(g)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:u(j),minValue:0,maxValue:u(5e4),ranges:{good:[u(1),u(1e3)],average:[-1/0,u(3e3)],bad:[u(3e3),1/0]},children:(0,o.Mg)(j)+" kPa"})}),(0,r.jsx)(i.Ki.Item,{label:"Control Rod Limiter",children:(0,r.jsx)(i.z2,{value:y,minValue:0,maxValue:100,ranges:{teal:[100,1/0],good:[70,99],average:[30,70],bad:[-1/0,30]},children:(0,o.Mg)(y)+" %"})})]}),(0,r.jsx)(i.wn,{title:"Desired Control Rod Limit",textAlign:"center",children:(0,r.jsx)(i.N6,{size:5,value:v,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:2,onChange:function(e,n){return f("set_throttle",{NGCR_throttle:n})}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:m?"Vent Open":"Vent Closed",selected:m,onClick:function(){return f("toggle_vent")}}),children:(0,r.jsx)(i.Ki,{children:_.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:C,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})})})]})})})}},1876:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentGrinder:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=t(6696),s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=n.config,s=t.operating,h=a.title;return(0,r.jsx)(l.p8,{width:400,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.Operating,{operating:s,name:h}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(f,{})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.inactive;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"mortar-pestle",disabled:l,tooltip:l?"There are no contents":"Grind the contents",tooltipPosition:"bottom",content:"Grind",onClick:function(){return t("grind")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"blender",disabled:l,tooltip:l?"There are no contents":"Juice the contents",tooltipPosition:"bottom",content:"Juice",onClick:function(){return t("juice")}})})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.contents,c=l.limit,s=l.count,u=l.inactive;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Contents",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",c," items"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Contents",onClick:function(){return t("eject")},disabled:u,tooltip:u?"There are no contents":""})]}),children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:a.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.beaker_loaded,s=l.beaker_current_volume,u=l.beaker_max_volume,d=l.beaker_contents;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Beaker",buttons:!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Detach Beaker",onClick:function(){return t("detach")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:d})})}},1569:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentsEditor:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9298),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.on;return(0,r.jsx)(l.p8,{width:300,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Receiver",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("recv_power")}})})}),(0,r.jsx)(a.Signaler,{data:c})]})})})}},5297:function(e,n,t){"use strict";t.r(n),t.d(n,{RequestConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){var e=(0,o.Oc)().data,n=e.screen,t=e.announcementConsole;return(0,r.jsx)(l.p8,{width:450,height:t?430:385,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:function(e){switch(e){case 0:return(0,r.jsx)(u,{});case 1:return(0,r.jsx)(d,{purpose:"ASSISTANCE"});case 2:return(0,r.jsx)(d,{purpose:"SUPPLIES"});case 3:return(0,r.jsx)(d,{purpose:"INFO"});case 4:return(0,r.jsx)(f,{type:"SUCCESS"});case 5:return(0,r.jsx)(f,{type:"FAIL"});case 6:return(0,r.jsx)(h,{type:"MESSAGES"});case 7:return(0,r.jsx)(m,{});case 8:return(0,r.jsx)(p,{});case 9:return(0,r.jsx)(x,{});case 10:return(0,r.jsx)(h,{type:"SHIPPING"});case 11:return(0,r.jsx)(g,{});default:return"WE SHOULDN'T BE HERE!"}}(n)})})})},c=function(e){var n=(0,o.Oc)().act,t=e.text,l=e.icon,a=e.screen;return(0,r.jsx)(i.$n,{fluid:!0,lineHeight:3,icon:l,onClick:function(){return n("setScreen",{setScreen:a})},children:t})},s=function(){var e=(0,o.Oc)().act;return(0,r.jsx)(i.$n,{icon:"arrow-left",onClick:function(){return e("setScreen",{setScreen:0})},children:"Back"})},u=function(){var e,n=(0,o.Oc)(),t=n.act,l=n.data,a=l.newmessagepriority,s=l.announcementConsole,u=l.silent;return e=3===a?(0,r.jsx)(i.Z8,{children:(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):a>0?(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"There are new messages"}):(0,r.jsx)(i.az,{color:"label",mb:1,children:"There are no new messages"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,r.jsx)(i.$n,{width:9,selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return t("toggleSilent")},children:u?"Speaker Off":"Speaker On"}),children:[e,(0,r.jsx)(i.az,{children:(0,r.jsx)(c,{icon:a>0?"envelope-open-text":"envelope",screen:6,text:"View Messages"})}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"hand-paper",screen:1,text:"Request Assistance"}),(0,r.jsx)(c,{icon:"box",screen:2,text:"Request Supplies"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:11,text:"Request Secondary Goal"}),(0,r.jsx)(c,{icon:"comment",screen:3,text:"Relay Anonymous Information"})]}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"tag",screen:9,text:"Print Shipping Label"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:10,text:"View Shipping Logs"})]}),!!s&&(0,r.jsx)(i.az,{mt:1,children:(0,r.jsx)(c,{icon:"bullhorn",screen:8,text:"Send Station-Wide Announcement"})})]})})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.department,u=a.assist_dept,d=a.supply_dept,f=a.info_dept,h=[];switch(e.purpose){case"ASSISTANCE":h=u,n="Request assistance from another department";break;case"SUPPLIES":h=d,n="Request supplies from another department";break;case"INFO":h=f,n="Relay information to another department"}return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.Ki,{children:h.filter(function(e){return e!==c}).map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:[(0,r.jsx)(i.$n,{icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:2})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:3})},children:"High Priority"})]},e)})})})})},f=function(e){var n;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Unable to contact messaging server"}return(0,r.jsx)(i.wn,{fill:!0,title:n,buttons:(0,r.jsx)(s,{})})},h=function(e){var n,t=(0,o.Oc)(),l=(t.act,t.data),a=l.message_log,c=l.shipping_log,u=[];switch(e.type){case"MESSAGES":u=a,n="Message Log";break;case"SHIPPING":u=c,n="Shipping label print log"}return u.reverse(),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:u.map(function(e,n){return(0,r.jsxs)(i.az,{textAlign:"left",children:[e.map(function(e,n){return(0,r.jsx)("div",{children:e},n)}),(0,r.jsx)("hr",{})]},n)})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.recipient,a=t.message,c=t.msgVerified,u=t.msgStamped;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,r.jsx)(s,{}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Recipient",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Message",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",color:"green",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Stamped by",color:"blue",children:u})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"envelope",onClick:function(){return n("department",{department:l})},children:"Send Message"})})})]})},p=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.message,a=t.announceAuth;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(i.$n,{icon:"edit",onClick:function(){return n("writeAnnouncement")},children:"Edit Message"})]}),children:l})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"bullhorn",disabled:!(a&&l),onClick:function(){return n("sendAnnouncement")},children:"Send Announcement"})]})})]})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.shipDest,a=t.msgVerified,c=t.ship_dept;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.wn,{title:"Print Shipping Label",buttons:(0,r.jsx)(s,{}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Destination",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",children:a})]}),(0,r.jsx)(i.$n,{fluid:!0,mt:1,textAlign:"center",icon:"print",disabled:!(l&&a),onClick:function(){return n("printLabel")},children:"Print Label"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Destinations",children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:(0,r.jsx)(i.$n,{selected:l===e,onClick:function(){return n("shipSelect",{shipSelect:e})},children:l===e?"Selected":"Select"})},e)})})})})]})},g=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.secondaryGoalAuth,a=t.secondaryGoalEnabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,r.jsx)(s,{})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?l?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"clipboard-list",disabled:!(l&&a),onClick:function(){return n("requestSecondaryGoal")},children:"Request Secondary Goal"})]})})]})}},4384:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>c,RndBackupConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.network_name,u=a.has_disk,d=a.disk_name,f=a.linked,h=a.techs,m=a.last_timestamp;return(0,r.jsx)(l.p8,{width:900,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Device Info",children:[(0,r.jsx)(i.az,{mb:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Current Network",children:f?(0,r.jsx)(i.$n,{content:s,icon:"unlink",selected:1,onClick:function(){return t("unlink")}}):"None"}),(0,r.jsx)(i.Ki.Item,{label:"Loaded Disk",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:d+" (Last backup: "+m+")",icon:"save",selected:1,onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Save all",onClick:function(){return t("saveall2disk")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load all",onClick:function(){return t("saveall2network")}})]}):"None"})]})}),!!f||(0,r.jsx)(c,{})]}),(0,r.jsx)(i.az,{mt:2,children:(0,r.jsx)(i.wn,{title:"Tech Info",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Tech Name"}),(0,r.jsx)(i.XI.Cell,{children:"Network Level"}),(0,r.jsx)(i.XI.Cell,{children:"Disk Level"}),(0,r.jsx)(i.XI.Cell,{children:"Actions"})]}),Object.keys(h).map(function(e){return!(h[e].network_level>0||h[e].disk_level>0)||(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:h[e].name}),(0,r.jsx)(i.XI.Cell,{children:h[e].network_level||"None"}),(0,r.jsx)(i.XI.Cell,{children:h[e].disk_level||"None"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!f,onClick:function(){return t("savetech2network",{tech:e})}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!f,onClick:function(){return t("savetech2disk",{tech:e})}})]})]},e)})]})})})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})}},4080:function(e,n,t){"use strict";t.r(n),t.d(n,{AnalyzerMenu:()=>a});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.data,o=n.act,a=t.tech_levels,s=t.loaded_item,u=t.linked_analyzer,d=t.can_discover;return u?s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Object Analysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Deconstruct",icon:"microscope",onClick:function(){o("deconstruct")}}),(0,r.jsx)(i.$n,{content:"Eject",icon:"eject",onClick:function(){o("eject_item")}}),!d||(0,r.jsx)(i.$n,{content:"Discover",icon:"atom",onClick:function(){o("discover")}})]}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name})})}),(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{id:"research-levels",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Research Field"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Current Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Object Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"New Level"})]}),a.map(function(e){return(0,r.jsx)(c,{techLevel:e},e.id)})]})})]}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})},c=function(e){var n=e.techLevel,t=n.name,l=n.desc,a=n.level,c=n.object_level,s=n.ui_icon,u=null!=c,d=u&&c>=a?Math.max(c,a+1):a;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"circle-info",tooltip:l})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.In,{name:s})," ",t]}),(0,r.jsx)(i.XI.Cell,{children:a}),u?(0,r.jsx)(i.XI.Cell,{children:c}):(0,r.jsx)(i.XI.Cell,{className:"research-level-no-effect",children:"-"}),(0,r.jsx)(i.XI.Cell,{className:(0,o.Ly)([d!==a&&"upgraded-level"]),children:d})]})}},9529:function(e,n,t){"use strict";t.r(n),t.d(n,{DataDiskMenu:()=>d});var r=t(8138),i=t(7790),o=t(2864),l="tech",a=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;return a?(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:a.name}),(0,r.jsx)(i.Ki.Item,{label:"Level",children:a.level}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:a.desc})]}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_tech")}})})]}):null},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;if(!a)return null;var c=a.name,s=a.lathe_types,u=a.materials,d=s.join(", ");return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:c}),d?(0,r.jsx)(i.Ki.Item,{label:"Lathe Types",children:d}):null,(0,r.jsx)(i.Ki.Item,{label:"Required Materials"})]}),u.map(function(e){return(0,r.jsxs)(i.az,{children:["- ",(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e.name})," x ",e.amount]},e.name)}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_design")}})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.disk_data;return(0,r.jsx)(i.wn,function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=function(e){var n=(0,o.Oc)(),t=n.data,a=n.act,c=t.category,s=t.matching_designs,u=4===t.menu?"build":"imprint";return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,height:36,title:c,children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(i.XI,{className:"RndConsole__LatheCategory__MatchingDesigns",children:s.map(function(e){var n=e.id,t=e.name,o=e.can_build,l=e.materials;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"print",content:t,disabled:o<1,onClick:function(){return a(u,{id:n,amount:1})}})}),(0,r.jsx)(i.XI.Cell,{children:o>=5?(0,r.jsx)(i.$n,{content:"x5",onClick:function(){return a(u,{id:n,amount:5})}}):null}),(0,r.jsx)(i.XI.Cell,{children:o>=10?(0,r.jsx)(i.$n,{content:"x10",onClick:function(){return a(u,{id:n,amount:10})}}):null}),(0,r.jsx)(i.XI.Cell,{children:l.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[" | ",(0,r.jsxs)("span",{className:e.is_red?"color-red":null,children:[e.amount," ",e.name]})]})})})]},n)})})]})}},4154:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheChemicalStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_chemicals,c=4===t.menu;return(0,r.jsxs)(i.wn,{title:"Chemical Storage",children:[(0,r.jsx)(i.$n,{content:"Purge All",icon:"trash",onClick:function(){l(c?"disposeallP":"disposeallI")}}),(0,r.jsx)(i.Ki,{children:a.map(function(e){var n=e.volume,t=e.name,o=e.id;return(0,r.jsx)(i.Ki.Item,{label:"* ".concat(n," of ").concat(t),children:(0,r.jsx)(i.$n,{content:"Purge",icon:"trash",onClick:function(){l(c?"disposeP":"disposeI",{id:o})}})},o)})})]})}},8563:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMainMenu:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=t(6013),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.act,s=t.menu,u=t.categories;return(0,r.jsxs)(i.wn,{title:(4===s?"Protolathe":"Circuit Imprinter")+" Menu",children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(a.LatheSearch,{}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(i.so,{wrap:"wrap",children:u.map(function(e){return(0,r.jsx)(i.so,{style:{flexBasis:"50%",marginBottom:"6px"},children:(0,r.jsx)(i.$n,{icon:"arrow-right",content:e,onClick:function(){c("setCategory",{category:e})}})},e)})})]})}},7635:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterialStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_materials;return(0,r.jsx)(i.wn,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,r.jsx)(i.XI,{children:a.map(function(e){var n=e.id,o=e.amount,a=e.name,c=function(e){l(4===t.menu?"lathe_ejectsheet":"imprinter_ejectsheet",{id:n,amount:e})},s=Math.floor(o/2e3),u=o<1;return(0,r.jsxs)(i.XI.Row,{className:u?"color-grey":"color-yellow",children:[(0,r.jsxs)(i.XI.Cell,{minWidth:"210px",children:["* ",o," of ",a]}),(0,r.jsxs)(i.XI.Cell,{minWidth:"110px",children:["(",s," sheet",1===s?"":"s",")"]}),(0,r.jsx)(i.XI.Cell,{children:o>=2e3?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"1x",icon:"eject",onClick:function(){return c(1)}}),(0,r.jsx)(i.$n,{content:"C",icon:"eject",onClick:function(){return c("custom")}}),o>=1e4?(0,r.jsx)(i.$n,{content:"5x",icon:"eject",onClick:function(){return c(5)}}):null,(0,r.jsx)(i.$n,{content:"All",icon:"eject",onClick:function(){return c(50)}})]}):null})]},n)})})})}},5887:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterials:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().data,t=n.total_materials,l=n.max_materials,a=n.max_chemicals,c=n.total_chemicals;return(0,r.jsx)(i.az,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,r.jsxs)(i.XI,{width:"auto",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Material Amount:"}),(0,r.jsx)(i.XI.Cell,{children:t}),l?(0,r.jsx)(i.XI.Cell,{children:" / "+l}):null]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Chemical Amount:"}),(0,r.jsx)(i.XI.Cell,{children:c}),a?(0,r.jsx)(i.XI.Cell,{children:" / "+a}):null]})]})})}},9760:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMenu:()=>p});var r=t(8138),i=t(7790),o=t(2864),l=t(2247),a=t(1465),c=t(4154),s=t(8563),u=t(7635);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.pd,{placeholder:"Search...",onEnter:function(e){return n("search",{to_search:e})}})})}},7726:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.controllers;return(0,r.jsx)(l.p8,{width:800,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})}},3321:function(e,n,t){"use strict";t.r(n),t.d(n,{SettingsMenu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(a,{}),(0,r.jsx)(c,{})]})},a=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;l.sync;var a=l.admin;return(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.so,{direction:"column",align:"flex-start",children:[(0,r.jsx)(i.$n,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){t("unlink")}}),1===a?(0,r.jsx)(i.$n,{icon:"gears",color:"red",content:"[ADMIN] Maximize research levels",onClick:function(){return t("maxresearch")}}):null]})})},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.linked_analyzer,c=t.linked_lathe,s=t.linked_imprinter;return(0,r.jsx)(i.wn,{title:"Linked Devices",buttons:(0,r.jsx)(i.$n,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return l("find_device")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scientific Analyzer",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!a,content:a?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"analyze"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Protolathe",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!c,content:c?"Unlink":"Undetected",onClick:function(){l("disconnect",{item:"lathe"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Circuit Imprinter",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!s,content:s?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"imprinter"})}})})]})})}},2247:function(e,n,t){"use strict";t.r(n),t.d(n,{MENU:()=>h,PRINTER_MENU:()=>m,RndConsole:()=>g});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4080),c=t(9529),s=t(9760),u=t(7726),d=t(3321),f=i.tU.Tab,h={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},m={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},p=function(e){switch(e){case h.MAIN:return(0,r.jsx)(b,{});case h.DISK:return(0,r.jsx)(c.DataDiskMenu,{});case h.ANALYZE:return(0,r.jsx)(a.AnalyzerMenu,{});case h.LATHE:case h.IMPRINTER:return(0,r.jsx)(s.LatheMenu,{});case h.SETTINGS:return(0,r.jsx)(d.SettingsMenu,{});default:return"UNKNOWN MENU"}},x=function(e){var n=(0,o.Oc)(),t=n.act,i=n.data.menu,l=e.menu,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nd});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t-1});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Network Configuration",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Network Name",children:(0,r.jsx)(o.$n,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){return t("network_name")}})}),(0,r.jsx)(o.Ki.Item,{label:"Network Password",children:(0,r.jsx)(o.$n,{content:f||"Unset",selected:f,icon:"lock",onClick:function(){return t("network_password")}})})]})}),(0,r.jsxs)(o.wn,{title:"Connected Devices",children:[(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:"ALL"===s,onClick:function(){return d("ALL")},icon:"network-wired",children:"All Devices"},"AllDevices"),(0,r.jsx)(o.tU.Tab,{selected:"SRV"===s,onClick:function(){return d("SRV")},icon:"server",children:"R&D Servers"},"RNDServers"),(0,r.jsx)(o.tU.Tab,{selected:"RDC"===s,onClick:function(){return d("RDC")},icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,r.jsx)(o.tU.Tab,{selected:"MFB"===s,onClick:function(){return d("MFB")},icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,r.jsx)(o.tU.Tab,{selected:"MSC"===s,onClick:function(){return d("MSC")},icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Device Name"}),(0,r.jsx)(o.XI.Cell,{children:"Device ID"}),(0,r.jsx)(o.XI.Cell,{children:"Unlink"})]}),x.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink_device",{dclass:e.dclass,uid:e.id})}})})]},e.id)})]})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.designs,s=u((0,i.useState)(""),2),d=s[0],f=s[1];return(0,r.jsxs)(o.wn,{title:"Design Management",children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for designs",mb:2,onChange:function(e){return f(e)}}),c.filter((0,l.XZ)(d,function(e){return e.name})).map(function(e){return(0,r.jsx)(o.$n.Checkbox,{fluid:!0,content:e.name,checked:!e.blacklisted,onClick:function(){return t(e.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:e.uid})}},e.name)})]})}},5156:function(e,n,t){"use strict";t.r(n),t.d(n,{RndServer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.active,d=a.network_name;return(0,r.jsx)(l.p8,{width:600,height:500,resizable:!0,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Server Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine power",children:(0,r.jsx)(i.$n,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link status",children:null===d?(0,r.jsx)(i.az,{color:"red",children:"Unlinked"}):(0,r.jsx)(i.az,{color:"green",children:"Linked"})})]})}),null===d?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.network_name;return(0,r.jsx)(i.wn,{title:"Network Info",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected network ID",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.netname}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},7868:function(e,n,t){"use strict";t.r(n),t.d(n,{RobotSelfDiagnosis:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e,n){var t=e/n;return t<=.2?"good":t<=.5?"average":"bad"},s=function(e){var n=(0,l.Oc)().data.component_data;return(0,r.jsx)(a.p8,{width:280,height:480,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:n.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),children:e.installed<=0?(0,r.jsx)(i.IC,{m:-.5,height:3.5,color:"red",style:{fontStyle:"normal"},children:(0,r.jsx)(i.so,{height:"100%",children:(0,r.jsx)(i.so.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{width:"72%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",color:c(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",color:c(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,r.jsx)(i.Ki.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},n)})})})}},1696:function(e,n,t){"use strict";t.r(n),t.d(n,{RoboticsControlConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.can_hack,u=a.safety,d=a.show_lock_all,f=a.cyborgs;return(0,r.jsx)(l.p8,{width:500,height:460,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!d&&(0,r.jsxs)(i.wn,{title:"Emergency Lock Down",children:[(0,r.jsx)(i.$n,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return t("arm",{})}}),(0,r.jsx)(i.$n,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return t("masslock",{})}})]}),(0,r.jsx)(c,{cyborgs:void 0===f?[]:f,can_hack:s})]})})},c=function(e){var n=e.cyborgs;e.can_hack;var t=(0,o.Oc)(),l=t.act,a=t.data,c="Detonate";return(a.detonate_cooldown>0&&(c+=" ("+a.detonate_cooldown+"s)"),n.length)?n.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[!!e.hackable&&!e.emagged&&(0,r.jsx)(i.$n,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return l("hackbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!a.auth,onClick:function(){return l("stopbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"bomb",content:c,disabled:!a.auth||a.detonate_cooldown>0,color:"bad",onClick:function(){return l("killbot",{uid:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.az,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,r.jsx)(i.az,{children:e.locstring})}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:(0,r.jsx)(i.z2,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Capacity",children:(0,r.jsx)(i.az,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})]})||(0,r.jsx)(i.Ki.Item,{label:"Cell",children:(0,r.jsx)(i.az,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,r.jsx)(i.Ki.Item,{label:"Safeties",children:(0,r.jsx)(i.az,{color:"bad",children:"DISABLED"})}),(0,r.jsx)(i.Ki.Item,{label:"Module",children:e.module}),(0,r.jsx)(i.Ki.Item,{label:"Master AI",children:(0,r.jsx)(i.az,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)}):(0,r.jsx)(i.IC,{children:"No cyborg units detected within access parameters."})}},5826:function(e,n,t){"use strict";t.r(n),t.d(n,{Safe:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=(n.act,n.data),i=t.dial,c=t.open;return t.locked,t.contents,(0,r.jsx)(a.p8,{theme:"safe",width:600,height:800,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsxs)(o.az,{className:"Safe--engraving",children:[(0,r.jsx)(s,{}),(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"25%"}),(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,r.jsx)(o.In,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,r.jsx)("br",{}),c?(0,r.jsx)(u,{}):(0,r.jsx)(o.az,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*i+"deg)",zIndex:0}})]}),!c&&(0,r.jsx)(d,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.dial,c=i.open,s=i.locked,u=function(e,n){return(0,r.jsx)(o.$n,{disabled:c||n&&!s,icon:"arrow-"+(n?"right":"left"),content:(n?"Right":"Left")+" "+e,iconRight:n,onClick:function(){return t(n?"turnleft":"turnright",{num:e})},style:{zIndex:10}})};return(0,r.jsxs)(o.az,{className:"Safe--dialer",children:[(0,r.jsx)(o.$n,{disabled:s,icon:c?"lock":"lock-open",content:c?"Close":"Open",mb:"0.5rem",onClick:function(){return t("open")}}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--number",children:a})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.contents;return(0,r.jsx)(o.az,{className:"Safe--contents",overflow:"auto",children:a.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsxs)(o.$n,{mb:"0.5rem",onClick:function(){return t("retrieve",{index:n+1})},children:[(0,r.jsx)(o.az,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,r.jsx)("br",{})]},e)})})},d=function(e){return(0,r.jsxs)(o.wn,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,r.jsxs)(o.az,{children:["1. Turn the dial left to the first number.",(0,r.jsx)("br",{}),"2. Turn the dial right to the second number.",(0,r.jsx)("br",{}),"3. Continue repeating this process for each number, switching between left and right each time.",(0,r.jsx)("br",{}),"4. Open the safe."]}),(0,r.jsx)(o.az,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},1892:function(e,n,t){"use strict";t.r(n),t.d(n,{SatelliteControl:()=>u,SatelliteControlFooter:()=>h,SatelliteControlMapView:()=>f,SatelliteControlSatellitesList:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=d?"good":"average",value:u,maxValue:100,children:[u,"%"]})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{content:"Check coverage",disabled:f,onClick:function(){return t("begin_test")}})})]})})}),(0,r.jsx)(o.BJ.Item,{color:c,children:a})]})}},7943:function(e,n,t){"use strict";t.r(n),t.d(n,{SecureStorage:()=>s});var r=t(8138),i=t(7790),o=t(7686),l=t(5490),a=t(2864),c=t(3384),s=function(e){return(0,r.jsx)(c.p8,{theme:"securestorage",height:500,width:280,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})})})})})},u=function(e){var n=(0,a.Oc)().act,t=window.event?e.which:e.keyCode;if(t===o.Ri){e.preventDefault(),n("keypad",{digit:"E"});return}if(t===o.s6){e.preventDefault(),n("keypad",{digit:"C"});return}if(t===o.ye){e.preventDefault(),n("backspace");return}if(t>=o.Pm&&t<=o.Wy){e.preventDefault(),n("keypad",{digit:t-o.Pm});return}if(t>=o.hr&&t<=o.C){e.preventDefault(),n("keypad",{digit:t-o.hr});return}},d=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),o=t.locked,c=t.no_passcode,s=t.emagged,d=t.user_entered_code;return(0,r.jsx)(i.wn,{fill:!0,className:"SecureStorage",onKeyDown:function(e){return u(e)},children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:7.3,children:(0,r.jsx)(i.az,{className:(0,l.Ly)(["SecureStorage__displayBox","SecureStorage__displayBox--"+(c?"":o?"bad":"good")]),height:"100%",children:s?"ERROR":d})}),(0,r.jsx)(i.BJ.Item,{align:"center",children:(0,r.jsx)(i.XI,{collapsing:!0,children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map(function(e){return(0,r.jsx)(i.XI.Row,{children:e.map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(f,{number:e})},e)})},e[0])})})})]})})},f=function(e){var n=(0,a.Oc)(),t=n.act;n.data;var o=e.number;return(0,r.jsx)(i.$n,{bold:!0,fluid:!0,textAlign:"center",fontSize:"55px",lineHeight:1.25,width:"80px",className:(0,l.Ly)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+o]),onClick:function(){return t("keypad",{digit:o})},children:o})}},8589:function(e,n,t){"use strict";t.r(n),t.d(n,{SecurityRecords:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=n},r=function(e,n){return e<=n},i=e.split(" "),o=[],l=!0,a=!1,c=void 0;try{for(var s,u=i[Symbol.iterator]();!(l=(s=u.next()).done);l=!0){var d=function(){var e=s.value.split(":");if(0===e.length)return"continue";if(1===e.length)return o.push(function(n){return(n.name+" ("+n.variant+")").toLocaleLowerCase().includes(e[0].toLocaleLowerCase())}),"continue";if(e.length>2)return{v:function(e){return!1}};var i=void 0,l=n;if("-"===e[1][e[1].length-1]?(l=r,i=Number(e[1].substring(0,e[1].length-1))):"+"===e[1][e[1].length-1]?(l=t,i=Number(e[1].substring(0,e[1].length-1))):i=Number(e[1]),isNaN(i))return{v:function(e){return!1}};switch(e[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":o.push(function(e){return l(e.lifespan,i)});break;case"e":case"end":case"endurance":o.push(function(e){return l(e.endurance,i)});break;case"m":case"mat":case"maturation":o.push(function(e){return l(e.maturation,i)});break;case"pr":case"prod":case"production":o.push(function(e){return l(e.production,i)});break;case"y":case"yield":o.push(function(e){return l(e.yield,i)});break;case"po":case"pot":case"potency":o.push(function(e){return l(e.potency,i)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":o.push(function(e){return l(e.amount,i)});break;default:return{v:function(e){return!1}}}}();if("object"==(d&&"undefined"!=typeof Symbol&&d.constructor===Symbol?"symbol":typeof d))return d.v}}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return function(e){var n=!0,t=!1,r=void 0;try{for(var i,l=o[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)if(!(0,i.value)(e))return!1}catch(e){t=!0,r=e}finally{try{n||null==l.return||l.return()}finally{if(t)throw r}}return!0}},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=(0,i.useContext)(d),s=c.searchTextState,f=c.vendAmountState,m=c.sortIdState,x=c.sortOrderState,g=u(s,2),j=g[0];g[1];var b=u(f,2),y=b[0];b[1];var v=u(m,2),w=v[0];v[1];var k=u(x,2),_=k[0];k[1];var C=a.icons,I=a.seeds;return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(o.XI,{className:"SeedExtractor__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(p,{id:"name",children:"Name"}),(0,r.jsx)(p,{id:"lifespan",children:"Lifespan"}),(0,r.jsx)(p,{id:"endurance",children:"Endurance"}),(0,r.jsx)(p,{id:"maturation",children:"Maturation"}),(0,r.jsx)(p,{id:"production",children:"Production"}),(0,r.jsx)(p,{id:"yield",children:"Yield"}),(0,r.jsx)(p,{id:"potency",children:"Potency"}),(0,r.jsx)(p,{id:"amount",children:"Stock"})]}),0===I.length?"No seeds present.":I.filter(h(j)).sort(function(e,n){var t=_?1:-1;return"number"==typeof e[w]?(e[w]-n[w])*t:e[w].localeCompare(n[w])*t}).map(function(e){return(0,r.jsxs)(o.XI.Row,{onClick:function(){return t("vend",{seed_id:e.id,seed_variant:e.variant,vend_amount:y})},children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(C[e.image]),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),e.name]}),(0,r.jsx)(o.XI.Cell,{children:e.lifespan}),(0,r.jsx)(o.XI.Cell,{children:e.endurance}),(0,r.jsx)(o.XI.Cell,{children:e.maturation}),(0,r.jsx)(o.XI.Cell,{children:e.production}),(0,r.jsx)(o.XI.Cell,{children:e.yield}),(0,r.jsx)(o.XI.Cell,{children:e.potency}),(0,r.jsx)(o.XI.Cell,{children:e.amount})]},e.id)})]})})})},p=function(e){var n=(0,i.useContext)(d),t=n.sortIdState,l=n.sortOrderState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1],p=e.id,x=e.children;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:c!==p&&"transparent",fluid:!0,onClick:function(){c===p?m(!h):(s(p),m(!0))},children:[x,c===p&&(0,r.jsx)(o.In,{name:h?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e){var n=(0,i.useContext)(d),t=n.searchTextState,l=n.vendAmountState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1];return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{placeholder:"Search by name, variant, potency:70+, production:3-, ...",fluid:!0,onChange:function(e){return s(e)},value:c})}),(0,r.jsxs)(o.BJ.Item,{children:["Vend amount:",(0,r.jsx)(o.pd,{placeholder:"1",onChange:function(e){return m(Number(e)>=1?Number(e):1)},value:"".concat(h)})]})]})}},631:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:350,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:a.status?a.status:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Missing"})}),!!a.shuttle&&(!!a.docking_ports_len&&(0,r.jsx)(i.Ki.Item,{label:"Send to ",children:a.docking_ports.map(function(e){return(0,r.jsx)(i.$n,{icon:"chevron-right",content:e.name,onClick:function(){return t("move",{move:e.id})}},e.name)})})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Locked"})}),!!a.admin_controlled&&(0,r.jsx)(i.Ki.Item,{label:"Authorization",children:(0,r.jsx)(i.$n,{icon:"exclamation-circle",content:"Request Authorization",disabled:!a.status,onClick:function(){return t("request")}})})]}))]})})})})}},5060:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleManipulator:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)();return 0===(n.act,n.data).active?(0,r.jsx)(s,{}):(0,r.jsx)(u,{})},s=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.singularities;return(0,r.jsx)(a.p8,{width:450,height:185,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Detected Singularities",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Refresh",onClick:function(){return t("refresh")}}),children:(0,r.jsx)(i.XI,{children:(void 0===c?[]:c).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.singularity_id+". "+e.area_name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,width:"120px",children:(0,r.jsx)(i.z2,{value:e.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(e.stage)})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.$n,{content:"Details",onClick:function(){return t("view",{view:e.singularity_id})}})})]},e.singularity_id)})})})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.active;var s=c.singulo_stage,u=c.singulo_potential_stage,d=c.singulo_energy,f=c.singulo_high,h=c.singulo_low,m=c.generators;return(0,r.jsx)(a.p8,{width:550,height:185,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Stage",children:(0,r.jsx)(i.z2,{value:s,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(s)})}),(0,r.jsx)(i.Ki.Item,{label:"Potential Stage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:6,ranges:{good:[1,s+.5],average:[s+.5,s+1.5],bad:[s+1.5,s+2]},children:(0,o.Mg)(u)})}),(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsx)(i.z2,{value:d,minValue:h,maxValue:f,ranges:{good:[.67*f+.33*h,f],average:[.33*f+.67*h,.67*f+.33*h],bad:[h,.33*f+.67*h]},children:(0,o.Mg)(d)+"MJ"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return t("back")}}),children:(0,r.jsx)(i.Ki,{children:(void 0===m?[]:m).map(function(e){return(0,r.jsx)(i.Ki.Item,{label:"Remaining Charge",children:(0,r.jsx)(i.z2,{value:e.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.Mg)(e.charge)})},e.gen_index)})})})})]})})})}},1495:function(e,n,t){"use strict";t.r(n),t.d(n,{Sleeper:()=>f});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,1/0]},d=["bad","average","average","good","average","average","bad"],f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).hasOccupant?(0,r.jsx)(h,{}):(0,r.jsx)(j,{});return(0,r.jsx)(a.p8,{width:550,height:760,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:t}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(x,{})})]})})})},h=function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(p,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.occupant,u=a.auto_eject_dead;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Auto-eject if dead:\xa0"}),(0,r.jsx)(i.$n,{icon:u?"toggle-on":"toggle-off",selected:u,content:u?"On":"Off",onClick:function(){return t("auto_eject_dead_"+(u?"off":"on"))}}),(0,r.jsx)(i.$n,{icon:"user-slash",content:"Eject",onClick:function(){return t("ejectify")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:s.maxHealth,value:s.health,ranges:{good:[.5*s.maxHealth,1/0],average:[0,.5*s.maxHealth],bad:[-1/0,0]},children:(0,o.LI)(s.health,0)})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[s.stat][0],children:c[s.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.maxTemp,value:s.bodyTemperature,color:d[s.temperatureSuitability+3],children:[(0,o.LI)(s.btCelsius,0),"\xb0C, ",(0,o.LI)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.bloodMax,value:s.bloodLevel,ranges:{bad:[-1/0,.6*s.bloodMax],average:[.6*s.bloodMax,.9*s.bloodMax],good:[.9*s.bloodMax,1/0]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})]})]})})},p=function(e){var n=(0,l.Oc)().data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant Damage",children:(0,r.jsx)(i.Ki,{children:s.map(function(e,t){var l=n[e[1]],a="number"==typeof l?l:0;return(0,r.jsx)(i.Ki.Item,{label:e[0],children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:a,ranges:u,children:(0,o.LI)(a,0)},t)},t)})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.hasOccupant,c=o.isBeakerLoaded,s=o.beakerMaxSpace,u=o.beakerFreeSpace,d=o.dialysis&&u>0;return(0,r.jsx)(i.wn,{title:"Dialysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!c||u<=0||!a,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return t("togglefilter")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"eject",content:"Eject",onClick:function(){return t("removebeaker")}})]}),children:c?(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Space",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:u,ranges:{good:[.5*s,1/0],average:[.25*s,.5*s],bad:[-1/0,.25*s]},children:[u,"u"]})})}):(0,r.jsx)(i.az,{color:"label",children:"No beaker loaded."})})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.occupant,c=o.chemicals,s=o.maxchem,u=o.amounts;return(0,r.jsx)(i.wn,{title:"Occupant Chemicals",children:c.map(function(e,n){var o,l="";return e.overdosing?(l="bad",o=(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(l="average",o=(0,r.jsxs)(i.az,{color:"average",children:[(0,r.jsx)(i.In,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsx)(i.wn,{title:e.title,buttons:o,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:e.occ_amount,color:l,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),u.map(function(n,o){return(0,r.jsx)(i.$n,{disabled:!e.injectable||e.occ_amount+n>s||2===a.stat,icon:"syringe",content:"Inject ".concat(n,"u"),mb:"0",height:"19px",onClick:function(){return t("chemical",{chemid:e.id,amount:n})}},o)})]})})},n)})})},j=function(e){return(0,r.jsx)(i.wn,{fill:!0,textAlign:"center",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},6526:function(e,n,t){"use strict";t.r(n),t.d(n,{SlotMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return null===c.money?(0,r.jsx)(l.p8,{width:350,height:90,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:"Could not scan your card or could not find account!"}),(0,r.jsx)(i.az,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===c.plays?c.plays+" player has tried their luck today!":c.plays+" players have tried their luck today!",(0,r.jsx)(l.p8,{width:300,height:151,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{lineHeight:2,children:n}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Credits Remaining",children:(0,r.jsx)(i.zv,{value:c.money})}),(0,r.jsx)(i.Ki.Item,{label:"10 credits to spin",children:(0,r.jsx)(i.$n,{icon:"coins",disabled:c.working,content:c.working?"Spinning...":"Spin",onClick:function(){return a("spin")}})})]}),(0,r.jsx)(i.az,{bold:!0,lineHeight:2,color:c.resultlvl,children:c.result})]})})}))}},1645:function(e,n,t){"use strict";t.r(n),t.d(n,{Smartfridge:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.secure,s=a.can_dry,u=a.drying,d=a.contents;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(i.IC,{children:"Secure Access: Please have your identification ready."}),(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s?"Drying rack":"Contents",buttons:!!s&&(0,r.jsx)(i.$n,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return t("drying")}}),children:[!d&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"cookie-bite",size:5,color:"brown"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No products loaded."]})}),!!d&&d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:"55%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,r.jsxs)(i.BJ.Item,{width:13,children:[(0,r.jsx)(i.$n,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return t("vend",{index:e.vend,amount:1})}}),(0,r.jsx)(i.Q7,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(n){return t("vend",{index:e.vend,amount:n})}}),(0,r.jsx)(i.$n,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){return t("vend",{index:e.vend,amount:e.quantity})}})]})]},e)})]})]})})})}},1399:function(e,n,t){"use strict";t.r(n),t.d(n,{Smes:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.capacityPercent,u=(c.capacity,c.charge),d=c.inputAttempt,f=c.inputting,h=c.inputLevel,m=c.inputLevelMax,p=c.inputAvailable,x=c.outputPowernet,g=c.outputAttempt,j=c.outputting,b=c.outputLevel,y=c.outputLevelMax,v=c.outputUsed,w=s>=100&&"good"||f&&"average"||"bad";return(0,r.jsx)(a.p8,{width:340,height:360,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stored Energy",children:(0,r.jsx)(i.z2,{value:.01*s,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,r.jsx)(i.wn,{title:"Input",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Charge Mode",buttons:(0,r.jsx)(i.$n,{icon:d?"sync-alt":"times",selected:d,onClick:function(){return t("tryinput")},children:d?"Auto":"Off"}),children:(0,r.jsx)(i.az,{color:w,children:s>=100&&"Fully Charged"||f&&"Charging"||"Not Charging"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Input",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===h,onClick:function(){return t("input",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===h,onClick:function(){return t("input",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:h/1e3,fillValue:p/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("input",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:h===m,onClick:function(){return t("input",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:h===m,onClick:function(){return t("input",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Available",children:(0,o.d5)(p)})]})}),(0,r.jsx)(i.wn,{fill:!0,title:"Output",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Output Mode",buttons:(0,r.jsx)(i.$n,{icon:g?"power-off":"times",selected:g,onClick:function(){return t("tryoutput")},children:g?"On":"Off"}),children:(0,r.jsx)(i.az,{color:j&&"good"||u>0&&"average"||"bad",children:x?j?"Sending":u>0?"Not Sending":"No Charge":"Not Connected"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Output",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===b,onClick:function(){return t("output",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===b,onClick:function(){return t("output",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:b/1e3,minValue:0,maxValue:y/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("output",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:b===y,onClick:function(){return t("output",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:b===y,onClick:function(){return t("output",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Outputting",children:(0,o.d5)(v)})]})})]})})})}},1343:function(e,n,t){"use strict";t.r(n),t.d(n,{SolarControl:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.generated,u=c.generated_ratio,d=c.tracking_state,f=c.tracking_rate,h=c.connected_panels,m=c.connected_tracker,p=c.cdir,x=c.direction,g=c.rotating_direction;return(0,r.jsx)(a.p8,{width:490,height:277,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Scan for new hardware",onClick:function(){return t("refresh")}}),children:(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Solar tracker",color:m?"good":"bad",children:m?"OK":"N/A"}),(0,r.jsx)(i.Ki.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,r.jsx)(l.xA.Column,{size:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power output",children:(0,r.jsx)(i.z2,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:s+" W"})}),(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[p,"\xb0 (",x,")"]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[2===d&&(0,r.jsx)(i.az,{children:" Automated "}),1===d&&(0,r.jsxs)(i.az,{children:[" ",f,"\xb0/h (",g,")"," "]}),0===d&&(0,r.jsx)(i.az,{children:" Tracker offline "})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[2!==d&&(0,r.jsx)(i.Q7,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onChange:function(e){return t("cdir",{cdir:e})}}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker status",children:[(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:0===d,onClick:function(){return t("track",{track:0})}}),(0,r.jsx)(i.$n,{icon:"clock-o",content:"Timed",selected:1===d,onClick:function(){return t("track",{track:1})}}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:2===d,disabled:!m,onClick:function(){return t("track",{track:2})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[1===d&&(0,r.jsx)(i.Q7,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:f,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onChange:function(e){return t("tdir",{tdir:e})}}),0===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Tracker offline "}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},4263:function(e,n,t){"use strict";t.r(n),t.d(n,{SpawnersMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.spawners||[];return(0,r.jsx)(l.p8,{width:700,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{children:a.map(function(e){return(0,r.jsxs)(i.wn,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return t("jump",{ID:e.uids})}}),(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return t("spawn",{ID:e.uids})}})]}),children:[(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)})})})})}},8729:function(e,n,t){"use strict";t.r(n),t.d(n,{SpecMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return(0,r.jsx)(l.p8,{width:1100,height:600,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("hemomancer")}}),children:[(0,r.jsx)("h3",{children:"Focuses on blood magic and the manipulation of blood around you."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Vampiric claws"}),": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood Barrier"}),": Unlocked at 250 blood, allows you to select two turfs and create a wall between them."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood tendrils"}),": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Sanguine pool"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Predator senses"}),": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood eruption"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"The blood bringers rite"}),": 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."]})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("umbrae")}}),children:[(0,r.jsx)("h3",{children:"Focuses on darkness, stealth ambushing and mobility."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Cloak of darkness"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow anchor"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow snare"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Dark passage"}),": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Extinguish"}),": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms."]}),(0,r.jsx)("b",{children:"Shadow boxing"}),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Eternal darkness"}),": 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."]}),(0,r.jsx)("p",{children:"In addition, you also gain permanent X-ray vision."})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("gargantua")}}),children:[(0,r.jsx)("h3",{children:"Focuses on tenacity and melee damage."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rejuvenate"}),": Will heal you at an increased rate based on how much damage you have taken."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell"}),": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Seismic stomp"}),": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood rush"}),": Unlocked at 250 blood, gives you a short speed boost when cast."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell II"}),": Unlocked at 400 blood, increases all melee damage by 10."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Overwhelming force"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Demonic grasp"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Charge"}),": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Desecrated Duel"}),": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages."]})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("dantalion")}}),children:[(0,r.jsx)("h3",{children:"Focuses on thralling and illusions."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Enthrall"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall cap"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall commune"}),": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Subspace swap"}),": Unlocked at 250 blood, allows you to swap positions with a target."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Pacify"}),": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Decoy"}),": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rally thralls"}),": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood bond"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Mass Hysteria"}),": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals."]})]})})}},9469:function(e,n,t){"use strict";t.r(n),t.d(n,{StackCraft:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:e*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:e})}}))}()}catch(e){u=!0,d=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw d}}return -1===l.indexOf(i)&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:i*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:i})}})),(0,r.jsx)(r.Fragment,{children:c.map(function(e){return e})})},x=function(e){return Object.entries(e.recipes).map(function(e){var n=u(e,2),t=n[0],i=n[1];return m(i)?(0,r.jsx)(o.Nt,{title:t,child_mt:0,childStyles:{padding:"0.5em",backgroundColor:"rgba(62, 97, 137, 0.15)",border:"1px solid rgba(255, 255, 255, 0.1)",borderTop:"none",borderRadius:"0 0 0.33em 0.33em"},children:(0,r.jsx)(o.az,{p:1,pb:.25,children:(0,r.jsx)(x,{recipes:i})})},t):(0,r.jsx)(g,{title:t,recipe:i},t)})},g=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.amount,l=e.title,c=e.recipe,s=c.result_amount,u=c.required_amount,d=c.max_result_amount,f=c.uid,h=c.icon,m=c.icon_state,x=c.image,g="".concat(s>1?"".concat(s,"x "):"").concat(l),j="".concat(u," sheet").concat(u>1?"s":""),b=c.required_amount>i?0:Math.floor(i/c.required_amount);return(0,r.jsx)(o.c_,{fluid:!0,base64:x,dmIcon:h,dmIconState:m,imageSize:32,disabled:!b,tooltip:j,buttons:d>1&&b>1&&(0,r.jsx)(p,{recipe:c,max_possible_multiplier:b}),onClick:function(){return t("make",{recipe_uid:f,multiplier:1})},children:g})}},5592:function(e,n,t){"use strict";t.r(n),t.d(n,{StationAlertConsole:()=>a,StationAlertConsoleContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){return(0,r.jsx)(l.p8,{width:325,height:500,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().data.alarms||[],t=n.Fire||[],l=n.Atmosphere||[],a=n.Power||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Fire Alarms",children:(0,r.jsxs)("ul",{children:[0===t.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),t.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Atmospherics Alarms",children:(0,r.jsxs)("ul",{children:[0===l.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),l.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Power Alarms",children:(0,r.jsxs)("ul",{children:[0===a.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),a.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})})]})}},5651:function(e,n,t){"use strict";t.r(n),t.d(n,{StationTraitsPanel:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:f.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n,{color:"red",icon:"times",onClick:function(){t("setup_future_traits",{station_traits:(0,i.pb)((0,i.Tj)(f,function(e){return e.path}),function(n){return n!==e.path})})},children:"Delete"})})]})},e.path)})}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No station traits will run next round."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){return t("clear_future_traits")},children:"Run Station Traits Normally"})]}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No future station traits are planned."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){return t("setup_future_traits",{station_traits:[]})},children:"Prevent station traits from running next round"})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data;return i.current_traits.length>0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:i.current_traits.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n.Confirm,{content:"Revert",color:"red",disabled:i.too_late_to_revert||!e.can_revert,tooltip:!e.can_revert&&"This trait is not revertable."||i.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){return t("revert",{ref:e.ref})}})})]})},e.ref)})}):(0,r.jsx)(l.az,{textAlign:"center",children:"There are no active station traits."})},m=function(e){var n,t=u((0,o.useState)(1),2),i=t[0],a=t[1];switch(i){case 0:n=(0,r.jsx)(f,{});break;case 1:n=(0,r.jsx)(h,{});break;default:throw Error("Unhandled case: ".concat(i))}return(0,r.jsx)(c.p8,{title:"Modify Station Traits",height:350,width:350,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.tU,{children:[(0,r.jsx)(l.tU.Tab,{icon:"eye",selected:1===i,onClick:function(){return a(1)},children:"View"}),(0,r.jsx)(l.tU.Tab,{icon:"edit",selected:0===i,onClick:function(){return a(0)},children:"Edit"})]})}),(0,r.jsxs)(l.BJ.Item,{m:0,children:[(0,r.jsx)(l.cG,{}),n]})]})})})}},5724:function(e,n,t){"use strict";t.r(n),t.d(n,{StripMenu:()=>x});var r=t(8138),i=t(8587),o=t(7790),l=t(8595),a=t(2864),c=t(3384),s=function(e){return 0===e?5:9},u="64px",d=function(e){return"".concat(e[0],"/").concat(e[1])},f=function(e){var n=e.align,t=e.children;return(0,r.jsx)(o.az,{style:{position:"absolute",left:"left"===n?"6px":"48px",textAlign:n,textShadow:"2px 2px 2px #000",top:"2px"},children:t})},h={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},m={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,4]),image:"inventory-pda.png"}},p={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,8]),image:"inventory-pda.png"}},x=function(e){var n=(0,a.Oc)(),t=n.act,f=n.data,x=new Map;if(0===f.show_mode){var g=!0,j=!1,b=void 0;try{for(var y,v=Object.keys(f.items)[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var w=y.value;x.set(m[w].gridSpot,w)}}catch(e){j=!0,b=e}finally{try{g||null==v.return||v.return()}finally{if(j)throw b}}}else{var k=!0,_=!1,C=void 0;try{for(var I,S=Object.keys(f.items)[Symbol.iterator]();!(k=(I=S.next()).done);k=!0){var O=I.value;x.set(p[O].gridSpot,O)}}catch(e){_=!0,C=e}finally{try{k||null==S.return||S.return()}finally{if(_)throw C}}}return 0===x.size?(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsx)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:"No slots"})})})}):(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,i.y1)(0,5).map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,i.y1)(0,s(f.show_mode)).map(function(n){var i,a,c,s=d([e,n]),p=x.get(s);if(!p)return(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u}},s);var g=f.items[p],j=m[p];return null===g?c=j.displayName:"name"in g?(a=(0,r.jsx)(o._V,{src:"data:image/jpeg;base64,".concat(g.icon),height:"100%",width:"100%",style:{imageRendering:"pixelated",verticalAlign:"middle"}}),c=g.name):"obscured"in g&&(a=(0,r.jsx)(o.In,{name:1===g.obscured?"ban":"eye-slash",size:3,ml:0,mt:2.5,color:"white",style:{textAlign:"center",height:"100%",width:"100%"}}),c="obscured ".concat(j.displayName)),null!==g&&"alternates"in g&&null!==g.alternates&&(i=g.alternates),(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u},children:(0,r.jsxs)(o.az,{style:{position:"relative",width:"100%",height:"100%"},children:[(0,r.jsxs)(o.$n,{onClick:function(){t("use",{key:p})},fluid:!0,color:(null==g?void 0:g.interacting)?"average":null,tooltip:c,style:{position:"relative",width:"100%",height:"100%",padding:0,backgroundColor:(null==g?void 0:g.cantstrip)?"transparent":"none"},children:[j.image&&(0,r.jsx)(o._V,{src:(0,l.l)(j.image),opacity:.7,style:{position:"absolute",width:"32px",height:"32px",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%) scale(2)"}}),(0,r.jsx)(o.az,{style:{position:"relative"},children:a}),j.additionalComponent]}),(0,r.jsx)(o.BJ,{direction:"row-reverse",children:void 0!==i&&i.map(function(e,n){var i=1.8*n;return(0,r.jsx)(o.BJ.Item,{width:"100%",children:(0,r.jsx)(o.$n,{onClick:function(){t("alt",{key:p,action_key:e})},tooltip:h[e].text,width:"1.8em",style:{background:"rgba(0, 0, 0, 0.6)",position:"absolute",bottom:0,right:"".concat(i,"em"),zIndex:2+n},children:(0,r.jsx)(o.In,{name:h[e].icon})})},n)})})]})},s)})})},e)})})})})}},2975:function(e,n,t){"use strict";t.r(n),t.d(n,{SuitStorage:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.uv;return(0,r.jsx)(l.p8,{width:400,height:260,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!n&&(0,r.jsx)(i.Rr,{backgroundColor:"black",opacity:.85,children:(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,r.jsx)(i.In,{name:"spinner",spin:1,size:4,mb:4}),(0,r.jsx)("br",{}),"Disinfection of contents in progress..."]})})}),(0,r.jsx)(c,{}),(0,r.jsx)(u,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.helmet,c=l.suit,u=l.magboots,d=l.mask,f=l.storage,h=l.open,m=l.locked;return(0,r.jsx)(i.wn,{fill:!0,title:"Stored Items",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return t("cook")}}),(0,r.jsx)(i.$n,{content:m?"Unlock":"Lock",icon:m?"unlock":"lock",disabled:h,onClick:function(){return t("toggle_lock")}})]}),children:h&&!m?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(s,{object:a,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,r.jsx)(s,{object:c,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,r.jsx)(s,{object:u,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,r.jsx)(s,{object:d,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,r.jsx)(s,{object:f,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:m?"lock":"exclamation-circle",size:"5",mb:3}),(0,r.jsx)("br",{}),m?"The unit is locked.":"The unit is closed."]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.object,a=e.label,c=e.missingText,s=e.eject;return(0,r.jsx)(i.Ki.Item,{label:a,children:(0,r.jsx)(i.az,{my:.5,children:l?(0,r.jsx)(i.$n,{my:-1,icon:"eject",content:l,onClick:function(){return t(s)}}):(0,r.jsxs)(i.az,{color:"silver",bold:!0,children:["No ",c," found."]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.open,c=l.locked;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,content:a?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:a?"times-circle":"expand",color:a?"red":"green",disabled:c,textAlign:"center",onClick:function(){return t("toggle_open")}})})}},4835:function(e,n,t){"use strict";t.r(n),t.d(n,{SupermatterMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),k=(n=Math).max.apply(n,[1].concat(function(e){if(Array.isArray(e))return s(e)}(e=w.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:270,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Peak EER",children:(0,r.jsx)(i.z2,{value:p,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(p)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Nominal EER",children:(0,r.jsx)(i.z2,{value:m,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(m)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Gas Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:d(x),minValue:0,maxValue:d(1e4),ranges:{teal:[-1/0,d(80)],good:[d(80),d(373)],average:[d(373),d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(x)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Mole Per Tile",children:(0,r.jsx)(i.z2,{value:j,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.Mg)(j)+" mol"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:d(g),minValue:0,maxValue:d(5e4),ranges:{good:[d(1),d(300)],average:[-1/0,d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(g)+" kPa"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return u("back")}}),children:(0,r.jsx)(i.Ki,{children:w.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:k,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})]})})})}},2266:function(e,n,t){"use strict";t.r(n),t.d(n,{SyndicateComputerSimple:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{theme:"syndicate",width:400,height:400,children:(0,r.jsx)(l.p8.Content,{children:a.rows.map(function(e){return(0,r.jsxs)(i.wn,{title:e.title,buttons:(0,r.jsx)(i.$n,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return t(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,r.jsx)(i.az,{children:e.bullets.map(function(e){return(0,r.jsx)(i.az,{children:e},e)})})]},e.title)})})})}},8073:function(e,n,t){"use strict";t.r(n),t.d(n,{TEG:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return c.error?(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{title:"Error",children:[c.error,(0,r.jsx)(i.$n,{icon:"circle",content:"Recheck",onClick:function(){return t("check")}})]})})}):(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Cold Loop ("+c.cold_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Cold Inlet",children:[a(c.cold_inlet_temp)," K, ",a(c.cold_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Cold Outlet",children:[a(c.cold_outlet_temp)," K, ",a(c.cold_outlet_pressure)," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Hot Loop ("+c.hot_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Hot Inlet",children:[a(c.hot_inlet_temp)," K, ",a(c.hot_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Hot Outlet",children:[a(c.hot_outlet_temp)," K, ",a(c.hot_outlet_pressure)," kPa"]})]})}),(0,r.jsxs)(i.wn,{title:"Power Output",children:[a(c.output_power)," W",!!c.warning_switched&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},5808:function(e,n,t){"use strict";t.r(n),t.d(n,{TachyonArray:()=>a,TachyonArrayContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.records,u=void 0===s?[]:s,d=a.explosion_target,f=a.toxins_tech,h=a.printing;return(0,r.jsx)(l.p8,{width:500,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Shift's Target",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Current Toxins Level",children:f}),(0,r.jsxs)(i.Ki.Item,{label:"Administration",children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return t("print_logs")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return t("delete_logs")}})]})]})}),u.length?(0,r.jsx)(c,{}):(0,r.jsx)(i.IC,{children:"No Records"})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.wn,{title:"Logged Explosions",children:(0,r.jsx)(i.so,{children:(0,r.jsx)(i.so.Item,{children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Time"}),(0,r.jsx)(i.XI.Cell,{children:"Epicenter"}),(0,r.jsx)(i.XI.Cell,{children:"Actual Size"}),(0,r.jsx)(i.XI.Cell,{children:"Theoretical Size"})]}),(void 0===l?[]:l).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.logged_time}),(0,r.jsx)(i.XI.Cell,{children:e.epicenter}),(0,r.jsx)(i.XI.Cell,{children:e.actual_size_message}),(0,r.jsx)(i.XI.Cell,{children:e.theoretical_size_message}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return t("delete_record",{index:e.index})}})})]},e.index)})]})})})})}},5125:function(e,n,t){"use strict";t.r(n),t.d(n,{Tank:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.has_mask?(0,r.jsx)(i.Ki.Item,{label:"Mask",children:(0,r.jsx)(i.$n,{fluid:!0,width:"76%",icon:c.connected?"check":"times",content:c.connected?"Internals On":"Internals Off",selected:c.connected,onClick:function(){return a("internals")}})}):(0,r.jsx)(i.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,r.jsx)(l.p8,{width:325,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Tank Pressure",children:(0,r.jsx)(i.z2,{value:c.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:c.tankPressure+" kPa"})}),(0,r.jsxs)(i.Ki.Item,{label:"Release Pressure",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.ReleasePressure===c.minReleasePressure,tooltip:"Min",onClick:function(){return a("pressure",{pressure:"min"})}}),(0,r.jsx)(i.Q7,{animated:!0,value:parseFloat(c.releasePressure),width:"65px",unit:"kPa",minValue:c.minReleasePressure,maxValue:c.maxReleasePressure,onChange:function(e){return a("pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.ReleasePressure===c.maxReleasePressure,tooltip:"Max",onClick:function(){return a("pressure",{pressure:"max"})}}),(0,r.jsx)(i.$n,{icon:"undo",content:"",disabled:c.ReleasePressure===c.defaultReleasePressure,tooltip:"Reset",onClick:function(){return a("pressure",{pressure:"reset"})}})]}),n]})})})})}},7112:function(e,n,t){"use strict";t.r(n),t.d(n,{TankDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.o_tanks,s=a.p_tanks;return(0,r.jsx)(l.p8,{width:250,height:105,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:0===c,icon:"arrow-circle-down",onClick:function(){return t("oxygen")}})}),(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return t("plasma")}})})]})})})}},3283:function(e,n,t){"use strict";t.r(n),t.d(n,{TcommsCore:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.linked,d=a.active,f=a.network_id;return(0,r.jsx)(l.p8,{width:600,height:292,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Relay Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine Power",children:(0,r.jsx)(i.$n,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Network ID",children:(0,r.jsx)(i.$n,{content:f||"Unset",selected:f,icon:"server",onClick:function(){return t("network_id")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link Status",children:1===u?(0,r.jsx)(i.az,{color:"green",children:"Linked"}):(0,r.jsx)(i.az,{color:"red",children:"Unlinked"})})]})}),1===u?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.linked_core_id,c=l.linked_core_addr,s=l.hidden_link;return(0,r.jsx)(i.wn,{title:"Link Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Linked Core ID",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Linked Core Address",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Hidden Link",children:(0,r.jsx)(i.$n,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){return t("toggle_hidden_link")}})}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.cores;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Sector"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:e.sector}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},5605:function(e,n,t){"use strict";t.r(n),t.d(n,{Teleporter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.targetsTeleport?a.targetsTeleport:{},s=a.calibrated,u=a.calibrating,d=a.powerstation,f=a.regime,h=a.teleporterhub,m=a.target,p=a.locked,x=a.adv_beacon_allowed,g=a.advanced_beacon_locking;return(0,r.jsx)(l.p8,{width:350,height:325,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(!d||!h)&&(0,r.jsxs)(i.wn,{fill:!0,title:"Error",children:[h,!d&&(0,r.jsx)(i.az,{color:"bad",children:" Powerstation not linked "}),d&&!h&&(0,r.jsx)(i.az,{color:"bad",children:" Teleporter hub not linked "})]}),d&&h&&(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Status",buttons:(0,r.jsx)(r.Fragment,{children:!!x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xa0"}),(0,r.jsx)(i.$n,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"Enabled":"Disabled",onClick:function(){return t("advanced_beacon_locking",{on:+!g})}})]})}),children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,r.jsxs)(i.BJ.Item,{children:[0===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),1===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),2===f&&(0,r.jsx)(i.az,{children:m})]})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Regime:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:1===f?"good":null,onClick:function(){return t("setregime",{regime:1})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:0===f?"good":null,onClick:function(){return t("setregime",{regime:0})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:2===f?"good":null,disabled:!p,onClick:function(){return t("setregime",{regime:2})}})})]}),(0,r.jsxs)(i.BJ,{label:"Calibration",mt:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,r.jsxs)(i.BJ.Item,{children:["None"!==m&&(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:15.8,textAlign:"center",mt:.5,children:u&&(0,r.jsx)(i.az,{color:"average",children:"In Progress"})||s&&(0,r.jsx)(i.az,{color:"good",children:"Optimal"})||(0,r.jsx)(i.az,{color:"bad",children:"Sub-Optimal"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{icon:"sync-alt",tooltip:"Calibrates the hub. \\ Accidents may occur when the \\ calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!s||!!u,onClick:function(){return t("calibrate")}})})]}),"None"===m&&(0,r.jsx)(i.az,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(p&&d&&h&&2===f)&&(0,r.jsx)(i.wn,{title:"GPS",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return t("load")}}),(0,r.jsx)(i.$n,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return t("eject")}})]})})]})})})})}},8336:function(e,n,t){"use strict";t.r(n),t.d(n,{TelescienceConsole:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)||(0,r.jsx)("ul",{children:m.map(function(e){return(0,r.jsx)("li",{children:e},e)})})]})}),(0,r.jsx)(o.wn,{title:"Telepad Status",children:1===f?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Bearing",children:(0,r.jsxs)(o.az,{inline:!0,position:"relative",children:[(0,r.jsx)(o.Q7,{unit:"\xb0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:v,value:j,onChange:function(e){C(e),s("setbear",{bear:e})}}),(0,r.jsx)(o.In,{ml:1,size:1,name:"arrow-up",rotation:_})]})}),(0,r.jsx)(o.Ki.Item,{label:"Current Elevation",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:v,value:b,onChange:function(e){return s("setelev",{elev:e})}})}),(0,r.jsx)(o.Ki.Item,{label:"Power Level",children:p.map(function(e,n){return(0,r.jsx)(o.$n,{content:e,selected:g===e,disabled:n>=x-1||v,onClick:function(){return s("setpwr",{pwr:n+1})}},e)})}),(0,r.jsx)(o.Ki.Item,{label:"Target Sector",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:w,value:y,disabled:v,onChange:function(e){return s("setz",{newz:e})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Telepad Actions",children:[(0,r.jsx)(o.$n,{content:"Send",disabled:v,onClick:function(){return s("pad_send")}}),(0,r.jsx)(o.$n,{content:"Receive",disabled:v,onClick:function(){return s("pad_receive")}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Crystal Maintenance",children:[(0,r.jsx)(o.$n,{content:"Recalibrate Crystals",disabled:v,onClick:function(){return s("recal_crystals")}}),(0,r.jsx)(o.$n,{content:"Eject Crystals",disabled:v,onClick:function(){return s("eject_crystals")}})]})]}):(0,r.jsx)(r.Fragment,{children:"No pad linked to console. Please use a multitool to link a pad."})}),(0,r.jsx)(o.wn,{title:"GPS Actions",children:1===h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Eject GPS",onClick:function(){return s("eject_gps")}}),(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Store Coordinates",onClick:function(){return s("store_to_gps")}})]}):(0,r.jsx)(r.Fragment,{children:"Please insert a GPS to store coordinates to it."})})]})})}},1745:function(e,n,t){"use strict";t.r(n),t.d(n,{TempGun:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,f=c.target_temperature,h=c.temperature,m=c.max_temp,p=c.min_temp;return(0,r.jsx)(a.p8,{width:250,height:121,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.Q7,{animate:!0,step:10,stepPixelSize:6,minValue:p,maxValue:m,value:f,format:function(e){return(0,o.Mg)(e,2)},width:"50px",onChange:function(e){return t("target_temperature",{target_temperature:e})}}),"\xb0C"]}),(0,r.jsx)(i.Ki.Item,{label:"Current Temperature",children:(0,r.jsxs)(i.az,{color:s(h),bold:h>500-273.15,children:[(0,r.jsx)(i.zv,{value:(0,o.LI)(h,2)}),"\xb0C"]})}),(0,r.jsx)(i.Ki.Item,{label:"Power Cost",children:(0,r.jsx)(i.az,{color:d(h),children:u(h)})})]})})})})},s=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},u=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},d=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{TextInputModal:()=>m,removeAllSkiplines:()=>h,sanitizeMultiline:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=30,O=135+(b.length>30?Math.ceil(b.length/4):0)+75*!!S+(b.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:k,width:325,height:O,children:[w&&(0,r.jsx)(u.Loader,{value:w}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){e.key!==l._.Enter||S&&e.shiftKey||m("submit",{entry:C}),(0,l.KL)(e.key)&&m("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{color:"label",children:b})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.fs,{autoFocus:!0,autoSelect:!0,fluid:!0,height:y||C.length>=30?"100%":"1.8rem",maxLength:g,onEscape:function(){return m("cancel")},onChange:function(e){e!==C&&I(y?f(e):h(e))},placeholder:"Type something...",value:C})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:C,message:"".concat(C.length,"/").concat(g||"∞")})})]})})})]})}},9449:function(e,n,t){"use strict";t.r(n),t.d(n,{ThermoMachine:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(a.p8,{width:300,height:225,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:c.temperature,format:function(e){return(0,o.Mg)(e,2)}})," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[(0,r.jsx)(i.zv,{value:c.pressure,format:function(e){return(0,o.Mg)(e,2)}})," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Controls",buttons:(0,r.jsx)(i.$n,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Setting",textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){return t("cooling")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){return t("target",{target:c.min})}}),(0,r.jsx)(i.Q7,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onChange:function(e){return t("target",{target:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){return t("target",{target:c.max})}}),(0,r.jsx)(i.$n,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){return t("target",{target:c.initial})}})]})]})})]})})}},1760:function(e,n,t){"use strict";t.r(n),t.d(n,{TransferValve:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.tank_one,s=a.tank_two,u=a.attached_device,d=a.valve;return(0,r.jsx)(l.p8,{width:460,height:285,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Valve Status",children:(0,r.jsx)(i.$n,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!s,onClick:function(){return t("toggle")}})})})}),(0,r.jsx)(i.wn,{title:"Assembly",buttons:(0,r.jsx)(i.$n,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){return t("device")}}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:u?(0,r.jsx)(i.$n,{icon:"eject",content:u,disabled:!u,onClick:function(){return t("remove_device")}}):(0,r.jsx)(i.az,{color:"average",children:"No Assembly"})})})}),(0,r.jsx)(i.wn,{title:"Attachment One",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:c?(0,r.jsx)(i.$n,{icon:"eject",content:c,disabled:!c,onClick:function(){return t("tankone")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})}),(0,r.jsx)(i.wn,{title:"Attachment Two",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:s?(0,r.jsx)(i.$n,{icon:"eject",content:s,disabled:!s,onClick:function(){return t("tanktwo")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})})]})})}},6971:function(e,n,t){"use strict";t.r(n),t.d(n,{TurbineComputer:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.compressor,s=o.compressor_broken,f=o.turbine,h=o.turbine_broken,m=o.online,p=o.throttle,x=(o.preBurnTemperature,o.bearingDamage),g=!!(l&&!s&&f&&!h);return(0,r.jsx)(c.p8,{width:400,height:415,children:(0,r.jsxs)(c.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:m?"power-off":"times",content:m?"Online":"Offline",selected:m,disabled:!g,onClick:function(){return t("toggle_power")}}),(0,r.jsx)(i.$n,{icon:"times",content:"Disconnect",onClick:function(){return t("disconnect")}})]}),children:g?(0,r.jsx)(d,{}):(0,r.jsx)(u,{})}),x>=100?(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:"Bearings Inoperable, Repair Required"})}):(0,r.jsx)(i.wn,{title:"Throttle",children:g?(0,r.jsx)(i.N6,{size:3,value:p,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,tickWhileDragging:!0,onChange:function(e,n){return t("set_throttle",{throttle:n})}}):""})]})})},u=function(e){var n=(0,a.Oc)().data,t=n.compressor,o=n.compressor_broken,l=n.turbine,c=n.turbine_broken;return n.online,(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Compressor Status",color:!t||o?"bad":"good",children:o?t?"Offline":"Missing":"Online"}),(0,r.jsx)(i.Ki.Item,{label:"Turbine Status",color:!l||c?"bad":"good",children:c?l?"Offline":"Missing":"Online"})]})},d=function(e){var n=(0,a.Oc)().data,t=n.rpm,c=n.temperature,s=n.power,u=n.bearingDamage,d=n.preBurnTemperature,f=n.postBurnTemperature,h=n.thermalEfficiency,m=n.compressionRatio,p=n.gasThroughput;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Turbine Speed",children:[(0,l.Mg)(t,2)," RPM"]}),(0,r.jsxs)(i.Ki.Item,{label:"Effective Compression Ratio",children:[(0,l.Mg)(m,2),":1"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Pre Burn Temp",children:[(0,l.Mg)(d,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Post Burn Temp",children:[(0,l.Mg)(f,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Compressor Temp",children:[(0,l.Mg)(c,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Thermal Efficiency",children:[(0,l.Mg)(100*h,2)," %"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gas Throughput",children:[(0,l.Mg)(p,2)," mol/s"]}),(0,r.jsx)(i.Ki.Item,{label:"Generated Power",children:(0,o.d5)(s)}),(0,r.jsx)(i.Ki.Item,{label:"Bearing Damage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,l.Mg)(u)+"%"})})]})}},8380:function(e,n,t){"use strict";t.r(n),t.d(n,{Uplink:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";if(e=(0,i.pb)(e,function(e){return!!e.name}),n){var t=(0,a.XZ)(n,function(e){var n="".concat(e.name,"|").concat(e.desc,"|").concat(e.cost,"tc");return e.hijack_only&&(n+="|hijack"),n});e=(0,i.pb)(e,function(e){return t(e)})}return(0,i.Ul)(e,function(e){return e.name})},v=function(e){if(b(e),""===e)return p(d[0].items);p(y(d.map(function(e){return e.items}).flat(),e))},w=f((0,o.useState)(1),2),k=w[0],_=w[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ,{vertical:!0,children:(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.wn,{title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:k,onClick:function(){return _(!k)}}),(0,r.jsx)(l.$n,{content:"Random Item",icon:"question",onClick:function(){return t("buyRandom")}}),(0,r.jsx)(l.$n,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return t("refund")}})]}),children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search Equipment",value:g,onChange:function(e){v(e)}})})})}),(0,r.jsxs)(l.BJ,{fill:!0,mt:.3,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.tU,{vertical:!0,children:d.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===g&&e.items===m,onClick:function(){p(e.items),b("")},children:e.cat},e.cat)})})})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.BJ,{vertical:!0,children:m.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:k},(0,a.jT)(e.name))},(0,a.jT)(e.name))})})})})]})]})},x=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,s=i.cart,u=i.crystals,d=i.cart_price,h=f((0,o.useState)(0),2),m=h[0],p=h[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:m,onClick:function(){return p(!m)}}),(0,r.jsx)(l.$n,{content:"Empty Cart",icon:"trash",onClick:function(){return t("empty_cart")},disabled:!s}),(0,r.jsx)(l.$n,{content:"Purchase Cart ("+d+"TC)",icon:"shopping-cart",onClick:function(){return t("purchase_cart")},disabled:!s||d>u})]}),children:(0,r.jsx)(l.BJ,{vertical:!0,children:s?s.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:m,buttons:(0,r.jsx)(y,{i:e})})},(0,a.jT)(e.name))}):(0,r.jsx)(l.az,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=i.cats,a=i.lucky_numbers;return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,r.jsx)(l.$n,{icon:"dice",content:"See more suggestions",onClick:function(){return t("shuffle_lucky_numbers")}}),children:(0,r.jsx)(l.BJ,{wrap:!0,children:a.map(function(e){return o[e.cat].items[e.item]}).filter(function(e){return null!=e}).map(function(e,n){return(0,r.jsx)(l.BJ.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",grow:!0,children:(0,r.jsx)(j,{i:e})},n)})})})})},j=function(e){var n=e.i,t=e.showDecription,i=e.buttons,o=void 0===i?(0,r.jsx)(b,{i:n}):i;return(0,r.jsx)(l.wn,{title:(0,a.jT)(n.name),buttons:o,children:(void 0===t?1:t)?(0,r.jsx)(l.az,{italic:!0,children:(0,a.jT)(n.desc)}):null})},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i,a=i.crystals;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{icon:"shopping-cart",color:1===o.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return t("add_to_cart",{item:o.obj_path})},disabled:o.cost>a}),(0,r.jsx)(l.$n,{content:"Buy ("+o.cost+"TC)"+(o.refundable?" [Refundable]":""),color:1===o.hijack_only&&"red",tooltip:1===o.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return t("buyItem",{item:o.obj_path})},disabled:o.cost>a})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i;return i.exploitable,(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.$n,{icon:"times",content:"("+o.cost*o.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return t("remove_from_cart",{item:o.obj_path})}}),(0,r.jsx)(l.$n,{icon:"minus",tooltip:0===o.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:--o.amount})},disabled:o.amount<=0}),(0,r.jsx)(l.$n.Input,{value:"".concat(o.amount),width:"45px",tooltipPosition:"bottom-end",tooltip:0===o.limit&&"Discount already redeemed!",onCommit:function(e){return t("set_cart_item_quantity",{item:o.obj_path,quantity:e})},disabled:-1!==o.limit&&o.amount>=o.limit&&o.amount<=0}),(0,r.jsx)(l.$n,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:0===o.limit&&"Discount already redeemed!",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:++o.amount})},disabled:-1!==o.limit&&o.amount>=o.limit})]})},v=function(e){var n=(0,c.Oc)(),t=n.act,s=n.data,u=s.exploitable,d=s.selected_record,h=f((0,o.useState)(""),2),m=h[0],p=h[1],x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,a.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,function(e){return r(e)})}return(0,i.Ul)(t,function(e){return e.name})}(u,m);return(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search Crew",onChange:function(e){return p(e)}}),(0,r.jsx)(l.tU,{vertical:!0,children:x&&x.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:e.name===d.name,onClick:function(){return t("view_record",{uid_gen:e.uid_gen})},children:e.name},e.uid_gen)})})]})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:d.name,children:(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Age",children:d.age}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:d.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:d.rank}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:d.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:d.species}),(0,r.jsx)(l.Ki.Item,{label:"NT Relation",children:d.nt_relation})]})}),!!d.has_photos&&d.photos.map(function(e,n){return(0,r.jsxs)(l.BJ.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,r.jsx)("img",{src:e,style:{width:"96px",marginTop:"1rem",marginBottom:"0.5rem",imageRendering:"pixelated"}}),(0,r.jsx)("br",{}),"Photo #",n+1]},n)})]})})})]})}},1638:function(e,n,t){"use strict";t.r(n),t.d(n,{Vending:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);th&&a.price>m;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.Hg,{verticalAlign:"middle",icon:s,icon_state:u,fallback:(0,r.jsx)(i.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsxs)(i.az,{color:c<=0&&"bad"||c<=a.max_amount/2&&"average"||"good",children:[c," in stock"]})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,disabled:j,icon:g,content:x,textAlign:"left",onClick:function(){return t("vend",{inum:a.inum})}})})]})},u=function(e){var n,t=(0,o.Oc)(),a=t.act,u=t.data,d=u.user,f=u.usermoney,h=u.inserted_cash,m=u.product_records,p=u.hidden_records,x=u.stock,g=(u.vend_ready,u.inserted_item_name),j=u.panel_open,b=u.speaker,y=u.locked,v=u.bypass_lock;return n=c(void 0===m?[]:m),u.extended_inventory&&(n=c(n).concat(c(void 0===p?[]:p))),n=n.filter(function(e){return!!e}),(0,r.jsx)(l.p8,{title:"Vending Machine",width:450,height:Math.min((!y||v?230:171)+32*n.length,585),children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(!y||!!v)&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Configuration",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Rename Vendor",onClick:function(){return a("rename",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Change Vendor Appearance",onClick:function(){return a("change_appearance",{})}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"User",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:!!g&&(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:g}),onClick:function(){return a("eject_item",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{disabled:!h,icon:"money-bill-wave-alt",content:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:h})," credits"]}):"Dispense Change",tooltip:h?"Dispense Change":null,textAlign:"left",onClick:function(){return a("change")}})})]}),children:d&&(0,r.jsxs)(i.az,{children:["Welcome, ",(0,r.jsx)("b",{children:d.name}),", ",(0,r.jsx)("b",{children:d.job||"Unemployed"}),"!",(0,r.jsx)("br",{}),"Your balance is ",(0,r.jsxs)("b",{children:[f," credits"]}),".",(0,r.jsx)("br",{})]})})}),!!j&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Maintenance",children:(0,r.jsx)(i.$n,{icon:b?"check":"volume-mute",selected:b,content:"Speaker",textAlign:"left",onClick:function(){return a("toggle_voice",{})}})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsx)(i.XI,{children:n.map(function(e){return(0,r.jsx)(s,{product:e,productStock:x[e.name],productIcon:e.icon,productIconState:e.icon_state},e.name)})})})})]})})})}},2144:function(e,n,t){"use strict";t.r(n),t.d(n,{VolumeMixer:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.channels;return(0,r.jsx)(a.p8,{width:350,height:Math.min(95+50*c.length,565),children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.az,{fontSize:"1.25rem",color:"label",mt:n>0&&"0.5rem",children:e.name}),(0,r.jsx)(o.az,{mt:"0.5rem",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{mr:.5,children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:0})}})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,mx:"0.5rem",children:(0,r.jsx)(o.Ap,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(n,r){return t("volume",{channel:e.num,volume:r})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:100})}})})})]})})]},e.num)})})})})}},7063:function(e,n,t){"use strict";t.r(n),t.d(n,{VotePanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.remaining,s=a.question,u=a.choices,d=a.user_vote,f=a.counts,h=a.show_counts;return(0,r.jsx)(l.p8,{width:400,height:360,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s,children:[(0,r.jsxs)(i.az,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mb:1,fluid:!0,lineHeight:3,multiLine:e,content:e+(h?" ("+(f[e]||0)+")":""),onClick:function(){return t("vote",{target:e})},selected:e===d})},e)})]})})})}},7983:function(e,n,t){"use strict";t.r(n),t.d(n,{Wires:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.wires||[],s=a.status||[],u=56+23*c.length+(status?0:15+17*s.length);return(0,r.jsx)(l.p8,{width:350,height:u,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:e.cut?"Mend":"Cut",onClick:function(){return t("cut",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:"Pulse",onClick:function(){return t("pulse",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:e.attached?"Detach":"Attach",onClick:function(){return t("attach",{wire:e.color})}})]}),children:!!e.wire&&(0,r.jsxs)("i",{children:["(",e.wire,")"]})},e.seen_color)})})})}),!!s.length&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:s.map(function(e){return(0,r.jsx)(i.az,{color:"lightgray",children:e},e)})})})]})})})}},8167:function(e,n,t){"use strict";t.r(n),t.d(n,{WizardApprenticeContract:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.used;return(0,r.jsx)(l.p8,{width:500,height:555,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,r.jsx)("p",{children:"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points."}),a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,r.jsx)(i.wn,{title:"Which school of magic is your apprentice studying?",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,r.jsx)("br",{}),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("fire")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,r.jsx)("br",{}),"They know Teleport, Blink and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("translocation")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,r.jsx)("br",{}),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("restoration")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,r.jsx)("br",{}),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, 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,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("stealth")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,r.jsx)("br",{}),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,r.jsx)("br",{}),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("honk")}})]}),(0,r.jsx)(i.Ki.Divider,{})]})})]})})}},234:function(e,n,t){"use strict";t.r(n),t.d(n,{ZLevelManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4530);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(8587),o=t(4530),l=t(7790);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&!g.includes(e.ref)&&!p.includes(e.ref),checked:p.includes(e.ref),onClick:function(){return j(e.ref)}},e.desc)})]})]})})}},7276:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosScan:()=>l});var r=t(8138),i=t(8587),o=t(7790),l=function(e){var n=e.aircontents;return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.Ki,{children:(0,i.pb)(n,function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}).map(function(e){var n,t,i,l,a;return(0,r.jsxs)(o.Ki.Item,{label:e.entry,color:(n=e.val,t=e.bad_low,i=e.poor_low,l=e.poor_high,a=e.bad_high,nl?"average":n>a?"bad":"good"),children:[e.val,e.units]},e.entry)})})})}},3013:function(e,n,t){"use strict";t.r(n),t.d(n,{BeakerContents:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.beakerLoaded,t=e.beakerContents,o=void 0===t?[]:t,l=e.buttons;return(0,r.jsx)(i.BJ,{vertical:!0,children:n?0===o.length?(0,r.jsx)(i.BJ.Item,{color:"label",children:"Beaker is empty."}):o.map(function(e,n){var t;return(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{color:"label",grow:!0,children:[(t=e.volume)+" unit"+(1===t?"":"s")," of ",e.name]},e.name),!!l&&(0,r.jsx)(i.BJ.Item,{children:l(e,n)})]},e.name)}):(0,r.jsx)(i.BJ.Item,{color:"label",children:"No beaker loaded."})})}},9226:function(e,n,t){"use strict";t.r(n),t.d(n,{BotStatus:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,c=l.noaccess,s=l.maintpanel,u=l.on,d=l.autopatrol,f=l.canhack,h=l.emagged,m=l.remote_disabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",a?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.wn,{title:"General Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){return t("power")}})}),void 0!==d&&(0,r.jsx)(i.Ki.Item,{label:"Patrol",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){return t("autopatrol")}})}),!!s&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance Panel",children:(0,r.jsx)(i.az,{color:"bad",children:"Panel Open!"})}),(0,r.jsx)(i.Ki.Item,{label:"Safety System",children:(0,r.jsx)(i.az,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Hacking",children:(0,r.jsx)(i.$n,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){return t("hack")}})}),(0,r.jsx)(i.Ki.Item,{label:"Remote Access",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:!m,content:"AI Remote Control",disabled:c,onClick:function(){return t("disableremote")}})})]})})]})}},4744:function(e,n,t){"use strict";t.r(n),t.d(n,{ComplexModal:()=>h,modalAnswer:()=>d,modalClose:()=>f,modalOpen:()=>s,modalRegisterBodyOverride:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(421).lm.department,c=["Captain","Station Commander","Head of Command","Commanding Officer","Head of Personnel","Head of Service","Crew Relations Officer","Head of Security","Security Director","Sheriff","Chief Engineer","Engineering Director","Engine Foreman","Senior Engineer","Research Director","Senior Researcher","Chief Research Officer","Chief Medical Officer","Senior Physician","Medical Director","Quartermaster","Chief Logistics Officer","Supply Director","Requisitions Foreman"],s=function(e){if(-1!==c.indexOf(e))return!0},u=function(e){return e.length>0&&(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,color:"white",children:[(0,r.jsx)(i.XI.Cell,{width:"50%",children:"Name"}),(0,r.jsx)(i.XI.Cell,{width:"35%",children:"Rank"}),(0,r.jsx)(i.XI.Cell,{width:"15%",children:"Active"})]}),e.map(function(e){var n;return(0,r.jsxs)(i.XI.Row,{color:(n=e.rank,-1!==c.indexOf(n)?"green":"orange"),bold:s(e.rank),children:[(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.name)}),(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.rank)}),(0,r.jsx)(i.XI.Cell,{children:e.active})]},e.name+e.rank)})]})},d=function(e){if((0,l.Oc)().act,e.data)n=e.data;else{var n;n=(0,l.Oc)().data}var t=n.manifest,o=t.heads,c=t.sec,s=t.eng,d=t.med,f=t.sci,h=t.ser,m=t.sup,p=t.misc;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.command,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(o)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.security,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(c)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.engineering,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.medical,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(d)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.science,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(f)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.service,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.supply,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(m)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(p)})]})}},1942:function(e,n,t){"use strict";t.r(n),t.d(n,{InputButtons:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.large_buttons,c=l.swapped_buttons,s=e.input,u=e.message,d=e.disabled,f=(0,r.jsx)(i.$n,{color:"good",textAlign:"center",bold:!!a,fluid:!!a,tooltip:!!a&&u,disabled:!!d,width:!a&&6,onClick:function(){return t("submit",{entry:s})},children:"Submit"}),h=(0,r.jsx)(i.$n,{color:"bad",textAlign:"center",bold:!!a,fluid:!!a,width:!a&&6,onClick:function(){return t("cancel")},children:"Cancel"});return(0,r.jsxs)(i.BJ,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[(0,r.jsx)(i.BJ.Item,{grow:a,children:h}),!a&&u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{color:"label",textAlign:"center",children:u})}),(0,r.jsx)(i.BJ.Item,{grow:a,children:f})]})}},1992:function(e,n,t){"use strict";t.r(n),t.d(n,{InterfaceLockNoticeBox:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.siliconUser,c=void 0===a?l.siliconUser:a,s=e.locked,u=void 0===s?l.locked:s,d=e.normallyLocked,f=void 0===d?l.normallyLocked:d,h=e.onLockStatusChange,m=void 0===h?function(){return t("lock")}:h,p=e.accessText;return c?(0,r.jsx)(i.IC,{color:c&&"grey",children:(0,r.jsxs)(i.so,{align:"center",children:[(0,r.jsx)(i.so.Item,{children:"Interface lock status:"}),(0,r.jsx)(i.so.Item,{grow:"1"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{m:"0",color:f?"red":"green",icon:f?"lock":"unlock",content:f?"Locked":"Unlocked",onClick:function(){m&&m(!u)}})})]})}):(0,r.jsxs)(i.IC,{children:["Swipe ",void 0===p?"an ID card":p," to ",u?"unlock":"lock"," this interface."]})}},9472:function(e,n,t){"use strict";t.r(n),t.d(n,{Loader:()=>l});var r=t(8138),i=t(7790),o=t(6859),l=function(e){var n=e.value;return(0,r.jsx)("div",{className:"AlertModal__Loader",children:(0,r.jsx)(i.az,{className:"AlertModal__LoaderProgress",style:{width:100*(0,o.J$)(n)+"%"}})})}},7352:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginInfo:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState;if(l)return(0,r.jsx)(i.IC,{info:!0,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:.5,children:["Logged in as: ",a.name," (",a.rank,")"]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"eject",disabled:!a.id,content:"Eject ID",color:"good",onClick:function(){return t("login_eject")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){return t("login_logout")}})]})]})})}},736:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginScreen:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState,c=l.isAI,s=l.isRobot,u=l.isAdmin;return(0,r.jsx)(i.wn,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,r.jsx)(i.so,{height:"100%",align:"center",justify:"center",children:(0,r.jsxs)(i.so.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.jsxs)(i.az,{fontSize:"1.5rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.jsxs)(i.az,{color:"label",my:"1rem",children:["ID:",(0,r.jsx)(i.$n,{icon:"id-card",content:a.id?a.id:"----------",ml:"0.5rem",onClick:function(){return t("login_insert")}})]}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",disabled:!a.id,content:"Login",onClick:function(){return t("login_login",{login_type:1})}}),!!c&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return t("login_login",{login_type:2})}}),!!s&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return t("login_login",{login_type:3})}}),!!u&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return t("login_login",{login_type:4})}})]})})})}},6696:function(e,n,t){"use strict";t.r(n),t.d(n,{Operating:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.operating,t=e.name;if(n)return(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"The ",t," is processing..."]})})})}},6888:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)().act,t=e.data,a=t.code,c=t.frequency,s=t.minFrequency,u=t.maxFrequency;return(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Frequency",children:(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:u/10,value:c/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return n("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:a,width:"80px",onChange:function(e){return n("code",{code:e})}})})]}),(0,r.jsx)(i.$n,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},4455:function(e,n,t){"use strict";t.r(n),t.d(n,{SimpleRecords:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(u,function(e){return null==e?void 0:e.Name});return n&&(t=(0,i.pb)(t,(0,a.XZ)(n,function(e){return e.Name}))),(0,i.Ul)(t,function(e){return e.Name})}(u,f);return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search records...",onChange:function(e){return h(e)}}),m.map(function(e){return(0,r.jsx)(l.az,{children:(0,r.jsx)(l.$n,{mb:.5,content:e.Name,icon:"user",onClick:function(){return t("Records",{target:e.uid})}})},e)})]})},f=function(e){(0,c.Oc)().act;var n,t=e.data.records,i=t.general,o=t.medical,a=t.security;switch(e.recordType){case"MED":n=(0,r.jsx)(l.wn,{level:2,title:"Medical Data",children:o?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Blood Type",children:o.blood_type}),(0,r.jsx)(l.Ki.Item,{label:"Minor Disabilities",children:o.mi_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.mi_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Disabilities",children:o.ma_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.ma_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Allergies",children:o.alg}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.alg_d}),(0,r.jsx)(l.Ki.Item,{label:"Current Diseases",children:o.cdi}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.cdi_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:o.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,r.jsx)(l.wn,{level:2,title:"Security Data",children:a?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Criminal Status",children:a.criminal}),(0,r.jsx)(l.Ki.Item,{label:"Minor Crimes",children:a.mi_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.mi_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Crimes",children:a.ma_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.ma_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:a.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.wn,{title:"General Data",children:i?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Name",children:i.name}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:i.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:i.species}),(0,r.jsx)(l.Ki.Item,{label:"Age",children:i.age}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:i.rank}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:i.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Physical Status",children:i.p_stat}),(0,r.jsx)(l.Ki.Item,{label:"Mental Status",children:i.m_stat})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},2264:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.temp;if(a){var c,s,u=l({},a.style,!0);return(0,r.jsx)(i.IC,(c=function(e){for(var n=1;nc});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.total_earnings,c=n.total_energy;return n.name,(0,r.jsx)(a.p8,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsxs)(i.IC,{success:!0,children:["Earned Credits : ",t?(0,o.up)(t):0]}),(0,r.jsxs)(i.IC,{success:!0,children:["Energy Sold : ",c?(0,o.QL)(c,0,"J"):"0 J"]})]})})},s=function(e){var n=(0,l.Oc)().data,t=n.max_capacity,a=n.held_power,c=n.input_total,s=n.max_grid_load;return(0,r.jsxs)(i.wn,{title:"Status",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Reserve energy",children:a?(0,o.QL)(a,0,"J"):"0 J"})}),(0,r.jsx)(i.z2,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:a/t}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Grid Saturation"})}),(0,r.jsx)(i.z2,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(c,t-a)/s})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.input_total,s=a.accepting_power,u=a.sucking_power,d=a.input_number,f=a.power_format;return(0,r.jsxs)(i.wn,{title:"Input Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Input Circuit",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",onClick:function(){return t("toggle_input")},children:s?"Enabled":"Disabled"}),children:(0,r.jsx)(i.az,{color:u&&"good"||s&&"average"||"bad",children:u&&"Online"||s&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Input Level",children:c?(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:d,onChange:function(e){return t("set_input",{set_input:e})}}),(0,r.jsx)(i.$n,{selected:1===f,onClick:function(){return t("inputW")},children:"W"}),(0,r.jsx)(i.$n,{selected:1e3===f,onClick:function(){return t("inputKW")},children:"KW"}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("inputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("inputGW")},children:"GW"})]})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.output_total,s=a.firing,u=a.accepting_power,d=a.output_number,f=a.output_multiplier,h=a.target,m=a.held_power;return(0,r.jsxs)(i.wn,{title:"Output Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Laser Circuit",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"crosshairs",color:""===h?"green":"red",onClick:function(){return t("target")},children:h}),(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",disabled:!s&&m<1e6,onClick:function(){return t("toggle_output")},children:s?"Enabled":"Disabled"})]}),children:(0,r.jsx)(i.az,{color:s&&"good"||u&&"average"||"bad",children:s&&"Online"||u&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Output Level",children:c?c<0?"-"+(0,o.d5)(Math.abs(c)):(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",size:1.25,animated:!0,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,ranges:{bad:[-1/0,-1]},value:d,onChange:function(e){return t("set_output",{set_output:e})}}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("outputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("outputGW")},children:"GW"})]})]})}},2817:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_atmosphere:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.AtmosScan,{aircontents:t.app_data.aircontents})}},7716:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_bioscan:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).app_data,l=t.holder,a=t.dead,c=t.health,s=t.brute,u=t.oxy,d=t.tox,f=t.burn;return(t.temp,l)?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"Dead"}):(0,r.jsx)(i.az,{bold:!0,color:"green",children:"Alive"})}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:0,max:1,value:c/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Damage",children:(0,r.jsx)(i.az,{color:"blue",children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Toxin Damage",children:(0,r.jsx)(i.az,{color:"green",children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",children:(0,r.jsx)(i.az,{color:"orange",children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",children:(0,r.jsx)(i.az,{color:"red",children:s})})]}):(0,r.jsx)(i.az,{color:"red",children:"Error: No biological host found."})}},1091:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_directives:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.master,c=l.dna,s=l.prime,u=l.supplemental;return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Master",children:a?a+" ("+c+")":"None"}),a&&(0,r.jsx)(i.Ki.Item,{label:"Request DNA",children:(0,r.jsx)(i.$n,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return t("getdna")}})}),(0,r.jsx)(i.Ki.Item,{label:"Prime Directive",children:s}),(0,r.jsx)(i.Ki.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,r.jsx)(i.az,{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,r.jsx)(i.az,{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."})]})}},9316:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_doorjack:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data.app_data,s=c.cable,u=c.machine,d=c.inprogress,f=c.progress;return c.aborted,n=u?(0,r.jsx)(i.$n,{selected:!0,content:"Connected"}):(0,r.jsx)(i.$n,{content:s?"Extended":"Retracted",color:s?"orange":null,onClick:function(){return a("cable")}}),u&&(t=(0,r.jsxs)(i.Ki.Item,{label:"Hack",children:[(0,r.jsx)(i.z2,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:f,maxValue:100}),d?(0,r.jsx)(i.$n,{mt:1,color:"red",content:"Abort",onClick:function(){return a("cancel")}}):(0,r.jsx)(i.$n,{mt:1,content:"Start",onClick:function(){return a("jack")}})]})),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cable",children:n}),t]})}},5042:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.available_software,c=l.installed_software,s=l.installed_toggles,u=l.available_ram,d=l.emotions,f=l.current_emotion,h=l.speech_verbs,m=l.current_speech_verb,p=l.available_chassises,x=l.current_chassis,g=[];return c.map(function(e){return g[e.key]=e.name}),s.map(function(e){return g[e.key]=e.name}),(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available RAM",children:u}),(0,r.jsxs)(i.Ki.Item,{label:"Available Software",children:[a.filter(function(e){return!g[e.key]}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return t("purchaseSoftware",{key:e.key})}},e.key)}),0===a.filter(function(e){return!g[e.key]}).length&&"No software available!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Software",children:[c.filter(function(e){return"mainmenu"!==e.key}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,onClick:function(){return t("startSoftware",{software_key:e.key})}},e.key)}),0===c.length&&"No software installed!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Toggles",children:[s.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return t("setToggle",{toggle_key:e.key})}},e.key)}),0===s.length&&"No toggles installed!"]}),(0,r.jsx)(i.Ki.Item,{label:"Select Emotion",children:d.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.id===f,onClick:function(){return t("setEmotion",{emotion:e.id})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Speaking State",children:h.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.name===m,onClick:function(){return t("setSpeechStyle",{speech_state:e.name})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Chassis Type",children:p.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.icon===x,onClick:function(){return t("setChassis",{chassis_to_change:e.icon})}},e.id)})})]})})}},702:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.CrewManifest,{data:t.app_data})}},9513:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_medrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"MED"})}},984:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_messenger:()=>l});var r=t(8138),i=t(2864),o=t(3260),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return t.app_data.active_convo?(0,r.jsx)(o.ActiveConversation,{data:t.app_data}):(0,r.jsx)(o.MessengerList,{data:t.app_data})}},9028:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_radio:()=>a});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.app_data,c=a.minFrequency,s=a.maxFrequency,u=a.frequency,d=a.broadcasting;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Frequency",children:[(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:c/10,maxValue:s/10,value:u/10,format:function(e){return(0,o.Mg)(e,1)},onChange:function(e){return t("freq",{freq:e})}}),(0,r.jsx)(i.$n,{tooltip:"Reset",icon:"undo",onClick:function(){return t("freq",{freq:"145.9"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Broadcast Nearby Speech",children:(0,r.jsx)(i.$n,{onClick:function(){return t("toggleBroadcast")},selected:d,content:d?"Enabled":"Disabled"})})]})}},6838:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_secrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},4244:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t.app_data})}},8539:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_atmos_scan:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.AtmosScan,{aircontents:n.aircontents})}},5246:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_cookbook:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.games;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsxs)(i.$n,{width:"33%",textAlign:"center",color:"transparent",onClick:function(){return t("play",{id:e.id})},children:[(0,r.jsx)(i.In.Stack,{height:"96px",children:"Minesweeper"===e.name?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.In,{ml:"4px",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,r.jsx)(i.In,{ml:"20px",mt:"4px",name:"bomb",size:"3",color:"black"})]}):(0,r.jsx)(i.In,{name:"gamepad",size:"6"})}),(0,r.jsx)(i.az,{children:e.name})]},e.name)})})}},3606:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_janitor:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).janitor,l=t.user_loc,a=t.mops,c=t.buckets,s=t.cleanbots,u=t.carts,d=t.janicarts;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Current Location",children:[l.x,",",l.y]}),a&&(0,r.jsx)(i.Ki.Item,{label:"Mop Locations",children:a.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),c&&(0,r.jsx)(i.Ki.Item,{label:"Mop Bucket Locations",children:c.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),s&&(0,r.jsx)(i.Ki.Item,{label:"Cleanbot Locations",children:s.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),u&&(0,r.jsx)(i.Ki.Item,{label:"Janitorial Cart Locations",children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),d&&(0,r.jsx)(i.Ki.Item,{label:"Janicart Locations",children:d.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.direction_from_user,")"]},e)})})]})}},2526:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.owner,c=l.ownjob,s=l.idInserted,u=l.categories,d=l.pai,f=l.notifying;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Owner",color:"average",children:[a,", ",c]}),(0,r.jsx)(i.Ki.Item,{label:"ID",children:(0,r.jsx)(i.$n,{icon:"sync",content:"Update PDA Info",disabled:!s,onClick:function(){return t("UpdateInfo")}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Functions",children:(0,r.jsx)(i.Ki,{children:u.map(function(e){var n=l.apps[e];return n&&n.length?(0,r.jsx)(i.Ki.Item,{label:e,children:n.map(function(e){return(0,r.jsx)(i.$n,{icon:e.uid in f?e.notify_icon:e.icon,iconSpin:e.uid in f,color:e.uid in f?"red":"transparent",content:e.name,onClick:function(){return t("StartProgram",{program:e.uid})}},e.uid)})},e):null})})})}),(0,r.jsx)(i.BJ.Item,{children:!!d&&(0,r.jsxs)(i.wn,{title:"pAI",children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return t("pai",{option:1})}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return t("pai",{option:2})}})]})})]})}},4642:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.CrewManifest,{})}},1212:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_medical:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"MED"})}},3260:function(e,n,t){"use strict";t.r(n),t.d(n,{ActiveConversation:()=>d,MessengerList:()=>f,pda_messenger:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,MineSweeperLeaderboard:()=>d,pda_minesweeper:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(2264);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).mulebot.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.mulebot.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.mulebot,c=a.botstatus,s=a.active,u=c.mode,d=c.loca,f=c.load,h=c.powr,m=c.dest,p=c.home,x=c.retn,g=c.pick;switch(u){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=u}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[h,"%"]}),(0,r.jsx)(i.Ki.Item,{label:"Home",children:p}),(0,r.jsx)(i.Ki.Item,{label:"Destination",children:(0,r.jsx)(i.$n,{content:m?m+" (Set)":"None (Set)",onClick:function(){return l("target")}})}),(0,r.jsx)(i.Ki.Item,{label:"Current Load",children:(0,r.jsx)(i.$n,{content:f?f+" (Unload)":"None",disabled:!f,onClick:function(){return l("unload")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Pickup",children:(0,r.jsx)(i.$n,{content:g?"Yes":"No",selected:g,onClick:function(){return l("set_pickup_type",{autopick:+!g})}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Return",children:(0,r.jsx)(i.$n,{content:x?"Yes":"No",selected:x,onClick:function(){return l("set_auto_return",{autoret:+!x})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Proceed",icon:"play",onClick:function(){return l("start")}}),(0,r.jsx)(i.$n,{content:"Return Home",icon:"home",onClick:function(){return l("home")}})]})]})]})}},9749:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_nanobank:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.note;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{children:l}),(0,r.jsx)(i.$n,{icon:"pen",onClick:function(){return t("Edit")},content:"Edit"})]})}},4702:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_power:()=>l});var r=t(8138),i=t(2864),o=t(1784),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.PowerMonitorMainContent,{})}},6651:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_secbot:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).beepsky.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.beepsky.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.beepsky,c=a.botstatus,s=a.active,u=c.mode,d=c.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Go",icon:"play",onClick:function(){return l("go")}}),(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Summon",icon:"arrow-down",onClick:function(){return l("summon")}})]})]})]})}},7155:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_security:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"SEC"})}},7024:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t})}},7148:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_status_display:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Code",children:[(0,r.jsx)(i.$n,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return t("Status",{statdisp:0})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return t("Status",{statdisp:1})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return t("Status",{statdisp:2})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return t("Status",{statdisp:3,alert:"redalert"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return t("Status",{statdisp:3,alert:"default"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return t("Status",{statdisp:3,alert:"lockdown"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return t("Status",{statdisp:3,alert:"biohazard"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Message line 1",children:(0,r.jsx)(i.$n,{content:l.message1+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:1})}})}),(0,r.jsx)(i.Ki.Item,{label:"Message line 2",children:(0,r.jsx)(i.$n,{content:l.message2+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:2})}})})]})})}},7632:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_supplyrecords:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).supply,l=t.shuttle_loc,a=t.shuttle_time,c=t.shuttle_moving,s=t.approved,u=t.approved_count,d=t.requests,f=t.requests_count;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Shuttle Status",children:c?(0,r.jsxs)(i.az,{children:["In transit ",a]}):(0,r.jsx)(i.az,{children:l})})}),(0,r.jsx)(i.wn,{mt:1,title:"Requested Orders",children:f>0&&d.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)})}),(0,r.jsx)(i.wn,{title:"Approved Orders",children:u>0&&s.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)})})]})}},9136:function(e,n,t){"use strict";t.d(n,{P:()=>d});var r=t(8138),i=t(4530),o=t(1128),l=t(5490),a=t(3375);function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){var n=e.className,t=e.theme,i=void 0===t?"nanotrasen":t,o=e.children,d=u(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(i),(0,r.jsx)("div",{className:"theme-"+i,children:(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout",n,(0,a.WP)(d)])},(0,a.Fl)(d)),{children:o}))})}d.Content=function(e){var n=e.className,t=e.scrollable,d=e.children,f=u(e,["className","scrollable","children"]),h=(0,i.useRef)(null);return(0,i.useEffect)(function(){var e=h.current;return e&&t&&(0,o.tk)(e),function(){e&&t&&(0,o.WK)(e)}},[]),(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout__content",t&&"Layout__content--scrollable",n,(0,a.WP)(f)]),ref:h},(0,a.Fl)(f)),{children:d}))}},2372:function(e,n,t){"use strict";t(8138),t(7790),t(5490),t(2864),t(1956),t(9136)},7655:function(e,n,t){"use strict";t.d(n,{c:()=>s});var r=t(8138),i=t(7790),o=t(2316),l=t(5490),a=t(3268),c=t(2864);function s(e){var n=e.className,t=e.title,s=e.status,u=e.canClose,d=e.fancy,f=e.onDragStart,h=e.onClose,m=e.children;c.J3.dispatch;var p="string"==typeof t&&t===t.toLowerCase()&&(0,a.Sn)(t)||t;return(0,r.jsxs)("div",{className:(0,l.Ly)(["TitleBar",n]),children:[(0,r.jsx)("div",{className:"TitleBar__dragZone",onMouseDown:function(e){return d&&f&&f(e)}}),void 0===s?(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",name:"tools",opacity:.5}):(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",color:function(e){switch(e){case o.KA:return"good";case o.bz:return"average";case o.KS:default:return"bad"}}(s),name:s===o.KS?"eye-slash":"eye"}),(0,r.jsx)("div",{className:"TitleBar__title",children:p}),!!m&&(0,r.jsx)("div",{className:"TitleBar__buttons",children:m}),!1,!!(d&&u)&&(0,r.jsx)("div",{className:"TitleBar__close",onClick:h,children:(0,r.jsx)(i.In,{className:"TitleBar__close--icon",name:"times"})})]})}t(3123)},7334:function(e,n,t){"use strict";t.d(n,{p:()=>b});var r=t(8138),i=t(4530),o=t(2316),l=t(5490),a=t(3268),c=t(2864),s=t(1956),u=t(6400),d=t(2533),f=t(9136),h=t(7655);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","fitted","children"]);return(0,r.jsx)(f.P.Content,x(p({className:(0,l.Ly)(["Window__content",n])},o),{children:t&&i||(0,r.jsx)("div",{className:"Window__contentPadding",children:i})}))}},3384:function(e,n,t){"use strict";t.d(n,{p8:()=>r.p}),t(9136),t(2372);var r=t(7334)},2533:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,v:()=>a});var o=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",t=arguments.length,r=Array(t>2?t-2:0),o=2;o=2){var l=[n].concat(i(r)).map(function(e){var n;return"string"==typeof e?e:(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:n,message:l})}},l=function(e){return{debug:function(){for(var n=arguments.length,t=Array(n),r=0;rc,Su:()=>s,XX:()=>u});var r,i=t(9227),o=t(1843);(0,t(2533).h)("renderer");var l=!0,a=!1;function c(){l=l||"resumed",a=!1}function s(){a=!0}function u(e){if(i.k.mark("render/start"),!r){var n=document.getElementById("react-root");r=(0,o.createRoot)(n)}r.render(e),i.k.mark("render/finish"),!a&&l&&(l=!1)}},483:function(e,n,t){"use strict";t.d(n,{l:()=>f,z:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(1956),a=t(3384),c=t(4808),s=function(e,n){return function(){return(0,r.jsx)(a.p8,{children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:["notFound"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," was not found."]}),"missingExport"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," is missing an export."]})]})})}};function u(){return(0,r.jsx)(a.p8,{children:(0,r.jsx)(a.p8.Content,{scrollable:!0})})}function d(){return(0,r.jsx)(a.p8,{height:130,title:"Loading",width:150,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{align:"center",fill:!0,justify:"center",vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.In,{color:"blue",name:"toolbox",spin:!0,size:4})}),(0,r.jsx)(i.BJ.Item,{children:"Please wait..."})]})})})}function f(){var e,n=(0,o.Oc)(),t=n.suspended,r=n.config;if((0,l.Lo)().kitchenSink,t)return u;if(null==r?void 0:r.refreshing)return d;for(var i=null==r?void 0:r.interface,a=[function(e){return"./".concat(e,".tsx")},function(e){return"./".concat(e,".jsx")},function(e){return"./".concat(e,"/index.tsx")},function(e){return"./".concat(e,"/index.jsx")}];!e&&a.length>0;){var f=a.shift()(i);try{e=c(f)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw e}}if(!e)return s("notFound",i);var h=e[i];return h||s("missingExport",i)}},7997:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2533);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(1699),o=t(7790),l=t(9582),a={title:"Storage",render:function(){return(0,r.jsx)(c,{})}},c=function(e){return window.localStorage?(0,r.jsx)(o.wn,{title:"Local Storage",buttons:(0,r.jsx)(o.$n,{icon:"recycle",onClick:function(){localStorage.clear(),i.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(o.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(o.IC,{children:"Local storage is not available."})}},9615:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(7218);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,sendMessage:()=>o,setupHotReloading:()=>a,subscribe:()=>i});let r=[];function i(e){r.push(e)}function o(e){}function l(e,n){}function a(){}}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r||"object"==typeof t&&t&&(4&r&&t.__esModule||16&r&&"function"==typeof t.then))return t;var o=Object.create(null);i.r(o);var l={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>t[e]});return l.default=()=>t,i.d(o,l),o},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.k=e=>""+e+".css",i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.p="/",i.rv=()=>"1.5.8",i.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,n=i(8138);i(5810),i(8232),i(5153),i(4620),i(9258),i(3001),i(4648),i(5616),i(2186),i(6070),i(8523),i(4372),i(8500),i(9782),i(9770);var t=i(9227),r=i(1128),o=i(1874),l=i(2864),a=i(4530),c=i(8595),s=i(2533);function u(){return(0,a.useEffect)(function(){0===Object.keys(Byond.iconRefMap).length&&(function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return fetch(n,t).catch(function(){return new Promise(function(i){setTimeout(function(){e(n,t,r).then(i)},r)})})})((0,c.l)("icon_ref_map.json")).then(function(e){return e.json()}).then(function(e){return Byond.iconRefMap=e}).catch(function(e){return s.v.log(e)})},[]),null}function d(){return(0,n.jsx)(a.Suspense,{fallback:null,children:(0,n.jsx)(u,{})})}function f(){var e=(0,i(483).l)(l.J3);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{}),(0,n.jsx)(d,{})]})}var h=function(){document.addEventListener("click",function(e){for(var n=e.target;;){if(!n||n===document.body)return;if("a"===String(n.tagName).toLowerCase())break;n=n.parentElement}var t=n.getAttribute("href")||"";if(!("?"===t.charAt(0)||t.startsWith("byond://"))){e.preventDefault();var r=t;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})},m=i(2901),p=i(5900);function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?t-1:0),i=1;ie.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},t=n.sideEffects,r=n.reducer,i=n.middleware,o=b([(0,p.HY)({debug:y.A$,backend:l.jB}),r]),a=void 0===t||t?w((null==i?void 0:i.pre)||[]).concat([c.h,l.pX],w((null==i?void 0:i.post)||[])):[],s=p.Tw.apply(void 0,w(a)),u=(0,p.y$)(o,s);return window.__store__=u,window.__augmentStack__=(e=u,function(n,t){(t=t||Error(n.split("\n")[0])).stack=t.stack||n,k.log("FatalError:",t);var r,i,o=e.getState(),l=null==o||null==(r=o.backend)?void 0:r.config;return n+"\nUser Agent: "+navigator.userAgent+"\nState: "+JSON.stringify({ckey:null==l||null==(i=l.client)?void 0:i.ckey,interface:null==l?void 0:l.interface,window:null==l?void 0:l.window})}),u}();!function e(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):((0,l.H$)(_),(0,r.y4)(),(0,o.Bm)({keyUpVerb:"Key_Up",keyDownVerb:"Key_Down",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}}),h(),_.subscribe(function(){return(0,m.XX)((0,n.jsx)(f,{}))}),Byond.subscribe(function(e,n){return _.dispatch({type:e,payload:n})}))}()})()})(); \ No newline at end of file +(()=>{var e,n,t={222:function(e,n,t){var r={"./pai_atmosphere.jsx":"2817","./pai_bioscan.jsx":"7716","./pai_directives.jsx":"1091","./pai_doorjack.jsx":"9316","./pai_main_menu.jsx":"5042","./pai_manifest.jsx":"702","./pai_medrecords.jsx":"9513","./pai_messenger.jsx":"984","./pai_radio.jsx":"9028","./pai_secrecords.jsx":"6838","./pai_signaler.jsx":"4244"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=222},2721:function(e,n,t){var r={"./pda_atmos_scan.jsx":"8539","./pda_cookbook.jsx":"5246","./pda_games.jsx":"2336","./pda_janitor.jsx":"3606","./pda_main_menu.jsx":"2526","./pda_manifest.jsx":"4642","./pda_medical.jsx":"1212","./pda_messenger.jsx":"3260","./pda_minesweeper.jsx":"3067","./pda_mule.jsx":"5030","./pda_nanobank.jsx":"9749","./pda_notes.jsx":"3194","./pda_power.jsx":"4702","./pda_secbot.jsx":"6651","./pda_security.jsx":"7155","./pda_signaler.jsx":"7024","./pda_status_display.jsx":"7148","./pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=2721},4808:function(e,n,t){var r={"./AICard":"9609","./AICard.jsx":"9609","./AIControllerDebugger":"1664","./AIControllerDebugger.tsx":"1664","./AIFixer":"8679","./AIFixer.jsx":"8679","./AIProgramPicker":"5233","./AIProgramPicker.jsx":"5233","./AIResourceManagementConsole":"9991","./AIResourceManagementConsole.jsx":"9991","./APC":"731","./APC.jsx":"731","./ATM":"6181","./ATM.jsx":"6181","./AccountsUplinkTerminal":"4558","./AccountsUplinkTerminal.jsx":"4558","./AdminAntagMenu":"3840","./AdminAntagMenu.jsx":"3840","./AgentCard":"2794","./AgentCard.tsx":"2794","./AiAirlock":"8706","./AiAirlock.jsx":"8706","./AirAlarm":"5486","./AirAlarm.jsx":"5486","./AirlockAccessController":"6962","./AirlockAccessController.jsx":"6962","./AirlockElectronics":"9281","./AirlockElectronics.tsx":"9281","./AlertModal":"934","./AlertModal.tsx":"934","./AntagInfoHeretic":"2712","./AntagInfoHeretic.tsx":"2712","./AppearanceChanger":"6473","./AppearanceChanger.jsx":"6473","./ArcadeBattle":"6085","./ArcadeBattle.tsx":"6085","./AtmosAlertConsole":"3438","./AtmosAlertConsole.jsx":"3438","./AtmosControl":"4788","./AtmosControl.jsx":"4788","./AtmosFilter":"1937","./AtmosFilter.jsx":"1937","./AtmosMixer":"7440","./AtmosMixer.jsx":"7440","./AtmosPump":"7897","./AtmosPump.jsx":"7897","./AtmosTankControl":"1164","./AtmosTankControl.jsx":"1164","./AtmosTemperatureGate":"8340","./AtmosTemperatureGate.jsx":"8340","./AugmentMenu":"6561","./AugmentMenu.jsx":"6561","./Autolathe":"8762","./Autolathe.tsx":"8762","./BioChipPad":"9766","./BioChipPad.jsx":"9766","./Biogenerator":"9968","./Biogenerator.jsx":"9968","./BloomEdit":"3764","./BloomEdit.jsx":"3764","./BlueSpaceArtilleryControl":"7166","./BlueSpaceArtilleryControl.jsx":"7166","./BluespaceTap":"8128","./BluespaceTap.jsx":"8128","./BodyScanner":"6807","./BodyScanner.jsx":"6807","./BookBinder":"2790","./BookBinder.jsx":"2790","./BotCall":"1326","./BotCall.jsx":"1326","./BotClean":"9091","./BotClean.jsx":"9091","./BotFloor":"3578","./BotFloor.jsx":"3578","./BotHonk":"5144","./BotHonk.jsx":"5144","./BotMed":"2078","./BotMed.jsx":"2078","./BotMule":"881","./BotMule.jsx":"881","./BotSecurity":"752","./BotSecurity.jsx":"752","./BrigCells":"2850","./BrigCells.jsx":"2850","./BrigTimer":"9478","./BrigTimer.jsx":"9478","./BugReportForm":"6993","./BugReportForm.tsx":"6993","./CameraConsole":"9835","./CameraConsole.tsx":"9835","./Canister":"2094","./Canister.jsx":"2094","./CardComputer":"991","./CardComputer/":"991","./CardComputer/auth_block":"1487","./CardComputer/auth_block.tsx":"1487","./CardComputer/card_details":"7542","./CardComputer/card_details.tsx":"7542","./CardComputer/index":"991","./CardComputer/index.tsx":"991","./CardComputer/job_priority":"4287","./CardComputer/job_priority.tsx":"4287","./CardComputer/job_transfer":"6530","./CardComputer/job_transfer.tsx":"6530","./CardComputer/records_log":"9490","./CardComputer/records_log.tsx":"9490","./CardComputer/types":"1488","./CardComputer/types.tsx":"1488","./CargoConsole":"6466","./CargoConsole.jsx":"6466","./Chameleon":"6205","./Chameleon.tsx":"6205","./ChangelogView":"9072","./ChangelogView.jsx":"9072","./CheckboxListInputModal":"6707","./CheckboxListInputModal.tsx":"6707","./ChemDispenser":"8573","./ChemDispenser.jsx":"8573","./ChemHeater":"6277","./ChemHeater.jsx":"6277","./ChemMaster":"9306","./ChemMaster.tsx":"9306","./CloningConsole":"2636","./CloningConsole.jsx":"2636","./CloningPod":"1558","./CloningPod.jsx":"1558","./CoinMint":"1276","./CoinMint.tsx":"1276","./ColorPickerModal":"1572","./ColorPickerModal.tsx":"1572","./ColourMatrixTester":"6851","./ColourMatrixTester.jsx":"6851","./CommunicationsComputer":"5325","./CommunicationsComputer.jsx":"5325","./CompostBin":"6185","./CompostBin.jsx":"6185","./Contractor":"4868","./Contractor.jsx":"4868","./ConveyorSwitch":"3510","./ConveyorSwitch.jsx":"3510","./CrewMonitor":"6714","./CrewMonitor.jsx":"6714","./Cryo":"2306","./Cryo.jsx":"2306","./CryopodConsole":"2394","./CryopodConsole.jsx":"2394","./DNAModifier":"3372","./DNAModifier.tsx":"3372","./DanceMachine":"4283","./DanceMachine.tsx":"4283","./DecalPainter":"5391","./DecalPainter.tsx":"5391","./DestinationTagger":"3883","./DestinationTagger.jsx":"3883","./DisposalBin":"6381","./DisposalBin.jsx":"6381","./DnaVault":"2908","./DnaVault.jsx":"2908","./DroneConsole":"2480","./DroneConsole.jsx":"2480","./EFTPOS":"1654","./EFTPOS.jsx":"1654","./ERTManager":"3991","./ERTManager.tsx":"3991","./EconomyManager":"9644","./EconomyManager.jsx":"9644","./Electropack":"6426","./Electropack.jsx":"6426","./Emojipedia":"9480","./Emojipedia.tsx":"9480","./EvolutionMenu":"9219","./EvolutionMenu.jsx":"9219","./ExosuitFabricator":"6251","./ExosuitFabricator.jsx":"6251","./ExperimentConsole":"9621","./ExperimentConsole.jsx":"9621","./ExternalAirlockController":"5091","./ExternalAirlockController.jsx":"5091","./FaxMachine":"6325","./FaxMachine.jsx":"6325","./FilingCabinet":"9788","./FilingCabinet.jsx":"9788","./FlockPanel":"2920","./FlockPanel.tsx":"2920","./FloorPainter":"26","./FloorPainter.jsx":"26","./GPS":"1561","./GPS.jsx":"1561","./GeneModder":"1259","./GeneModder.jsx":"1259","./GenericCrewManifest":"6954","./GenericCrewManifest.jsx":"6954","./GhostHudPanel":"9031","./GhostHudPanel.jsx":"9031","./GlandDispenser":"3396","./GlandDispenser.jsx":"3396","./GravityGen":"1009","./GravityGen.jsx":"1009","./GuestPass":"6294","./GuestPass.jsx":"6294","./HandheldChemDispenser":"9511","./HandheldChemDispenser.jsx":"9511","./HealthSensor":"3365","./HealthSensor.jsx":"3365","./Holodeck":"5880","./Holodeck.tsx":"5880","./IdCardModifier":"9721","./IdCardModifier.tsx":"9721","./Instrument":"6126","./Instrument.jsx":"6126","./KeyComboModal":"1783","./KeyComboModal.tsx":"1783","./KeycardAuth":"3928","./KeycardAuth.jsx":"3928","./KitchenMachine":"6706","./KitchenMachine.jsx":"6706","./LawManager":"9846","./LawManager.tsx":"9846","./LawyerSim":"3788","./LawyerSim.jsx":"3788","./LibraryComputer":"3023","./LibraryComputer.jsx":"3023","./LibraryManager":"183","./LibraryManager.jsx":"183","./ListInputModal":"1536","./ListInputModal.tsx":"1536","./Loadout":"7239","./Loadout.tsx":"7239","./LoreConsole":"1387","./LoreConsole.tsx":"1387","./MODsuit":"5531","./MODsuit.tsx":"5531","./MagnetController":"5247","./MagnetController.jsx":"5247","./MaterialContainer":"9587","./MaterialContainer.tsx":"9587","./MechBayConsole":"2433","./MechBayConsole.jsx":"2433","./MechaControlConsole":"3763","./MechaControlConsole.jsx":"3763","./MedicalRecords":"9548","./MedicalRecords.jsx":"9548","./MerchVendor":"2666","./MerchVendor.jsx":"2666","./MiningVendor":"6231","./MiningVendor.jsx":"6231","./NTRecruiter":"1972","./NTRecruiter.jsx":"1972","./Newscaster":"452","./Newscaster.jsx":"452","./Noticeboard":"6563","./Noticeboard.tsx":"6563","./NuclearBomb":"5867","./NuclearBomb.jsx":"5867","./NuclearRodFabricator":"7579","./NuclearRodFabricator.jsx":"7579","./NumberInputModal":"8007","./NumberInputModal.tsx":"8007","./ObjAccessModifier":"4965","./ObjAccessModifier.tsx":"4965","./OperatingComputer":"6499","./OperatingComputer.jsx":"6499","./Orbit":"7701","./Orbit.jsx":"7701","./OreRedemption":"5802","./OreRedemption.jsx":"5802","./PAI":"4235","./PAI.jsx":"4235","./PDA":"2740","./PDA.jsx":"2740","./Pacman":"377","./Pacman.jsx":"377","./PanDEMIC":"9454","./PanDEMIC.tsx":"9454","./ParticleAccelerator":"3566","./ParticleAccelerator.jsx":"3566","./PdaPainter":"3371","./PdaPainter.jsx":"3371","./PersonalCrafting":"6144","./PersonalCrafting.jsx":"6144","./Photocopier":"2327","./Photocopier.jsx":"2327","./PoolController":"7331","./PoolController.jsx":"7331","./PortablePump":"5562","./PortablePump.jsx":"5562","./PortableScrubber":"7920","./PortableScrubber.jsx":"7920","./PortableTurret":"2854","./PortableTurret.jsx":"2854","./PowerMonitor":"1784","./PowerMonitor.tsx":"1784","./PrisonerImplantManager":"8011","./PrisonerImplantManager.jsx":"8011","./PrisonerShuttleConsole":"2479","./PrisonerShuttleConsole.jsx":"2479","./PrizeCounter":"9083","./PrizeCounter.tsx":"9083","./QuirkMenu":"7692","./QuirkMenu.tsx":"7692","./RCD":"7076","./RCD.tsx":"7076","./RPD":"1703","./RPD.jsx":"1703","./Radio":"8930","./Radio.tsx":"8930","./RankedListInputModal":"4097","./RankedListInputModal.tsx":"4097","./ReactorMonitor":"4087","./ReactorMonitor.tsx":"4087","./ReagentGrinder":"1876","./ReagentGrinder.jsx":"1876","./ReagentsEditor":"1569","./ReagentsEditor.tsx":"1569","./RemoteSignaler":"9510","./RemoteSignaler.jsx":"9510","./RequestConsole":"5297","./RequestConsole.tsx":"5297","./RndBackupConsole":"4384","./RndBackupConsole.jsx":"4384","./RndConsole":"2247","./RndConsole/":"2247","./RndConsole/AnalyzerMenu":"4080","./RndConsole/AnalyzerMenu.jsx":"4080","./RndConsole/DataDiskMenu":"9529","./RndConsole/DataDiskMenu.jsx":"9529","./RndConsole/LatheCategory":"1465","./RndConsole/LatheCategory.jsx":"1465","./RndConsole/LatheChemicalStorage":"4154","./RndConsole/LatheChemicalStorage.jsx":"4154","./RndConsole/LatheMainMenu":"8563","./RndConsole/LatheMainMenu.jsx":"8563","./RndConsole/LatheMaterialStorage":"7635","./RndConsole/LatheMaterialStorage.jsx":"7635","./RndConsole/LatheMaterials":"5887","./RndConsole/LatheMaterials.jsx":"5887","./RndConsole/LatheMenu":"9760","./RndConsole/LatheMenu.jsx":"9760","./RndConsole/LatheSearch":"6013","./RndConsole/LatheSearch.jsx":"6013","./RndConsole/LinkMenu":"7726","./RndConsole/LinkMenu.jsx":"7726","./RndConsole/SettingsMenu":"3321","./RndConsole/SettingsMenu.jsx":"3321","./RndConsole/index":"2247","./RndConsole/index.jsx":"2247","./RndNetController":"7280","./RndNetController.jsx":"7280","./RndServer":"5156","./RndServer.jsx":"5156","./RobotSelfDiagnosis":"7868","./RobotSelfDiagnosis.jsx":"7868","./RoboticsControlConsole":"1696","./RoboticsControlConsole.jsx":"1696","./Safe":"5826","./Safe.jsx":"5826","./SatelliteControl":"1892","./SatelliteControl.jsx":"1892","./SecureStorage":"7943","./SecureStorage.jsx":"7943","./SecurityRecords":"8589","./SecurityRecords.jsx":"8589","./SeedExtractor":"6906","./SeedExtractor.tsx":"6906","./ShuttleConsole":"631","./ShuttleConsole.jsx":"631","./ShuttleManipulator":"5060","./ShuttleManipulator.jsx":"5060","./SingularityMonitor":"6448","./SingularityMonitor.jsx":"6448","./Sleeper":"1495","./Sleeper.tsx":"1495","./SlotMachine":"6526","./SlotMachine.jsx":"6526","./Smartfridge":"1645","./Smartfridge.jsx":"1645","./Smes":"1399","./Smes.tsx":"1399","./SolarControl":"1343","./SolarControl.jsx":"1343","./SpawnersMenu":"4263","./SpawnersMenu.jsx":"4263","./SpecMenu":"8729","./SpecMenu.jsx":"8729","./StackCraft":"9469","./StackCraft.tsx":"9469","./StationAlertConsole":"5592","./StationAlertConsole.jsx":"5592","./StationTraitsPanel":"5651","./StationTraitsPanel.tsx":"5651","./StripMenu":"5724","./StripMenu.tsx":"5724","./SuitStorage":"2975","./SuitStorage.jsx":"2975","./SupermatterMonitor":"4835","./SupermatterMonitor.tsx":"4835","./SyndicateComputerSimple":"2266","./SyndicateComputerSimple.jsx":"2266","./TEG":"8073","./TEG.jsx":"8073","./TachyonArray":"5808","./TachyonArray.jsx":"5808","./Tank":"5125","./Tank.jsx":"5125","./TankDispenser":"7112","./TankDispenser.jsx":"7112","./TcommsCore":"3283","./TcommsCore.jsx":"3283","./TcommsRelay":"431","./TcommsRelay.jsx":"431","./Teleporter":"5605","./Teleporter.jsx":"5605","./TelescienceConsole":"8336","./TelescienceConsole.jsx":"8336","./TempGun":"1745","./TempGun.jsx":"1745","./TextInputModal":"4273","./TextInputModal.tsx":"4273","./ThermoMachine":"9449","./ThermoMachine.jsx":"9449","./TransferValve":"1760","./TransferValve.jsx":"1760","./TurbineComputer":"6971","./TurbineComputer.jsx":"6971","./Uplink":"8380","./Uplink.tsx":"8380","./Vending":"1638","./Vending.jsx":"1638","./VolumeMixer":"2144","./VolumeMixer.jsx":"2144","./VotePanel":"7063","./VotePanel.jsx":"7063","./Wires":"7983","./Wires.jsx":"7983","./WizardApprenticeContract":"8167","./WizardApprenticeContract.jsx":"8167","./ZLevelManager":"234","./ZLevelManager.tsx":"234","./common/AccessList":"2723","./common/AccessList.tsx":"2723","./common/AtmosScan":"7276","./common/AtmosScan.tsx":"7276","./common/BeakerContents":"3013","./common/BeakerContents.tsx":"3013","./common/BotStatus":"9226","./common/BotStatus.jsx":"9226","./common/ComplexModal":"4744","./common/ComplexModal.jsx":"4744","./common/CrewManifest":"2639","./common/CrewManifest.jsx":"2639","./common/InputButtons":"1942","./common/InputButtons.tsx":"1942","./common/InterfaceLockNoticeBox":"1992","./common/InterfaceLockNoticeBox.jsx":"1992","./common/Loader":"9472","./common/Loader.tsx":"9472","./common/LoginInfo":"7352","./common/LoginInfo.jsx":"7352","./common/LoginScreen":"736","./common/LoginScreen.jsx":"736","./common/Operating":"6696","./common/Operating.tsx":"6696","./common/SearchableTableContext":"6888","./common/SearchableTableContext.tsx":"6888","./common/Signaler":"9298","./common/Signaler.jsx":"9298","./common/SimpleRecords":"4455","./common/SimpleRecords.jsx":"4455","./common/SortableTableContext":"2264","./common/SortableTableContext.tsx":"2264","./common/TabsContext":"4900","./common/TabsContext.tsx":"4900","./common/TemporaryNotice":"7482","./common/TemporaryNotice.jsx":"7482","./goonstation_PTL":"162","./goonstation_PTL/":"162","./goonstation_PTL/index":"162","./goonstation_PTL/index.jsx":"162","./pai/pai_atmosphere":"2817","./pai/pai_atmosphere.jsx":"2817","./pai/pai_bioscan":"7716","./pai/pai_bioscan.jsx":"7716","./pai/pai_directives":"1091","./pai/pai_directives.jsx":"1091","./pai/pai_doorjack":"9316","./pai/pai_doorjack.jsx":"9316","./pai/pai_main_menu":"5042","./pai/pai_main_menu.jsx":"5042","./pai/pai_manifest":"702","./pai/pai_manifest.jsx":"702","./pai/pai_medrecords":"9513","./pai/pai_medrecords.jsx":"9513","./pai/pai_messenger":"984","./pai/pai_messenger.jsx":"984","./pai/pai_radio":"9028","./pai/pai_radio.jsx":"9028","./pai/pai_secrecords":"6838","./pai/pai_secrecords.jsx":"6838","./pai/pai_signaler":"4244","./pai/pai_signaler.jsx":"4244","./pda/pda_atmos_scan":"8539","./pda/pda_atmos_scan.jsx":"8539","./pda/pda_cookbook":"5246","./pda/pda_cookbook.jsx":"5246","./pda/pda_games":"2336","./pda/pda_games.jsx":"2336","./pda/pda_janitor":"3606","./pda/pda_janitor.jsx":"3606","./pda/pda_main_menu":"2526","./pda/pda_main_menu.jsx":"2526","./pda/pda_manifest":"4642","./pda/pda_manifest.jsx":"4642","./pda/pda_medical":"1212","./pda/pda_medical.jsx":"1212","./pda/pda_messenger":"3260","./pda/pda_messenger.jsx":"3260","./pda/pda_minesweeper":"3067","./pda/pda_minesweeper.jsx":"3067","./pda/pda_mule":"5030","./pda/pda_mule.jsx":"5030","./pda/pda_nanobank":"9749","./pda/pda_nanobank.jsx":"9749","./pda/pda_notes":"3194","./pda/pda_notes.jsx":"3194","./pda/pda_power":"4702","./pda/pda_power.jsx":"4702","./pda/pda_secbot":"6651","./pda/pda_secbot.jsx":"6651","./pda/pda_security":"7155","./pda/pda_security.jsx":"7155","./pda/pda_signaler":"7024","./pda/pda_signaler.jsx":"7024","./pda/pda_status_display":"7148","./pda/pda_status_display.jsx":"7148","./pda/pda_supplyrecords":"7632","./pda/pda_supplyrecords.jsx":"7632"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=4808},937:function(e,n,t){var r={"./ByondUi.stories.js":"7997","./Storage.stories.js":"6498","./Themes.stories.js":"9615"};function i(e){return t(o(e))}function o(e){if(!t.o(r,e)){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=937},7912:function(e,n,t){"use strict";function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i,o=t(8014),l=t(4530),a=t(6634);function c(e){var n="https://react.dev/errors/"+e;if(1$||(e.current=R[$],R[$]=null,$--)}function L(e,n){R[++$]=e.current,e.current=n}var K=D(null),J=D(null),X=D(null),U=D(null);function F(e,n){switch(L(X,n),L(J,e),L(K,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sj(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=sb(n=sj(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(K),L(K,e)}function V(){M(K),M(J),M(X)}function H(e){null!==e.memoizedState&&L(U,e);var n=K.current,t=sb(n,e.type);n!==t&&(L(J,e),L(K,t))}function W(e){J.current===e&&(M(K),M(J)),U.current===e&&(M(U),un._currentValue=N)}function q(e){if(void 0===n$)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);n$=n&&n[1]||"",nD=-1)":-1o||s[i]!==u[o]){var d="\n"+s[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=o);break}}}finally{G=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?q(t):""}function Q(e){try{var n="",t=null;do n+=function(e,n){switch(e.tag){case 26:case 27:case 5:return q(e.type);case 16:return q("Lazy");case 13:return e.child!==n&&null!==n?q("Suspense Fallback"):q("Suspense");case 19:return q("SuspenseList");case 0:case 15:return Y(e.type,!1);case 11:return Y(e.type.render,!1);case 1:return Y(e.type,!0);case 31:return q("Activity");default:return""}}(e,t),t=e,e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var Z=Object.prototype.hasOwnProperty,ee=o.unstable_scheduleCallback,en=o.unstable_cancelCallback,et=o.unstable_shouldYield,er=o.unstable_requestPaint,ei=o.unstable_now,eo=o.unstable_getCurrentPriorityLevel,el=o.unstable_ImmediatePriority,ea=o.unstable_UserBlockingPriority,ec=o.unstable_NormalPriority,es=o.unstable_LowPriority,eu=o.unstable_IdlePriority,ed=o.log,ef=o.unstable_setDisableYieldValue,eh=null,em=null;function ep(e){if("function"==typeof ed&&ef(e),em&&"function"==typeof em.setStrictMode)try{em.setStrictMode(eh,e)}catch(e){}}var ex=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eg(e)/ej|0)|0},eg=Math.log,ej=Math.LN2,eb=256,ey=262144,ev=4194304;function ew(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ek(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var a=0x7ffffff&r;return 0!==a?0!=(r=a&~o)?i=ew(r):0!=(l&=a)?i=ew(l):t||0!=(t=a&~e)&&(i=ew(t)):0!=(a=r&~o)?i=ew(a):0!==l?i=ew(l):t||0!=(t=r&~e)&&(i=ew(t)),0===i?0:0!==n&&n!==i&&0==(n&o)&&((o=i&-i)>=(t=n&-n)||32===o&&0!=(4194048&t))?n:i}function e_(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function eC(){var e=ev;return 0==(0x3c00000&(ev<<=1))&&(ev=4194304),e}function eI(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function eS(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eO(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ex(n);e.entangledLanes|=n,e.entanglements[r]=0x40000000|e.entanglements[r]|261930&t}function eA(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ex(t),i=1<=tt),to=!1;function tl(e,n){switch(e){case"keyup":return -1!==te.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return"object"===(void 0===(e=e.detail)?"undefined":r(e))&&"data"in e?e.data:null}var tc=!1,ts={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!ts[e.type]:"textarea"===n}function td(e,n,t,r){ny?nv?nv.push(r):nv=[r]:ny=r,0<(n=si(n,"onChange")).length&&(t=new nX("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tf=null,th=null;function tm(e){c4(e,0)}function tp(e){if(e9(eH(e)))return e}function tx(e,n){if("change"===e)return n}var tg=!1;if(nI){if(nI){var tj="oninput"in document;if(!tj){var tb=document.createElement("div");tb.setAttribute("oninput","return;"),tj="function"==typeof tb.oninput}i=tj}else i=!1;tg=i&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tO(r)}}function tP(e){var n,t;e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var r=ne(e.document);n=r,null!=(t=e.HTMLIFrameElement)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t;){try{var i="string"==typeof r.contentWindow.location.href}catch(e){i=!1}if(i)e=r.contentWindow;else break;r=ne(e.document)}return r}function tB(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tE=nI&&"documentMode"in document&&11>=document.documentMode,tz=null,tT=null,tN=null,tR=!1;function t$(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tR||null==tz||tz!==ne(r)||(r="selectionStart"in(r=tz)&&tB(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tN&&tS(tN,r)||(tN=r,0<(r=si(tT,"onSelect")).length&&(n=new nX("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=tz)))}function tD(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tM={animationend:tD("Animation","AnimationEnd"),animationiteration:tD("Animation","AnimationIteration"),animationstart:tD("Animation","AnimationStart"),transitionrun:tD("Transition","TransitionRun"),transitionstart:tD("Transition","TransitionStart"),transitioncancel:tD("Transition","TransitionCancel"),transitionend:tD("Transition","TransitionEnd")},tL={},tK={};function tJ(e){if(tL[e])return tL[e];if(!tM[e])return e;var n,t=tM[e];for(n in t)if(t.hasOwnProperty(n)&&n in tK)return tL[e]=t[n];return e}nI&&(tK=document.createElement("div").style,"AnimationEvent"in window||(delete tM.animationend.animation,delete tM.animationiteration.animation,delete tM.animationstart.animation),"TransitionEvent"in window||delete tM.transitionend.transition);var tX=tJ("animationend"),tU=tJ("animationiteration"),tF=tJ("animationstart"),tV=tJ("transitionrun"),tH=tJ("transitionstart"),tW=tJ("transitioncancel"),tq=tJ("transitionend"),tG=new Map,tY="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tQ(e,n){tG.set(e,n),eQ(n,[e])}tY.push("scrollEnd");var tZ="function"==typeof reportError?reportError:function(e){if("object"===("undefined"==typeof window?"undefined":r(window))&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===(void 0===e?"undefined":r(e))&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"===("undefined"==typeof process?"undefined":r(process))&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},t0=[],t1=0,t2=0;function t8(){for(var e=t1,n=t2=t1=0;n>=l,i-=l,rb=1<<32-ex(n)+i|t<f?(p=d,d=null):p=d.sibling;var x=m(r,d,a[f],c);if(null===x){null===d&&(d=p);break}e&&d&&null===x.alternate&&n(r,d),o=l(x,o,f),null===u?s=x:u.sibling=x,u=x,d=p}if(f===a.length)return t(r,d),rO&&rv(r,f),s;if(null===d){for(;fp?(x=f,f=null):x=f.sibling;var b=m(r,f,g.value,s);if(null===b){null===f&&(f=x);break}e&&f&&null===b.alternate&&n(r,f),o=l(b,o,p),null===d?u=b:d.sibling=b,d=b,f=x}if(g.done)return t(r,f),rO&&rv(r,p),u;if(null===f){for(;!g.done;p++,g=a.next())null!==(g=h(r,g.value,s))&&(o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return rO&&rv(r,p),u}for(f=i(f);!g.done;p++,g=a.next())null!==(g=j(f,r,p,g.value,s))&&(e&&null!==g.alternate&&f.delete(null===g.key?p:g.key),o=l(g,o,p),null===d?u=g:d.sibling=g,d=g);return e&&f.forEach(function(e){return n(r,e)}),rO&&rv(r,p),u}(u,d,f=y.call(f),b)}if("function"==typeof f.then)return s(u,d,ij(f),b);if(f.$$typeof===v)return s(u,d,rG(u,f),b);iy(u,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"===(void 0===f?"undefined":r(f))?(f=""+f,null!==d&&6===d.tag?(t(u,d.sibling),(b=o(d,f)).return=u):(t(u,d),(b=ra(f,u.mode,b)).return=u),a(u=b)):t(u,d)}(s,u,d,f);return ix=null,b}catch(e){if(e===io||e===ia)throw e;var y=rn(29,e,null,s.mode);return y.lanes=f,y.return=s,y}finally{}}}var iw=iv(!0),ik=iv(!1),i_=!1;function iC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iI(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function iS(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function iO(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&a$)){var i=r.pending;return null===i?n.next=n:(n.next=i.next,i.next=n),r.pending=n,n=t7(e),t6(e,null,t),n}return t3(e,r,n,t),t7(e)}function iA(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194048&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,eA(e,t)}}function iP(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var i=null,o=null;if(null!==(t=t.firstBaseUpdate)){do{var l={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===o?i=o=l:o=o.next=l,t=t.next}while(null!==t);null===o?i=o=n:o=o.next=n}else i=o=n;t={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var iB=!1;function iE(){if(iB){var e=r6;if(null!==e)throw e}}function iz(e,n,t,r){iB=!1;var i=e.updateQueue;i_=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,s=c.next;c.next=null,null===l?o=s:l.next=s,l=c;var u=e.alternate;null!==u&&(a=(u=u.updateQueue).lastBaseUpdate)!==l&&(null===a?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=c)}if(null!==o){var d=i.baseState;for(l=0,u=s=c=null,a=o;;){var f=-0x20000001&a.lane,m=f!==a.lane;if(m?(aL&f)===f:(r&f)===f){0!==f&&f===r4&&(iB=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var p=e,x=a;switch(f=n,x.tag){case 1:if("function"==typeof(p=x.payload)){d=p.call(t,d,f);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=x.payload)?p.call(t,d,f):p))break e;d=h({},d,f);break e;case 2:i_=!0}}null!==(f=a.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=i.callbacks)?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(s=u=m,c=d):u=u.next=m,l|=f;if(null===(a=a.next))if(null===(a=i.shared.pending))break;else a=(m=a).next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=s,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),aW|=l,e.lanes=l,e.memoizedState=d}}function iT(e,n){if("function"!=typeof e)throw Error(c(191,e));e.call(n)}function iN(e,n){var t=e.callbacks;if(null!==t)for(e.callbacks=null,e=0;el?l:8;var a=z.T,c={};z.T=c,le(e,!1,n,t);try{var s=o(),u=z.S;if(null!==u&&u(c,s),null!==s&&"object"===(void 0===s?"undefined":r(s))&&"function"==typeof s.then){var d,f,h=(d=[],f={status:"pending",value:null,reason:null,then:function(e){d.push(e)}},s.then(function(){f.status="fulfilled",f.value=i;for(var e=0;e title"))),sh(o,r,t),o[eR]=e,eq(o),r=o;break e;case"link":var l=s8("link","href",i).get(r+(t.href||""));if(l){for(var a=0;aa)break;var u=c.transferSize,d=c.initiatorType;u&&sm(d)&&(l+=u*((c=c.responseEnd)s4?50:800)+p);return m.unsuspend=e,function(){m.unsuspend=null,clearTimeout(n),clearTimeout(t)}}:null)){ce=o,e.cancelPendingCommit=x(cI.bind(null,e,n,o,t,r,i,l,a,c,u,d,null,f,h)),cd(e,o,l,!s);return}}cI(e,n,o,t,r,i,l,a,c)}function cd(e,n,t,r){n&=~aG,n&=~aq,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var i=n;0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(i,{is:r.is}):l.createElement(i)}}o[eR]=n,o[e$]=r;e:for(l=n.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)break;for(;null===l.sibling;){if(null===l.return||l.return===n)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(n.stateNode=o,sh(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&lG(n)}}return l1(n),lY(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&lG(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(c(166));if(e=X.current,rN(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(i=rI))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[eR]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||su(e.nodeValue,t)))||rE(n,!0)}else(e=sg(e).createTextNode(r))[eR]=n,n.stateNode=e}return l1(n),null;case 31:if(t=n.memoizedState,null===e||null!==e.memoizedState){if(r=rN(n),null!==t){if(null===e){if(!r)throw Error(c(318));if(!(e=null!==(e=n.memoizedState)?e.dehydrated:null))throw Error(c(557));e[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),e=!1}else t=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e){if(256&n.flags)return iH(n),n;return iH(n),null}if(0!=(128&n.flags))throw Error(c(558))}return l1(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=rN(n),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(c(318));if(!(i=null!==(i=n.memoizedState)?i.dehydrated:null))throw Error(c(317));i[eR]=n}else rR(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;l1(n),i=!1}else i=r$(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(256&n.flags)return iH(n),n;return iH(n),null}}if(iH(n),0!=(128&n.flags))return n.lanes=t,n;return t=null!==r,e=null!==e&&null!==e.memoizedState,t&&(r=n.child,i=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),t!==e&&t&&(n.child.flags|=8192),lZ(n,n.updateQueue),l1(n),null;case 4:return V(),null===e&&se(n.stateNode.containerInfo),l1(n),null;case 10:return rX(n.type),l1(n),null;case 19:if(M(iW),null===(r=n.memoizedState))return l1(n),null;if(i=0!=(128&n.flags),null===(o=r.rendering))if(i)l0(r,!1);else{if(0!==aH||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(o=iq(e))){for(n.flags|=128,l0(r,!1),n.updateQueue=e=o.updateQueue,lZ(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)ri(t,e),t=t.sibling;return L(iW,1&iW.current|2),rO&&rv(n,r.treeForkCount),n.child}e=e.sibling}null!==r.tail&&ei()>a3&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304)}else{if(!i)if(null!==(e=iq(o))){if(n.flags|=128,i=!0,n.updateQueue=e=e.updateQueue,lZ(n,e),l0(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!rO)return l1(n),null}else 2*ei()-r.renderingStartTime>a3&&0x20000000!==t&&(n.flags|=128,i=!0,l0(r,!1),n.lanes=4194304);r.isBackwards?(o.sibling=n.child,n.child=o):(null!==(e=r.last)?e.sibling=o:n.child=o,r.last=o)}if(null!==r.tail)return e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ei(),e.sibling=null,t=iW.current,L(iW,i?1&t|2:1&t),rO&&rv(n,r.treeForkCount),e;return l1(n),null;case 22:case 23:return iH(n),iL(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?0!=(0x20000000&t)&&0==(128&n.flags)&&(l1(n),6&n.subtreeFlags&&(n.flags|=8192)):l1(n),null!==(t=n.updateQueue)&&lZ(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&M(ie),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),rX(r1),l1(n),null;case 25:case 30:return null}throw Error(c(156,n.tag))}(n.alternate,n,aV);if(null!==t){aM=t;return}if(null!==(n=n.sibling)){aM=n;return}aM=n=e}while(null!==n);0===aH&&(aH=5)}function cC(e,n){do{var t=function(e,n){switch(r_(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return rX(r1),V(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return W(n),null;case 31:if(null!==n.memoizedState){if(iH(n),null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 13:if(iH(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(c(340));rR()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return M(iW),null;case 4:return V(),null;case 10:return rX(n.type),null;case 22:case 23:return iH(n),iL(),null!==e&&M(ie),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return rX(r1),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,aM=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){aM=e;return}aM=e=t}while(null!==e);aH=6,aM=null}function cI(e,n,t,r,i,o,l,a,s){e.cancelPendingCommit=null;do cB();while(0!==a6);if(0!=(6&a$))throw Error(c(327));if(null!==n){if(n===e.current)throw Error(c(177));if(!function(e,n,t,r,i,o){var l=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var a=e.entanglements,c=e.expirationTimes,s=e.hiddenUpdates;for(t=l&~t;0x&&(l=x,x=p,p=l);var g=tA(a,p),j=tA(a,x);if(g&&j&&(1!==h.rangeCount||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==j.node||h.focusOffset!==j.offset)){var b=d.createRange();b.setStart(g.node,g.offset),h.removeAllRanges(),p>x?(h.addRange(b),h.extend(j.node,j.offset)):(b.setEnd(j.node,j.offset),h.addRange(b))}}}}for(d=[],h=a;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof a.focus&&a.focus(),a=0;at?32:t,z.T=null,t=ct,ct=null;var o=a7,l=ce;if(a6=0,a9=a7=null,ce=0,0!=(6&a$))throw Error(c(331));var a=a$;if(a$|=4,az(o.current),aI(o,o.current,l,t),a$=a,cH(0,!1),em&&"function"==typeof em.onPostCommitFiberRoot)try{em.onPostCommitFiberRoot(eh,o)}catch(e){}return!0}finally{T.p=i,z.T=r,cP(e,n)}}function cz(e,n,t){n=rd(t,n),n=lj(e.stateNode,n,2),null!==(e=iO(e,n,2))&&(eS(e,2),cV(e))}function cT(e,n,t){if(3===e.tag)cz(e,e,t);else for(;null!==n;){if(3===n.tag){cz(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===a4||!a4.has(r))){e=rd(t,e),null!==(r=iO(n,t=lb(2),2))&&(ly(t,r,n,e),eS(r,2),cV(r));break}}n=n.return}}function cN(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new aR;var i=new Set;r.set(n,i)}else void 0===(i=r.get(n))&&(i=new Set,r.set(n,i));i.has(t)||(aF=!0,i.add(t),e=cR.bind(null,e,n,t),n.then(e,e))}function cR(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,aD===e&&(aL&t)===t&&(4===aH||3===aH&&(0x3c00000&aL)===aL&&300>ei()-a2?0==(2&a$)&&cm(e,0):aG|=t,aQ===aL&&(aQ=0)),cV(e)}function c$(e,n){0===n&&(n=eC()),null!==(e=t4(e,n))&&(eS(e,n),cV(e))}function cD(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),c$(e,t)}function cM(e,n){var t=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(t=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(c(314))}null!==r&&r.delete(n),c$(e,t)}var cL=null,cK=null,cJ=!1,cX=!1,cU=!1,cF=0;function cV(e){e!==cK&&null===e.next&&(null===cK?cL=cK=e:cK=cK.next=e),cX=!0,cJ||(cJ=!0,sC(function(){0!=(6&a$)?ee(el,cW):cq()}))}function cH(e,n){if(!cU&&cX){cU=!0;do for(var t=!1,r=cL;null!==r;){if(!n)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var l=r.suspendedLanes,a=r.pingedLanes;o=0xc000095&(o=(1<<31-ex(42|e)+1)-1&(i&~(l&~a)))?0xc000095&o|1:o?2|o:0}0!==o&&(t=!0,cQ(r,o))}else o=aL,0==(3&(o=ek(r,r===aD?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||e_(r,o)||(t=!0,cQ(r,o));r=r.next}while(t);cU=!1}}function cW(){cq()}function cq(){cX=cJ=!1;var e,n=0;0===cF||((e=window.event)&&"popstate"===e.type?e===sv||(sv=e,0):(sv=null,1))||(n=cF);for(var t=ei(),r=null,i=cL;null!==i;){var o=i.next,l=cG(i,t);0===l?(i.next=null,null===r?cL=o:r.next=o,null===o&&(cK=r)):(r=i,(0!==n||0!=(3&l))&&(cX=!0)),i=o}0!==a6&&5!==a6||cH(n,!1),0!==cF&&(cF=0)}function cG(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-0x3c00001&e.pendingLanes;0 title"):null)}function s5(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var s4=0;function s6(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages)){if(this.stylesheets)s9(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var s7=null;function s9(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,s7=new Map,n.forEach(ue,e),s7=null,s6.call(e))}function ue(e,n){if(!(4&n.state.loading)){var t=s7.get(e);if(t)var r=t.get(null);else{t=new Map,s7.set(e,t);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oe.length)&&(n=e.length);for(var t=0,r=Array(n);ti})},2316:function(e,n,t){"use strict";t.d(n,{KA:()=>r,KS:()=>o,NE:()=>l,bz:()=>i});var r=2,i=1,o=0,l=["average","bad","black","blue","brown","good","green","grey","label","olive","orange","pink","purple","red","teal","transparent","violet","white","yellow"]},1128:function(e,n,t){"use strict";t.d(n,{Nh:()=>u,WK:()=>w,tk:()=>v,y4:()=>f});var r,i=t(7686);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};d=!!e.ignoreWindowFocus},h=!0;function m(e,n){if(d){h=!0;return}if(r&&(clearTimeout(r),r=null),n){r=setTimeout(function(){return m(e)});return}h!==e&&(h=e,u.emit(e?"window-focus":"window-blur"),u.emit("window-focus-change",e))}var p=null;function x(e){var n=String(e.tagName).toLowerCase();return"input"===n||"textarea"===n}function g(){p&&(p.removeEventListener("blur",g),p=null,u.emit("input-blur"))}var j=null,b=null,y=[];function v(e){y.push(e)}function w(e){var n=y.indexOf(e);n>=0&&y.splice(n,1)}window.addEventListener("mousemove",function(e){var n=e.target;n!==b&&(b=n,function(e){if(!p&&h)for(var n=document.body;e&&e!==n;){if(y.includes(e)){if(e.contains(j))return;j=e,e.focus();return}e=e.parentElement}}(n))}),document.addEventListener("focus",function(e){var n,t,r;if(t=e.target,null!=(r=Element)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!r[Symbol.hasInstance](t):!(t instanceof r)){b=null,j=null;return}b=null,j=e.target,x(e.target)&&(n=e.target,g(),(p=n).addEventListener("blur",g),u.emit("input-focus"))},!0),document.addEventListener("blur",function(){b=null},!0),window.addEventListener("focus",function(){m(!0)}),window.addEventListener("blur",function(){b=null,m(!1,!0)}),window.addEventListener("close",function(){m(!1)});var k={},_=function(){function e(n,t,r){l(this,e),s(this,"event",void 0),s(this,"type",void 0),s(this,"code",void 0),s(this,"ctrl",void 0),s(this,"shift",void 0),s(this,"alt",void 0),s(this,"repeat",void 0),s(this,"_str",void 0),this.event=n,this.type=t,this.code=n.keyCode,this.ctrl=n.ctrlKey,this.shift=n.shiftKey,this.alt=n.altKey,this.repeat=!!r}return c(e,[{key:"hasModifierKeys",value:function(){return this.ctrl||this.alt||this.shift}},{key:"isModifierKey",value:function(){return this.code===i.Ss||this.code===i.re||this.code===i.cH}},{key:"isDown",value:function(){return"keydown"===this.type}},{key:"isUp",value:function(){return"keyup"===this.type}},{key:"toString",value:function(){return this._str||(this._str="",this.ctrl&&(this._str+="Ctrl+"),this.alt&&(this._str+="Alt+"),this.shift&&(this._str+="Shift+"),this.code>=48&&this.code<=90?this._str+=String.fromCharCode(this.code):this.code>=i.sV&&this.code<=i.Yw?this._str+="F".concat(this.code-111):this._str+="[".concat(this.code,"]")),this._str}}]),e}();document.addEventListener("keydown",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keydown",k[n]);u.emit("keydown",t),u.emit("key",t),k[n]=!0}}),document.addEventListener("keyup",function(e){if(!x(e.target)){var n=e.keyCode,t=new _(e,"keyup");u.emit("keyup",t),u.emit("key",t),k[n]=!1}})},9582:function(e,n,t){"use strict";t.d(n,{QL:()=>o,d5:()=>l,fU:()=>c,up:()=>a});var r=["f","p","n","μ","m"," ","k","M","G","T","P","E","Z","Y","R","Q","F","N","H"],i=r.indexOf(" ");function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-i,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!Number.isFinite(e))return e.toString();var o=Math.floor(Math.max(3*n,Math.floor(Math.log10(Math.abs(e))))/3),l=r[Math.min(o+i,r.length-1)],a=(e/Math.pow(1e3,o)).toFixed(2);return a.endsWith(".00")?a=a.slice(0,-3):a.endsWith(".0")&&(a=a.slice(0,-2)),"".concat(a," ").concat(l.trim()).concat(t).trim()}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e,n,"W")}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!Number.isFinite(e))return String(e);var t=Number(e.toFixed(n)),r=Math.abs(t).toString().split(".");r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g," ");var i=r.join(".");return t<0?"-".concat(i):i}function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",t=Math.floor(e/10),r=Math.floor(t/3600),i=Math.floor(t%3600/60),o=t%60;if("short"===n)return"".concat(r>0?"".concat(r,"h"):"").concat(i>0?"".concat(i,"m"):"").concat(o>0?"".concat(o,"s"):"");var l=String(r).padStart(2,"0"),a=String(i).padStart(2,"0"),c=String(o).padStart(2,"0");return"".concat(l,":").concat(a,":").concat(c)}},1874:function(e,n,t){"use strict";t.d(n,{Bm:()=>d,ao:()=>f,sc:()=>h,zr:()=>s});var r=t(1128),i=t(7686),o={},l=[i.s6,i.Ri,i.iy,i.aW,i.Ss,i.re,i.gf,i.R,i.iU,i.zh,i.sP],a={},c=[];function s(){for(var e in a)a[e]&&(a[e]=!1,Byond.command(u.verbParamsFn(u.keyUpVerb,e)))}var u={keyDownVerb:"KeyDown",keyUpVerb:"KeyUp",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}};function d(e){e&&(u=e),Byond.winget("default.*").then(function(e){var n=function(e){return e.substring(1,e.length-1).replace(c,'"')},t={};for(var r in e){var i=r.split("."),l=i[1],a=i[2];l&&a&&(t[l]||(t[l]={}),t[l][a]=e[r])}var c=/\\"/g;for(var s in t){var u=t[s];o[n(u.name)]=n(u.command)}}),r.Nh.on("window-blur",function(){s()}),r.Nh.on("input-focus",function(){s()}),f()}function f(){r.Nh.on("key",m)}function h(){r.Nh.off("key",m)}function m(e){var n=!0,t=!1,r=void 0;try{for(var i,s=c[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)(0,i.value)(e)}catch(e){t=!0,r=e}finally{try{n||null==s.return||s.return()}finally{if(t)throw r}}!function(e){var n,t=String(e);if("Ctrl+F5"===t||"Ctrl+R"===t)return location.reload();if(!("Ctrl+F"===t||e.event.defaultPrevented||e.isModifierKey()||l.includes(e.code))){var r=16===(n=e.code)?"Shift":17===n?"Ctrl":18===n?"Alt":33===n?"Northeast":34===n?"Southeast":35===n?"Southwest":36===n?"Northwest":37===n?"West":38===n?"North":39===n?"East":40===n?"South":45===n?"Insert":46===n?"Delete":n>=48&&n<=57||n>=65&&n<=90?String.fromCharCode(n):n>=96&&n<=105?"Numpad".concat(n-96):n>=112&&n<=123?"F".concat(n-111):188===n?",":189===n?"-":190===n?".":void 0;if(r){var i=o[r];if(i)return Byond.command(i);if(e.isDown()&&!a[r]){a[r]=!0;var c=u.verbParamsFn(u.keyDownVerb,r);return Byond.command(c)}if(e.isUp()&&a[r]){a[r]=!1;var s=u.verbParamsFn(u.keyUpVerb,r);Byond.command(s)}}}}(e)}},7686:function(e,n,t){"use strict";t.d(n,{C:()=>y,Pm:()=>p,R:()=>m,Ri:()=>o,Ss:()=>a,W8:()=>g,Wy:()=>x,Yw:()=>k,aW:()=>i,bh:()=>j,cH:()=>c,gf:()=>f,hr:()=>b,iU:()=>d,iy:()=>u,re:()=>l,s6:()=>s,sP:()=>w,sV:()=>v,ye:()=>r,zh:()=>h});var r=8,i=9,o=13,l=16,a=17,c=18,s=27,u=32,d=37,f=38,h=39,m=40,p=48,x=57,g=65,j=90,b=96,y=105,v=112,w=116,k=123},925:function(e,n,t){"use strict";t.d(n,{KL:()=>o,_:()=>i});var r,i=((r={}).A="a",r.Alt="Alt",r.Backspace="Backspace",r.Control="Control",r.D="d",r.Delete="Delete",r.Down="ArrowDown",r.E="e",r.End="End",r.Enter="Enter",r.Esc="Esc",r.Escape="Escape",r.Home="Home",r.Insert="Insert",r.Left="ArrowLeft",r.Minus="-",r.N="n",r.PageDown="PageDown",r.PageUp="PageUp",r.Plus="+",r.Right="ArrowRight",r.S="s",r.Shift="Shift",r.Space=" ",r.Tab="Tab",r.Up="ArrowUp",r.W="w",r.Z="z",r);function o(e){return"Esc"===e||"Escape"===e}},6859:function(e,n,t){"use strict";function r(e,n,t){return et?t:e}function i(e){return e<0?0:e>1?1:e}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return(e-n)/(t-n)}function l(e,n){return Number.parseFloat((Math.round(e*Math.pow(10,n)+1e-4*(e>=0?1:-1))/Math.pow(10,n)).toFixed(n))}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Number(e).toFixed(Math.max(n,0))}function c(e,n){var t=!0,r=!1,i=void 0;try{for(var o,l=Object.keys(n)[Symbol.iterator]();!(t=(o=l.next()).done);t=!0){var a,c=o.value;if((a=n[c])&&e>=a[0]&&e<=a[1])return c}}catch(e){r=!0,i=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw i}}}function s(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)}function u(e){return 180/Math.PI*e}t.d(n,{J$:()=>i,KJ:()=>u,LI:()=>l,Lz:()=>s,Mg:()=>a,TG:()=>c,hs:()=>o,qE:()=>r})},5490:function(e,n,t){"use strict";function r(e){for(var n="",t=0;tr,b5:()=>i})},3268:function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return JSON.stringify(e)},t=e.toLowerCase().trim();return function(e){if(!t)return!0;var r=n(e);return!!r&&r.toLowerCase().includes(t)}}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}t.d(n,{Sn:()=>a,XZ:()=>r,ZH:()=>i,jT:()=>u});var o=["Id","Tv"],l=["A","An","And","As","At","But","By","For","For","From","In","Into","Near","Nor","Of","On","Onto","Or","The","To","With"];function a(e){if(!e)return e;var n=e.replace(/([^\W_]+[^\s-]*) */g,function(e){return i(e)}),t=!0,r=!1,a=void 0;try{for(var c,s=l[Symbol.iterator]();!(t=(c=s.next()).done);t=!0){var u=c.value,d=RegExp("\\s".concat(u,"\\s"),"g");n=n.replace(d,function(e){return e.toLowerCase()})}}catch(e){r=!0,a=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw a}}var f=!0,h=!1,m=void 0;try{for(var p,x=o[Symbol.iterator]();!(f=(p=x.next()).done);f=!0){var g=p.value,j=RegExp("\\b".concat(g,"\\b"),"g");n=n.replace(j,function(e){return e.toLowerCase()})}}catch(e){h=!0,m=e}finally{try{f||null==x.return||x.return()}finally{if(h)throw m}}return n}var c=/&(nbsp|amp|quot|lt|gt|apos|trade|copy);/g,s={amp:"&",apos:"'",cops:"\xa9",gt:">",lt:"<",nbsp:" ",quot:'"',trade:"™"};function u(e){return e?e.replace(/
    /gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(c,function(e,n){return s[n]}).replace(/&#?([0-9]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,10))}).replace(/&#x?([0-9a-f]+);/gi,function(e,n){return String.fromCharCode(Number.parseInt(n,16))}):e}},3375:function(e,n,t){"use strict";t.d(n,{Fl:()=>x,WP:()=>g,lO:()=>j,zA:()=>l});var r=t(2316),i=t(5490);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ttJ,z2:()=>tM,wn:()=>rr,Z8:()=>x,y5:()=>m,Rr:()=>tp,aF:()=>t1,IC:()=>t2,XI:()=>ra,zv:()=>h,ms:()=>tI,_V:()=>tj,Y0:()=>v,$n:()=>n6,cG:()=>tx,m_:()=>nQ,t1:()=>td,Nt:()=>th,so:()=>tE,Q7:()=>t6,SM:()=>rn,Ap:()=>ri,Ki:()=>tQ,pd:()=>tF,N6:()=>tH,tU:()=>rh,Wx:()=>tY,fs:()=>rg,D1:()=>ti,In:()=>I,c_:()=>tT,Hg:()=>tb,az:()=>y,BK:()=>tm,qT:()=>rv});var r,i,o,l,a=t(8138),c=t(6859),s=t(4530),u=t.t(s,2);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["as","className","children","tw"]),c=i?"".concat(i," ").concat((0,j.WP)(a)):(0,j.WP)(a);return(0,s.createElement)(void 0===r?"div":r,(n=b({},(0,j.Fl)(b({},a,(0,j.lO)(l)))),t=t={className:c},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n),o)}function v(e){var n=e.className,t=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className"]);return(0,a.jsx)(y,function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var C=/-o$/;function I(e){var n=e.name,t=void 0===n?"":n,r=e.size,i=e.spin,o=e.className,l=e.rotation,c=_(e,["name","size","spin","className","rotation"]),s=c.style||{};r&&(s.fontSize="".concat(100*r,"%")),l&&(s.transform="rotate(".concat(l,"deg)")),c.style=s;var u=(0,j.Fl)(c),d="";if(t.startsWith("tg-"))d=t;else{var f=C.test(t),h=t.replace(C,""),m=!h.startsWith("fa-");d=f?"far ":"fas ",m&&(d+="fa-"),d+=h,i&&(d+=" fa-spin")}return(0,a.jsx)("i",k({className:(0,g.Ly)(["Icon",d,o,(0,j.WP)(c)])},u))}function S(){return"undefined"!=typeof window}function O(e){return B(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var n;return(null==e||null==(n=e.ownerDocument)?void 0:n.defaultView)||window}function P(e){var n;return null==(n=(B(e)?e.ownerDocument:e.document)||window.document)?void 0:n.documentElement}function B(e){return!!S()&&(e instanceof Node||e instanceof A(e).Node)}function E(e){return!!S()&&(e instanceof Element||e instanceof A(e).Element)}function z(e){return!!S()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function T(e){return!!S()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}(I||(I={})).Stack=function(e){var n,t,r=e.className,i=e.children,o=e.size,l=_(e,["className","children","size"]),c=l.style||{};return o&&(c.fontSize="".concat(100*o,"%")),l.style=c,(0,a.jsx)("span",(n=k({className:(0,g.Ly)(["IconStack",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:i},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};let N=new Set(["inline","contents"]);function R(e){let{overflow:n,overflowX:t,overflowY:r,display:i}=H(e);return/auto|scroll|overlay|hidden|clip/.test(n+r+t)&&!N.has(i)}let $=new Set(["table","td","th"]),D=[":popover-open",":modal"];function M(e){return D.some(n=>{try{return e.matches(n)}catch(e){return!1}})}let L=["transform","translate","scale","rotate","perspective"],K=["transform","translate","scale","rotate","perspective","filter"],J=["paint","layout","strict","content"];function X(e){let n=U(),t=E(e)?H(e):e;return L.some(e=>!!t[e]&&"none"!==t[e])||!!t.containerType&&"normal"!==t.containerType||!n&&!!t.backdropFilter&&"none"!==t.backdropFilter||!n&&!!t.filter&&"none"!==t.filter||K.some(e=>(t.willChange||"").includes(e))||J.some(e=>(t.contain||"").includes(e))}function U(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let F=new Set(["html","body","#document"]);function V(e){return F.has(O(e))}function H(e){return A(e).getComputedStyle(e)}function W(e){return E(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===O(e))return e;let n=e.assignedSlot||e.parentNode||T(e)&&e.host||P(e);return T(n)?n.host:n}function G(e,n,t){var r;void 0===n&&(n=[]),void 0===t&&(t=!0);let i=function e(n){let t=q(n);return V(t)?n.ownerDocument?n.ownerDocument.body:n.body:z(t)&&R(t)?t:e(t)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=A(i);if(o){let e=Y(l);return n.concat(l,l.visualViewport||[],R(i)?i:[],e&&t?G(e):[])}return n.concat(i,G(i,[],t))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Q='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',Z="undefined"==typeof Element,ee=Z?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,en=!Z&&Element.prototype.getRootNode?function(e){var n;return null==e||null==(n=e.getRootNode)?void 0:n.call(e)}:function(e){return null==e?void 0:e.ownerDocument},et=function e(n,t){void 0===t&&(t=!0);var r,i=null==n||null==(r=n.getAttribute)?void 0:r.call(n,"inert");return""===i||"true"===i||t&&n&&e(n.parentNode)},er=function(e){var n,t=null==e||null==(n=e.getAttribute)?void 0:n.call(e,"contenteditable");return""===t||"true"===t},ei=function(e,n,t){if(et(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Q));return n&&ee.call(e,Q)&&r.unshift(e),r=r.filter(t)},eo=function e(n,t,r){for(var i=[],o=Array.from(n);o.length;){var l=o.shift();if(!et(l,!1))if("SLOT"===l.tagName){var a=l.assignedElements(),c=e(a.length?a:l.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:l,candidates:c})}else{ee.call(l,Q)&&r.filter(l)&&(t||!n.includes(l))&&i.push(l);var s=l.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(l),u=!et(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(s&&u){var d=e(!0===s?l.children:s.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:l,candidates:d})}else o.unshift.apply(o,l.children)}}return i},el=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ea=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||er(e))&&!el(e)?0:e.tabIndex},ec=function(e,n){var t=ea(e);return t<0&&n&&!el(e)?0:t},es=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},eu=function(e){return"INPUT"===e.tagName},ed=function(e,n){for(var t=0;tsummary:first-of-type")?e.parentElement:e;if(ee.call(i,"details:not([open]) *"))return!0;if(t&&"full"!==t&&"legacy-full"!==t){if("non-zero-area"===t)return ep(e)}else{if("function"==typeof r){for(var o=e;e;){var l=e.parentElement,a=en(e);if(l&&!l.shadowRoot&&!0===r(l))return ep(e);e=e.assignedSlot?e.assignedSlot:l||a===e.ownerDocument?l:a.host}e=o}if(em(e))return!e.getClientRects().length;if("legacy-full"!==t)return!0}return!1},eg=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if("FIELDSET"===n.tagName&&n.disabled){for(var t=0;tea(n))&&!!ej(e,n)},ey=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(n)||!!(n>=0)},ev=function e(n){var t=[],r=[];return n.forEach(function(n,i){var o=!!n.scopeParent,l=o?n.scopeParent:n,a=ec(l,o),c=o?e(n.candidates):l;0===a?o?t.push.apply(t,c):t.push(l):r.push({documentOrder:i,tabIndex:a,item:n,isScope:o,content:c})}),r.sort(es).reduce(function(e,n){return n.isScope?e.push.apply(e,n.content):e.push(n.content),e},[]).concat(t)},ew=function(e,n){return ev((n=n||{}).getShadowRoot?eo([e],n.includeContainer,{filter:eb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ey}):ei(e,n.includeContainer,eb.bind(null,n)))};function ek(e,n){if(!e||!n)return!1;let t=null==n.getRootNode?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&T(t)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function e_(e){return"composedPath"in e?e.composedPath()[0]:e.target}function eC(e,n){return null!=n&&("composedPath"in e?e.composedPath().includes(n):null!=e.target&&n.contains(e.target))}function eI(e){return(null==e?void 0:e.ownerDocument)||document}function eS(e,n,t){return void 0===t&&(t=!0),e.filter(e=>{var r;return e.parentId===n&&(!t||(null==(r=e.context)?void 0:r.open))}).flatMap(n=>[n,...eS(e,n.id,t)])}function eO(e,n){let t=["mouse","pen"];return n||t.push("",void 0),t.includes(e)}var eA="undefined"!=typeof document?s.useLayoutEffect:function(){};function eP(e){let n=s.useRef(e);return eA(()=>{n.current=e}),n}let eB={...u}.useInsertionEffect||(e=>e());function eE(e){let n=s.useRef(()=>{});return eB(()=>{n.current=e}),s.useCallback(function(){for(var e=arguments.length,t=Array(e),r=0;r({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function eT(e,n){let t=ew(e,ez()),r=t.length;if(0===r)return;let i=function(e){let n=e.activeElement;for(;(null==(t=n)||null==(t=t.shadowRoot)?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}(eI(e)),o=t.indexOf(i);return t[-1===o?1===n?0:r-1:o+n]}function eN(e,n){let t=n||e.currentTarget,r=e.relatedTarget;return!r||!ek(t,r)}function eR(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let n=e.dataset.tabindex;delete e.dataset.tabindex,n?e.setAttribute("tabindex",n):e.removeAttribute("tabindex")})}var e$=t(6634);let eD=Math.min,eM=Math.max,eL=Math.round,eK=Math.floor,eJ=e=>({x:e,y:e}),eX={left:"right",right:"left",bottom:"top",top:"bottom"},eU={start:"end",end:"start"};function eF(e,n){return"function"==typeof e?e(n):e}function eV(e){return e.split("-")[0]}function eH(e){return e.split("-")[1]}function eW(e){return"x"===e?"y":"x"}function eq(e){return"y"===e?"height":"width"}let eG=new Set(["top","bottom"]);function eY(e){return eG.has(eV(e))?"y":"x"}function eQ(e){return e.replace(/start|end/g,e=>eU[e])}let eZ=["left","right"],e0=["right","left"],e1=["top","bottom"],e2=["bottom","top"];function e8(e){return e.replace(/left|right|bottom|top/g,e=>eX[e])}function e3(e){let{x:n,y:t,width:r,height:i}=e;return{width:r,height:i,top:t,left:n,right:n+r,bottom:t+i,x:n,y:t}}function e5(e,n,t){let r,{reference:i,floating:o}=e,l=eY(n),a=eW(eY(n)),c=eq(a),s=eV(n),u="y"===l,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;switch(s){case"top":r={x:d,y:i.y-o.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-o.width,y:f};break;default:r={x:i.x,y:i.y}}switch(eH(n)){case"start":r[a]-=h*(t&&u?-1:1);break;case"end":r[a]+=h*(t&&u?-1:1)}return r}let e4=async(e,n,t)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=t,a=o.filter(Boolean),c=await (null==l.isRTL?void 0:l.isRTL(n)),s=await l.getElementRects({reference:e,floating:n,strategy:i}),{x:u,y:d}=e5(s,r,c),f=r,h={},m=0;for(let t=0;tE(e)&&"body"!==O(e)),i=null,o="fixed"===H(e).position,l=o?q(e):e;for(;E(l)&&!V(l);){let n=H(l),t=X(l);t||"fixed"!==n.position||(i=null),(o?!t&&!i:!t&&"static"===n.position&&!!i&&nc.has(i.position)||R(l)&&!t&&function e(n,t){let r=q(n);return!(r===t||!E(r)||V(r))&&("fixed"===H(r).position||e(r,t))}(e,l))?r=r.filter(e=>e!==l):i=n,l=q(l)}return n.set(e,r),r}(n,this._c):[].concat(t),r],l=o[0],a=o.reduce((e,t)=>{let r=ns(n,t,i);return e.top=eM(r.top,e.top),e.right=eD(r.right,e.right),e.bottom=eD(r.bottom,e.bottom),e.left=eM(r.left,e.left),e},ns(n,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:nf,getElementRects:nh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:n,height:t}=ne(e);return{width:n,height:t}},getScale:nt,isElement:E,isRTL:function(e){return"rtl"===H(e).direction}};function np(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}var nx="undefined"!=typeof document?s.useLayoutEffect:function(){};function ng(e,n){let t,r,i;if(e===n)return!0;if(typeof e!=typeof n)return!1;if("function"==typeof e&&e.toString()===n.toString())return!0;if(e&&n&&"object"==typeof e){if(Array.isArray(e)){if((t=e.length)!==n.length)return!1;for(r=t;0!=r--;)if(!ng(e[r],n[r]))return!1;return!0}if((t=(i=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(r=t;0!=r--;)if(!({}).hasOwnProperty.call(n,i[r]))return!1;for(r=t;0!=r--;){let t=i[r];if(("_owner"!==t||!e.$$typeof)&&!ng(e[t],n[t]))return!1}return!0}return e!=e&&n!=n}function nj(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nb(e,n){let t=nj(e);return Math.round(n*t)/t}function ny(e){let n=s.useRef(e);return nx(()=>{n.current=e}),n}let nv="active",nw="selected",nk={...u},n_=!1,nC=0,nI=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+nC++,nS=nk.useId||function(){let[e,n]=s.useState(()=>n_?nI():void 0);return eA(()=>{null==e&&n(nI())},[]),s.useEffect(()=>{n_=!0},[]),e},nO=s.createContext(null),nA=s.createContext(null),nP=()=>{var e;return(null==(e=s.useContext(nO))?void 0:e.id)||null};function nB(e){return"data-floating-ui-"+e}function nE(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}let nz=nB("safe-polygon");function nT(e,n,t){if(t&&!eO(t))return 0;if("number"==typeof e)return e;if("function"==typeof e){let t=e();return"number"==typeof t?t:null==t?void 0:t[n]}return null==e?void 0:e[n]}function nN(e){return"function"==typeof e?e():e}let nR={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},n$=s.forwardRef(function(e,n){let[t,r]=s.useState();eA(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]);let i={ref:n,tabIndex:0,role:t,"aria-hidden":!t||void 0,[nB("focus-guard")]:"",style:nR};return(0,a.jsx)("span",{...e,...i})}),nD=s.createContext(null),nM=nB("portal");function nL(e){let{children:n,id:t,root:r,preserveTabOrder:i=!0}=e,o=function(e){void 0===e&&(e={});let{id:n,root:t}=e,r=nS(),i=nK(),[o,l]=s.useState(null),a=s.useRef(null);return eA(()=>()=>{null==o||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),eA(()=>{if(!r||a.current)return;let e=n?document.getElementById(n):null;if(!e)return;let t=document.createElement("div");t.id=r,t.setAttribute(nM,""),e.appendChild(t),a.current=t,l(t)},[n,r]),eA(()=>{if(null===t||!r||a.current)return;let e=t||(null==i?void 0:i.portalNode);e&&!B(e)&&(e=e.current),e=e||document.body;let o=null;n&&((o=document.createElement("div")).id=n,e.appendChild(o));let c=document.createElement("div");c.id=r,c.setAttribute(nM,""),(e=o||e).appendChild(c),a.current=c,l(c)},[n,t,r,i]),o}({id:t,root:r}),[l,c]=s.useState(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),h=s.useRef(null),m=null==l?void 0:l.modal,p=null==l?void 0:l.open,x=!!l&&!l.modal&&l.open&&i&&!!(r||o);return s.useEffect(()=>{if(o&&i&&!m)return o.addEventListener("focusin",e,!0),o.addEventListener("focusout",e,!0),()=>{o.removeEventListener("focusin",e,!0),o.removeEventListener("focusout",e,!0)};function e(e){o&&eN(e)&&("focusin"===e.type?eR:function(e){ew(e,ez()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(o)}},[o,i,m]),s.useEffect(()=>{!o||p||eR(o)},[p,o]),(0,a.jsxs)(nD.Provider,{value:s.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:h,portalNode:o,setFocusManagerState:c}),[i,o]),children:[x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:u,onFocus:e=>{var n,t;if(eN(e,o))null==(n=f.current)||n.focus();else{let e=eT(eI(t=l?l.domReference:null).body,-1)||t;null==e||e.focus()}}}),x&&o&&(0,a.jsx)("span",{"aria-owns":o.id,style:nR}),o&&e$.createPortal(n,o),x&&o&&(0,a.jsx)(n$,{"data-type":"outside",ref:d,onFocus:e=>{var n,t;if(eN(e,o))null==(n=h.current)||n.focus();else{let n=eT(eI(t=l?l.domReference:null).body,1)||t;null==n||n.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent,"focus-out"))}}})]})}let nK=()=>s.useContext(nD);function nJ(e){return z(e.target)&&"BUTTON"===e.target.tagName}function nX(e){return z(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}let nU={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nF={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},nV=e=>{var n,t;return{escapeKey:"boolean"==typeof e?e:null!=(n=null==e?void 0:e.escapeKey)&&n,outsidePress:"boolean"==typeof e?e:null==(t=null==e?void 0:e.outsidePress)||t}};function nH(e,n,t){let r=new Map,i="item"===t,o=e;if(i&&e){let{[nv]:n,[nw]:t,...r}=e;o=r}return{..."floating"===t&&{tabIndex:-1,"data-floating-ui-focusable":""},...o,...n.map(n=>{let r=n?n[t]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,n)=>(n&&Object.entries(n).forEach(n=>{let[t,o]=n;if(!(i&&[nv,nw].includes(t)))if(0===t.indexOf("on")){if(r.has(t)||r.set(t,[]),"function"==typeof o){var l;null==(l=r.get(t))||l.push(o),e[t]=function(){for(var e,n=arguments.length,i=Array(n),o=0;oe(...i)).find(e=>void 0!==e)}}}else e[t]=o}),e),{})}}function nW(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t{let e;return e=new Map,{emit(n,t){var r;null==(r=e.get(n))||r.forEach(e=>e(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var r;null==(r=e.get(n))||r.delete(t)}}}),a=null!=nP(),[c,u]=s.useState(r.reference),d=eE((e,n,r)=>{o.current.openEvent=e?n:void 0,l.emit("openchange",{open:e,event:n,reason:r,nested:a}),null==t||t(e,n,r)}),f=s.useMemo(()=>({setPositionReference:u}),[]),h=s.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return s.useMemo(()=>({dataRef:o,open:n,onOpenChange:d,elements:h,events:l,floatingId:i,refs:f}),[n,d,h,l,i,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||t,i=r.elements,[o,l]=s.useState(null),[a,c]=s.useState(null),u=(null==i?void 0:i.domReference)||o,d=s.useRef(null),f=s.useContext(nA);eA(()=>{u&&(d.current=u)},[u]);let h=function(e){void 0===e&&(e={});let{placement:n="bottom",strategy:t="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=s.useState(r);ng(h,r)||m(r);let[p,x]=s.useState(null),[g,j]=s.useState(null),b=s.useCallback(e=>{e!==k.current&&(k.current=e,x(e))},[]),y=s.useCallback(e=>{e!==_.current&&(_.current=e,j(e))},[]),v=o||p,w=l||g,k=s.useRef(null),_=s.useRef(null),C=s.useRef(d),I=null!=c,S=ny(c),O=ny(i),A=ny(u),P=s.useCallback(()=>{var e,r;let i,o,l;if(!k.current||!_.current)return;let a={placement:n,strategy:t,middleware:h};O.current&&(a.platform=O.current),(e=k.current,r=_.current,i=new Map,l={...(o={platform:nm,...a}).platform,_c:i},e4(e,r,{...o,platform:l})).then(e=>{let n={...e,isPositioned:!1!==A.current};B.current&&!ng(C.current,n)&&(C.current=n,e$.flushSync(()=>{f(n)}))})},[h,n,t,O,A]);nx(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let B=s.useRef(!1);nx(()=>(B.current=!0,()=>{B.current=!1}),[]),nx(()=>{if(v&&(k.current=v),w&&(_.current=w),v&&w){if(S.current)return S.current(v,w,P);P()}},[v,w,P,S,I]);let E=s.useMemo(()=>({reference:k,floating:_,setReference:b,setFloating:y}),[b,y]),z=s.useMemo(()=>({reference:v,floating:w}),[v,w]),T=s.useMemo(()=>{let e={position:t,left:0,top:0};if(!z.floating)return e;let n=nb(z.floating,d.x),r=nb(z.floating,d.y);return a?{...e,transform:"translate("+n+"px, "+r+"px)",...nj(z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:n,top:r}},[t,a,z.floating,d.x,d.y]);return s.useMemo(()=>({...d,update:P,refs:E,elements:z,floatingStyles:T}),[d,P,E,z,T])}({...e,elements:{...i,...a&&{reference:a}}}),m=s.useCallback(e=>{let n=E(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(n),h.refs.setReference(n)},[h.refs]),p=s.useCallback(e=>{(E(e)||null===e)&&(d.current=e,l(e)),(E(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!E(e))&&h.refs.setReference(e)},[h.refs]),x=s.useMemo(()=>({...h.refs,setReference:p,setPositionReference:m,domReference:d}),[h.refs,p,m]),g=s.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),j=s.useMemo(()=>({...h,...r,refs:x,elements:g,nodeId:n}),[h,x,g,n,r]);return eA(()=>{r.dataRef.current.floatingContext=j;let e=null==f?void 0:f.nodesRef.current.find(e=>e.id===n);e&&(e.context=j)}),s.useMemo(()=>({...h,context:j,refs:x,elements:g}),[h,x,g,j])}({middleware:[{...(void 0===(f=u=void 0===N?6:N)&&(f=0),{name:"offset",options:f,async fn(e){var n,t;let{x:r,y:i,placement:o,middlewareData:l}=e,a=await e9(e,f);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(t=l.arrow)&&t.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:o}}}}),options:[u,d]},{...{name:"flip",options:p=h={padding:6},async fn(e){var n,t,r,i,o,l,a,c;let s,u,d,{placement:f,middlewareData:h,rects:m,initialPlacement:x,platform:g,elements:j}=e,{mainAxis:b=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:_=!0,...C}=eF(p,e);if(null!=(n=h.arrow)&&n.alignmentOffset)return{};let I=eV(f),S=eY(x),O=eV(x)===x,A=await (null==g.isRTL?void 0:g.isRTL(j.floating)),P=v||(O||!_?[e8(x)]:(s=e8(x),[eQ(x),s,eQ(s)])),B="none"!==k;!v&&B&&P.push(...(u=eH(x),d=function(e,n,t){switch(e){case"top":case"bottom":if(t)return n?e0:eZ;return n?eZ:e0;case"left":case"right":return n?e1:e2;default:return[]}}(eV(x),"start"===k,A),u&&(d=d.map(e=>e+"-"+u),_&&(d=d.concat(d.map(eQ)))),d));let E=[x,...P],z=await e6(e,C),T=[],N=(null==(t=h.flip)?void 0:t.overflows)||[];if(b&&T.push(z[I]),y){let e,n,t,r,i=(l=f,a=m,void 0===(c=A)&&(c=!1),e=eH(l),t=eq(n=eW(eY(l))),r="x"===n?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[t]>a.floating[t]&&(r=e8(r)),[r,e8(r)]);T.push(z[i[0]],z[i[1]])}if(N=[...N,{placement:f,overflows:T}],!T.every(e=>e<=0)){let e=((null==(r=h.flip)?void 0:r.index)||0)+1,n=E[e];if(n&&("alignment"!==y||S===eY(n)||N.every(e=>eY(e.placement)!==S||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:n}};let t=null==(i=N.filter(e=>e.overflows[0]<=0).sort((e,n)=>e.overflows[1]-n.overflows[1])[0])?void 0:i.placement;if(!t)switch(w){case"bestFit":{let e=null==(o=N.filter(e=>{if(B){let n=eY(e.placement);return n===S||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,n)=>e+n,0)]).sort((e,n)=>e[1]-n[1])[0])?void 0:o[0];e&&(t=e);break}case"initialPlacement":t=x}if(f!==t)return{reset:{placement:t}}}return{}}},options:[h,m]},{...(void 0===(b=x)&&(b={}),{name:"shift",options:b,async fn(e){let{x:n,y:t,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:e=>{let{x:n,y:t}=e;return{x:n,y:t}}},...a}=eF(b,e),c={x:n,y:t},s=await e6(e,a),u=eY(eV(r)),d=eW(u),f=c[d],h=c[u];if(i){let e="y"===d?"top":"left",n="y"===d?"bottom":"right",t=f+s[e],r=f-s[n];f=eM(t,eD(f,r))}if(o){let e="y"===u?"top":"left",n="y"===u?"bottom":"right",t=h+s[e],r=h-s[n];h=eM(t,eD(h,r))}let m=l.fn({...e,[d]:f,[u]:h});return{...m,data:{x:m.x-n,y:m.y-t,enabled:{[d]:i,[u]:o}}}}}),options:[x,j]},B&&{...{name:"size",options:w=y={apply:function(e){var n=e.rects;e.elements.floating.style.width="".concat(n.reference.width,"px")}},async fn(e){var n,t;let r,i,{placement:o,rects:l,platform:a,elements:c}=e,{apply:s=()=>{},...u}=eF(w,e),d=await e6(e,u),f=eV(o),h=eH(o),m="y"===eY(o),{width:p,height:x}=l.floating;"top"===f||"bottom"===f?(r=f,i=h===(await (null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(i=f,r="end"===h?"top":"bottom");let g=x-d.top-d.bottom,j=p-d.left-d.right,b=eD(x-d[r],g),y=eD(p-d[i],j),v=!e.middlewareData.shift,k=b,_=y;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(_=j),null!=(t=e.middlewareData.shift)&&t.enabled.y&&(k=g),v&&!h){let e=eM(d.left,0),n=eM(d.right,0),t=eM(d.top,0),r=eM(d.bottom,0);m?_=p-2*(0!==e||0!==n?e+n:eM(d.left,d.right)):k=x-2*(0!==t||0!==r?t+r:eM(d.top,d.bottom))}await s({...e,availableWidth:_,availableHeight:k});let C=await a.getDimensions(c.floating);return p!==C.width||x!==C.height?{reset:{rects:!0}}:{}}},options:[y,v]}],onOpenChange:function(e){Z(e),null==W||W(e)},open:Q,placement:J||"bottom",transform:!1,whileElementsMounted:function(e,n,t){return void 0!==K&&K(),function(e,n,t,r){let i;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=nn(e),d=o||l?[...u?G(u):[],...G(n)]:[];d.forEach(e=>{o&&e.addEventListener("scroll",t,{passive:!0}),l&&e.addEventListener("resize",t)});let f=u&&c?function(e,n){let t,r=null,i=P(e);function o(){var e;clearTimeout(t),null==(e=r)||e.disconnect(),r=null}return!function l(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),o();let s=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=s;if(a||n(),!f||!h)return;let m={rootMargin:-eK(d)+"px "+-eK(i.clientWidth-(u+f))+"px "+-eK(i.clientHeight-(d+h))+"px "+-eK(u)+"px",threshold:eM(0,eD(1,c))||1},p=!0;function x(n){let r=n[0].intersectionRatio;if(r!==c){if(!p)return l();r?l(!1,r):t=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||np(s,e.getBoundingClientRect())||l(),p=!1}try{r=new IntersectionObserver(x,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(x,m)}r.observe(e)}(!0),o}(u,t):null,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(n)})),t()}),u&&!s&&m.observe(u),m.observe(n));let p=s?no(e):null;return s&&function n(){let r=no(e);p&&!np(p,r)&&t(),p=r,i=requestAnimationFrame(n)}(),t(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",t),l&&e.removeEventListener("resize",t)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(i)}}(e,n,t,{ancestorResize:!1,ancestorScroll:!1,elementResize:!1})}}),en=ee.refs,et=ee.floatingStyles,er=ee.context,ei=function(e,n){void 0===n&&(n={});let{open:t,elements:{floating:r}}=e,{duration:i=250}=n,o=("number"==typeof i?i:i.close)||0,[l,a]=s.useState("unmounted"),c=function(e,n){let[t,r]=s.useState(e);return e&&!t&&r(!0),s.useEffect(()=>{if(!e&&t){let e=setTimeout(()=>r(!1),n);return()=>clearTimeout(e)}},[e,t,n]),t}(t,o);return c||"close"!==l||a("unmounted"),eA(()=>{if(r){if(t){a("initial");let e=requestAnimationFrame(()=>{e$.flushSync(()=>{a("open")})});return()=>{cancelAnimationFrame(e)}}a("close")}},[t,r]),{isMounted:c,status:l}}(er,{duration:I||200}),eo=ei.isMounted,el=ei.status,ea=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:l=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:p}=n,x=s.useContext(nA),g=eE("function"==typeof c?c:()=>!1),j="function"==typeof c?g:c,b=s.useRef(!1),{escapeKey:y,outsidePress:v}=nV(m),{escapeKey:w,outsidePress:k}=nV(p),_=s.useRef(!1),C=eE(e=>{var n;if(!t||!l||!a||"Escape"!==e.key||_.current)return;let i=null==(n=o.current.floatingContext)?void 0:n.nodeId,c=x?eS(x.nodesRef.current,i):[];if(!y&&(e.stopPropagation(),c.length>0)){let e=!0;if(c.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,"nativeEvent"in e?e.nativeEvent:e,"escape-key")}),I=eE(e=>{var n;let t=()=>{var n;C(e),null==(n=e_(e))||n.removeEventListener("keydown",t)};null==(n=e_(e))||n.addEventListener("keydown",t)}),S=eE(e=>{var n;let t=o.current.insideReactTree;o.current.insideReactTree=!1;let l=b.current;if(b.current=!1,"click"===u&&l||t||"function"==typeof j&&!j(e))return;let a=e_(e),c="["+nB("inert")+"]",s=eI(i.floating).querySelectorAll(c),d=E(a)?a:null;for(;d&&!V(d);){let e=q(d);if(V(e)||!E(e))break;d=e}if(s.length&&E(a)&&!a.matches("html,body")&&!ek(a,i.floating)&&Array.from(s).every(e=>!ek(d,e)))return;if(z(a)&&P){let n=V(a),t=H(a),r=/auto|scroll/,i=n||r.test(t.overflowX),o=n||r.test(t.overflowY),l=i&&a.clientWidth>0&&a.scrollWidth>a.clientWidth,c=o&&a.clientHeight>0&&a.scrollHeight>a.clientHeight,s="rtl"===t.direction,u=c&&(s?e.offsetX<=a.offsetWidth-a.clientWidth:e.offsetX>a.clientWidth),d=l&&e.offsetY>a.clientHeight;if(u||d)return}let f=null==(n=o.current.floatingContext)?void 0:n.nodeId,h=x&&eS(x.nodesRef.current,f).some(n=>{var t;return eC(e,null==(t=n.context)?void 0:t.elements.floating)});if(eC(e,i.floating)||eC(e,i.domReference)||h)return;let m=x?eS(x.nodesRef.current,f):[];if(m.length>0){let e=!0;if(m.forEach(n=>{var t;if(null!=(t=n.context)&&t.open&&!n.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,"outside-press")}),O=eE(e=>{var n;let t=()=>{var n;S(e),null==(n=e_(e))||n.removeEventListener(u,t)};null==(n=e_(e))||n.addEventListener(u,t)});s.useEffect(()=>{if(!t||!l)return;o.current.__escapeKeyBubbles=y,o.current.__outsidePressBubbles=v;let e=-1;function n(e){r(!1,e,"ancestor-scroll")}function c(){window.clearTimeout(e),_.current=!0}function s(){e=window.setTimeout(()=>{_.current=!1},5*!!U())}let d=eI(i.floating);a&&(d.addEventListener("keydown",w?I:C,w),d.addEventListener("compositionstart",c),d.addEventListener("compositionend",s)),j&&d.addEventListener(u,k?O:S,k);let f=[];return h&&(E(i.domReference)&&(f=G(i.domReference)),E(i.floating)&&(f=f.concat(G(i.floating))),!E(i.reference)&&i.reference&&i.reference.contextElement&&(f=f.concat(G(i.reference.contextElement)))),(f=f.filter(e=>{var n;return e!==(null==(n=d.defaultView)?void 0:n.visualViewport)})).forEach(e=>{e.addEventListener("scroll",n,{passive:!0})}),()=>{a&&(d.removeEventListener("keydown",w?I:C,w),d.removeEventListener("compositionstart",c),d.removeEventListener("compositionend",s)),j&&d.removeEventListener(u,k?O:S,k),f.forEach(e=>{e.removeEventListener("scroll",n)}),window.clearTimeout(e)}},[o,i,a,j,u,t,r,h,l,y,v,C,w,I,S,k,O]),s.useEffect(()=>{o.current.insideReactTree=!1},[o,j,u]);let A=s.useMemo(()=>({onKeyDown:C,...d&&{[nU[f]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==f&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}}),[C,r,d,f]),P=s.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[nF[u]]:()=>{o.current.insideReactTree=!0}}),[C,u,o]);return s.useMemo(()=>l?{reference:A,floating:P}:{},[l,A,P])}(er,{ancestorScroll:!0,outsidePress:function(e){var n,t;return!C||(n=e.target,(null!=(t=Element)&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](n):n instanceof t)&&!e.target.closest(C))}}),ec=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:l=!0,event:a="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=n,h=s.useRef(),m=s.useRef(!1),p=s.useMemo(()=>({onPointerDown(e){h.current=e.pointerType},onMouseDown(e){let n=h.current;0!==e.button||"click"===a||eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"mousedown"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):(e.preventDefault(),r(!0,e.nativeEvent,"click")))},onClick(e){let n=h.current;if("mousedown"===a&&h.current){h.current=void 0;return}eO(n,!0)&&u||(t&&c&&(!i.current.openEvent||!f||"click"===i.current.openEvent.type)?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))},onKeyDown(e){h.current=void 0,!(e.defaultPrevented||!d||nJ(e))&&(" "!==e.key||nX(o)||(e.preventDefault(),m.current=!0),z(e.target)&&"A"===e.target.tagName||"Enter"!==e.key||(t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click")))},onKeyUp(e){!(e.defaultPrevented||!d||nJ(e)||nX(o))&&" "===e.key&&m.current&&(m.current=!1,t&&c?r(!1,e.nativeEvent,"click"):r(!0,e.nativeEvent,"click"))}}),[i,o,a,u,d,r,t,f,c]);return s.useMemo(()=>l?{reference:p}:{},[l,p])}(er,{enabled:!$}),es=function(e,n){void 0===n&&(n={});let{open:t,onOpenChange:r,dataRef:i,events:o,elements:l}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:h=!0}=n,m=s.useContext(nA),p=nP(),x=eP(u),g=eP(c),j=eP(t),b=eP(f),y=s.useRef(),v=s.useRef(-1),w=s.useRef(),k=s.useRef(-1),_=s.useRef(!0),C=s.useRef(!1),I=s.useRef(()=>{}),S=s.useRef(!1),O=eE(()=>{var e;let n=null==(e=i.current.openEvent)?void 0:e.type;return(null==n?void 0:n.includes("mouse"))&&"mousedown"!==n});s.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{open:n}=e;n||(nE(v),nE(k),_.current=!0,S.current=!1)}},[a,o]),s.useEffect(()=>{if(!a||!x.current||!t)return;function e(e){O()&&r(!1,e,"hover")}let n=eI(l.floating).documentElement;return n.addEventListener("mouseleave",e),()=>{n.removeEventListener("mouseleave",e)}},[l.floating,t,r,a,x,O]);let A=s.useCallback(function(e,n,t){void 0===n&&(n=!0),void 0===t&&(t="hover");let i=nT(g.current,"close",y.current);i&&!w.current?(nE(v),v.current=window.setTimeout(()=>r(!1,e,t),i)):n&&(nE(v),r(!1,e,t))},[g,r]),P=eE(()=>{I.current(),w.current=void 0}),B=eE(()=>{if(C.current){let e=eI(l.floating).body;e.style.pointerEvents="",e.removeAttribute(nz),C.current=!1}}),z=eE(()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type));s.useEffect(()=>{if(a&&E(l.domReference)){let r=l.domReference,i=l.floating;return t&&r.addEventListener("mouseleave",o),h&&r.addEventListener("mousemove",e,{once:!0}),r.addEventListener("mouseenter",e),r.addEventListener("mouseleave",n),i&&(i.addEventListener("mouseleave",o),i.addEventListener("mouseenter",c),i.addEventListener("mouseleave",s)),()=>{t&&r.removeEventListener("mouseleave",o),h&&r.removeEventListener("mousemove",e),r.removeEventListener("mouseenter",e),r.removeEventListener("mouseleave",n),i&&(i.removeEventListener("mouseleave",o),i.removeEventListener("mouseenter",c),i.removeEventListener("mouseleave",s))}}function e(e){if(nE(v),_.current=!1,d&&!eO(y.current)||nN(b.current)>0&&!nT(g.current,"open"))return;let n=nT(g.current,"open",y.current);n?v.current=window.setTimeout(()=>{j.current||r(!0,e,"hover")},n):t||r(!0,e,"hover")}function n(e){if(z())return void B();I.current();let n=eI(l.floating);if(nE(k),S.current=!1,x.current&&i.current.floatingContext){t||nE(v),w.current=x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){B(),P(),z()||A(e,!0,"safe-polygon")}});let r=w.current;n.addEventListener("mousemove",r),I.current=()=>{n.removeEventListener("mousemove",r)};return}"touch"===y.current&&ek(l.floating,e.relatedTarget)||A(e)}function o(e){z()||i.current.floatingContext&&(null==x.current||x.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){B(),P(),z()||A(e)}})(e))}function c(){nE(v)}function s(e){z()||A(e,!1)}},[l,a,e,d,h,A,P,B,r,t,j,m,g,x,i,z,b]),eA(()=>{var e,n;if(a&&t&&null!=(e=x.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&O()){C.current=!0;let e=l.floating;if(E(l.domReference)&&e){let t=eI(l.floating).body;t.setAttribute(nz,"");let r=l.domReference,i=null==m||null==(n=m.nodesRef.current.find(e=>e.id===p))||null==(n=n.context)?void 0:n.elements.floating;return i&&(i.style.pointerEvents=""),t.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{t.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,t,p,l,m,x,O]),eA(()=>{t||(y.current=void 0,S.current=!1,P(),B())},[t,P,B]),s.useEffect(()=>()=>{P(),nE(v),nE(k),B()},[a,l.domReference,P,B]);let T=s.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:n}=e;function i(){_.current||j.current||r(!0,n,"hover")}d&&!eO(y.current)||t||0===nN(b.current)||S.current&&e.movementX**2+e.movementY**2<2||(nE(k),"touch"===y.current?i():(S.current=!0,k.current=window.setTimeout(i,nN(b.current))))}}},[d,r,t,j,b]);return s.useMemo(()=>a?{reference:T}:{},[a,T])}(er,{enabled:!$,restMs:D||200}),eu=void 0!==L,ed=(n=(k=eu?[]:[ea,M?es:ec]).map(e=>null==e?void 0:e.reference),t=k.map(e=>null==e?void 0:e.floating),r=k.map(e=>null==e?void 0:e.item),i=s.useCallback(e=>nH(e,k,"reference"),n),o=s.useCallback(e=>nH(e,k,"floating"),t),l=s.useCallback(e=>nH(e,k,"item"),r),s.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:l}),[i,o,l])),ef=ed.getReferenceProps,eh=ed.getFloatingProps,em=ef(nq({ref:en.setReference},F&&{onClick:function(e){return e.stopPropagation()}})),ep=eh({onClick:function(){O&&er.onOpenChange(!1)},ref:en.setFloating});(0,s.useEffect)(function(){eu&&er.onOpenChange(L)},[L]),_=(0,s.isValidElement)(S)?(0,s.cloneElement)(S,em):(0,a.jsx)("div",nG(nq({},em),{children:S}));var ex=(0,a.jsx)("div",nG(nq({className:(0,g.Ly)(["Floating",!I&&"Floating--animated",T]),"data-position":er.placement,"data-transition":el,style:nq({},et,R)},ep),{children:A}));return(0,a.jsxs)(a.Fragment,{children:[_,eo&&!!A&&(X?ex:(0,a.jsx)(nL,{id:"tgui-root",children:ex}))]})}function nQ(e){var n=e.content,t=e.children,r=e.position;return(0,a.jsx)(nY,{content:n,contentClasses:"Tooltip",hoverOpen:!0,placement:r,children:t})}function nZ(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function n5(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return nZ(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return nZ(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n4(e,n){var t,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var s=[a,c];if(t)throw TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(o=0)),o;)try{if(t=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.length)&&(n=e.length);for(var t=0,r=Array(n);t2&&void 0!==arguments[2]&&arguments[2];return function(){for(var i=arguments.length,o=Array(i),l=0;l=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["params","phonehome"]),i=(0,s.useRef)(null),o=(0,s.useRef)(function(e){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],t=tr.length;tr.push(null);var r=e||"byondui_".concat(t);return{render:function(e){n&&Byond.sendMessage("renderByondUi",{renderByondUi:r}),tr[t]=r,Byond.winset(r,e)},unmount:function(){n&&Byond.sendMessage("unmountByondUi",{renderByondUi:r}),tr[t]=null,Byond.winset(r,{parent:""})}}}(null==n?void 0:n.id,t));function l(){var e=i.current;if(e){var t,r,l,a=(r=null!=(t=window.devicePixelRatio)?t:1,{pos:[(l=e.getBoundingClientRect()).left*r,l.top*r],size:[(l.right-l.left)*r,(l.bottom-l.top)*r]});o.current.render(tt(tn({parent:Byond.windowId},n),{pos:"".concat(a.pos[0],",").concat(a.pos[1]),size:"".concat(a.size[0],"x").concat(a.size[1])}))}}var c=te(function(){l()},100);return(0,s.useEffect)(function(){return window.addEventListener("resize",c),l(),function(){window.removeEventListener("resize",c),o.current.unmount()}},[]),(0,a.jsx)("div",tt(tn({ref:i},(0,j.Fl)(r)),{children:(0,a.jsx)("div",{style:{minHeight:"22px"}})}))}window.addEventListener("beforeunload",function(){for(var e=0;ee.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),h=(0,s.useRef)(null),m=ta((0,s.useState)([600,200]),2),p=m[0],x=m[1],g=function(e,n,t,r){if(0===e.length)return[];var i,o,l=to.y.apply(void 0,tc(e)),a=l.map(function(e){return(i=Math).min.apply(i,tc(e))}),c=l.map(function(e){return(o=Math).max.apply(o,tc(e))});return void 0!==t&&(a[0]=t[0],c[0]=t[1]),void 0!==r&&(a[1]=r[0],c[1]=r[1]),e.map(function(e){return(0,to.y)(e,a,c,n).map(function(e){var n=ta(e,4),t=n[0],r=n[1];return(t-r)/(n[2]-r)*n[3]})})}(void 0===r?[]:r,p,i,o);if(g.length>0){var j=g[0],b=g[g.length-1];g.push([p[0]+d,b[1]]),g.push([p[0]+d,-d]),g.push([-d,-d]),g.push([-d,j[1]])}var v=function(e){for(var n="",t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","child_mt","childStyles","color","title","buttons","icon"]),m=(n=(0,s.useState)(e.open),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tf(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tf(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],x=m[1];return(0,a.jsxs)(y,{mb:1,children:[(0,a.jsxs)("div",{className:"Table",children:[(0,a.jsx)("div",{className:"Table__cell",children:(0,a.jsx)(n6,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["content","children","className"]);return o.color=r?null:"default",o.backgroundColor=e.color||"default",(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children"]);return(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["fixBlur","fixErrors","objectFit","src"]),d=(0,s.useRef)(0),f=(0,s.useRef)(null),h=(0,j.Fl)(u);return n=tg({},h.style),t=t={imageRendering:void 0===r||r?"pixelated":"auto",objectFit:void 0===o?"fill":o},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),h.style=n,(0,s.useEffect)(function(){return function(){f.current&&clearTimeout(f.current)}},[]),(0,a.jsx)("img",tg({alt:"dm icon",onError:function(e){if(!i||d.current>=5){f.current&&clearTimeout(f.current);return}var n=e.currentTarget;f.current=setTimeout(function(){n.src="".concat(c,"?attempt=").concat(d.current),d.current++},1e3)},src:c},h))}function tb(e){var n,t=e.direction,r=e.fallback,i=e.frame,o=e.icon_state,l=e.icon,c=e.movement,s=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["direction","fallback","frame","icon_state","icon","movement"]),u=null==(n=Byond.iconRefMap)?void 0:n[l];return u?(0,a.jsx)(tj,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);tk.length-3?k.length-1:e-2;var t=z.current,r=null==t?void 0:t.children[n];t&&r&&(t.scrollTop=r.offsetTop)}function R(e){if(!(k.length<1)&&!c){var n,t=k.length-1;n=T<0?"next"===e?t:0:"next"===e?T===t?0:T+1:0===T?t:T-1,B&&r&&N(n),null==y||y(tC(k[n]))}}var $=_?"top":"bottom";return m&&($="".concat($,"-start")),(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown",O&&"Dropdown--fluid"]),children:[(0,a.jsx)(nY,{allowedOutsideClasses:".Dropdown__button",closeAfterInteract:!0,content:(0,a.jsx)("div",{className:"Dropdown__menu",ref:z,children:0===k.length?(0,a.jsx)("div",{className:"Dropdown__menu--entry",children:"No options"}):k.map(function(e){var n=tC(e);return(0,a.jsx)("div",{className:(0,g.Ly)(["Dropdown__menu--entry",S===n&&"selected"]),onClick:function(){null==y||y(n)},onKeyDown:function(e){e.key===w._.Enter&&(null==y||y(n))},children:"string"==typeof e?e:e.displayText},n)})}),contentAutoWidth:!p,contentClasses:"Dropdown__menu--wrapper",contentStyles:{width:p?(0,j.zA)(p):void 0},disabled:c,onMounted:function(){B&&r&&-1!==T&&N(T)},onOpenChange:E,placement:$,children:(0,a.jsxs)("div",{className:(0,g.Ly)(["Dropdown__control","Button--color--".concat(void 0===l?"default":l),c&&"Button--disabled",m&&"Dropdown__control--icon-only",o]),onClick:function(e){(!c||B)&&(null==b||b(e))},onKeyDown:function(e){e.key!==w._.Enter||c||null==b||b(e)},style:{width:(0,j.zA)(void 0===A?15:A)},children:[d&&(0,a.jsx)(I,{className:"Dropdown__icon",name:d,rotation:f,spin:h}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"Dropdown__selected-text",children:u||S&&tC(S)||(void 0===C?"Select...":C)}),!x&&(0,a.jsx)(I,{className:(0,g.Ly)(["Dropdown__icon","Dropdown__icon--arrow",_&&"over",B&&"open"]),name:"chevron-down"})]})]})}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-left",onClick:function(){R("previous")}}),(0,a.jsx)(n6,{className:"Dropdown__button",disabled:c,icon:"chevron-right",onClick:function(){R("next")}})]})]})}function tS(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tP(e){return(0,g.Ly)(["Flex",e.inlineFlex&&"Flex--inline",(0,j.WP)(e)])}function tB(e){var n=e.direction,t=e.wrap,r=e.align,i=e.justify,o=tA(e,["direction","wrap","align","justify"]);return(0,j.Fl)(tS({style:tO(tS({},o.style),{alignItems:r,flexDirection:n,flexWrap:!0===t?"wrap":t,justifyContent:i})},o))}function tE(e){var n=e.className,t=tA(e,["className"]);return(0,a.jsx)("div",tS({className:(0,g.Ly)([n,tP(t)])},tB(t)))}function tz(e){var n,t=e.style,r=e.grow,i=e.order,o=e.shrink,l=e.basis,a=e.align,c=tA(e,["style","grow","order","shrink","basis","align"]),s=null!=(n=null!=l?l:e.width)?n:void 0!==r?0:void 0;return(0,j.Fl)(tS({style:tO(tS({},t),{alignSelf:a,flexBasis:(0,j.zA)(s),flexGrow:void 0!==r&&Number(r),flexShrink:void 0!==o&&Number(o),order:i})},c))}function tT(e){var n,t,r=e.asset,i=e.assetSize,o=e.base64,l=e.buttons,c=e.buttonsAlt,s=e.children,u=e.className,d=e.color,f=e.disabled,h=e.dmFallback,m=e.dmIcon,p=e.dmIconState,x=e.fluid,b=e.fallbackIcon,y=e.imageSize,v=void 0===y?64:y,w=e.imageSrc,k=e.onClick,_=e.onRightClick,C=e.selected,I=e.title,S=e.tooltip,O=e.tooltipPosition,A=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["asset","assetSize","base64","buttons","buttonsAlt","children","className","color","disabled","dmFallback","dmIcon","dmIconState","fluid","fallbackIcon","imageSize","imageSrc","onClick","onRightClick","selected","title","tooltip","tooltipPosition"]),P=(0,a.jsxs)("div",{className:"ImageButton__container",onClick:function(e){!f&&k&&k(e)},onContextMenu:function(e){e.preventDefault(),!f&&_&&_(e)},onKeyDown:function(e){"Enter"===e.key&&!f&&k&&k(e)},style:{width:x?"auto":"calc(".concat(v,"px + 0.5em + 2px)")},tabIndex:f?void 0:0,children:[(0,a.jsx)("div",{className:"ImageButton__image",children:o||w?(0,a.jsx)(tj,{height:"".concat(v,"px"),src:o?"data:image/png;base64,".concat(o):w,width:"".concat(v,"px")}):m&&p?(0,a.jsx)(tb,{fallback:h||(0,a.jsx)(tN,{icon:"spinner",size:v,spin:!0}),height:"".concat(v,"px"),icon:m,icon_state:p,width:"".concat(v,"px")}):r?(0,a.jsx)(tj,{className:(0,g.Ly)(r||[]),height:"".concat(v,"px"),style:{transform:"scale(".concat(v/(void 0===i?32:i),")"),transformOrigin:"top left"},width:"".concat(v,"px")}):(0,a.jsx)(tN,{icon:b||"question",size:v})}),x&&(I||s)?(0,a.jsxs)("div",{className:"ImageButton__content",children:[I&&(0,a.jsx)("span",{className:(0,g.Ly)(["ImageButton__content--title",!!s&&"ImageButton__content--divider"]),children:I}),s&&(0,a.jsx)("span",{className:"ImageButton__content--text",children:s})]}):s&&(0,a.jsx)("span",{className:"ImageButton__content",children:s})]});return S&&(P=(0,a.jsx)(nQ,{content:S,position:O,children:P})),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","value","minValue","maxValue","color","ranges","empty","children","fractionDigits"]),h=(0,c.hs)(t,void 0===r?0:r,void 0===i?1:i),m=void 0!==u,p=o||(0,c.TG)(t,void 0===l?{}:l)||"default",x=(0,j.Fl)(f),b=["ProgressBar",n,(0,j.WP)(f)],y={width:"".concat(100*(0,c.J$)(h),"%")};return tR.NE.includes(p)||"default"===p?b.push("ProgressBar--color--".concat(p)):(x.style=tD(t$({},x.style),{borderColor:p}),y.backgroundColor=p),(0,a.jsxs)("div",tD(t$({className:(0,g.Ly)(b)},x),{children:[(0,a.jsx)("div",{className:"ProgressBar__fill ProgressBar__fill--animated",style:y}),(0,a.jsx)("div",{className:"ProgressBar__content",children:m?u:!s&&"".concat((100*h).toFixed(void 0===d?0:d),"%")})]}))}function tL(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tJ(e){var n=e.className,t=e.vertical,r=e.fill,i=e.reverse,o=e.zebra,l=tK(e,["className","vertical","fill","reverse","zebra"]);return(0,a.jsx)("div",tL({className:(0,g.Ly)(["Stack",r&&"Stack--fill",t?"Stack--vertical":"Stack--horizontal",o&&"Stack--zebra",i&&"Stack--reverse".concat(t?"--vertical":""),n,tP(e)])},tB(tL({direction:"".concat(t?"column":"row").concat(i?"-reverse":"")},l))))}function tX(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","value"]),O=(0,s.useRef)(null),A=null!=k?k:O,P=(n=(0,s.useState)(null!=I?I:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return tX(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tX(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),B=P[0],E=P[1];(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=A.current)||e.focus(),o&&(null==(n=A.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){A.current&&document.activeElement!==A.current&&I!==B&&E(null!=I?I:"")},[I]);var z=(0,j.Fl)(S),T=(0,g.Ly)(["Input",c&&"Input--disabled",d&&"Input--fluid",h&&"Input--monospace",(0,j.WP)(S),l]);return(0,a.jsx)("input",(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unclamped","unit","value","bipolar","popupPosition","className","color","fillValue","ranges","size","style"]);return(0,a.jsx)(tk,{dragMatrix:[0,-1],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unclamped:d,unit:f,value:h,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.handleDragStart,d=e.inputElement,f=(0,c.hs)(null!=y?y:l,o,i),v=(0,c.hs)(l,o,i),k=b||(0,c.TG)(null!=y?y:h,w)||"default",S=Math.min((v-.5)*270,225);return(0,a.jsx)(nY,{content:r,contentClasses:"Knob__popupValue",handleOpen:s,placement:p||"top",preventPortal:!0,children:(0,a.jsxs)("div",(n=tV({className:(0,g.Ly)(["Knob","Knob--color--".concat(k),m&&"Knob--bipolar",x,(0,j.WP)(I)])},(0,j.Fl)(tV({style:tV({fontSize:"".concat(_,"em")},C)},I))),t=t={onMouseDown:u,children:[(0,a.jsx)("div",{className:"Knob__circle",children:(0,a.jsx)("div",{className:"Knob__cursorBox",style:{transform:"rotate(".concat(S,"deg)")},children:(0,a.jsx)("div",{className:"Knob__cursor"})})}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringTrackPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("circle",{className:"Knob__ringTrack",cx:"50",cy:"50",r:"50"}),(0,a.jsx)("title",{children:"track"})]}),(0,a.jsxs)("svg",{className:"Knob__ring Knob__ringFillPivot",viewBox:"0 0 100 100",children:[(0,a.jsx)("title",{children:"fill"}),(0,a.jsx)("circle",{className:"Knob__ringFill",cx:"50",cy:"50",r:"50",style:{strokeDashoffset:Math.max(((m?2.75:2)-1.5*f)*Math.PI*50,0)}})]}),d]},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))})}})}function tW(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function tY(e){var n=e.children,t=e.wrap,r=tG(e,["children","wrap"]);return(0,a.jsx)(tE,tq(tW({align:"stretch",justify:"space-between",mx:-.5,wrap:t},r),{children:n}))}function tQ(e){var n=e.children;return(0,a.jsx)("table",{className:"LabeledList",children:(0,a.jsx)("tbody",{children:n})})}function tZ(e){var n,t,r=e.children,i=e.className,o=e.disabled,l=e.display,c=e.onClick,u=e.onMouseOver,d=(e.open,e.openWidth),f=(e.onOutsideClick,function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","className","disabled","display","onClick","onMouseOver","open","openWidth","onOutsideClick"])),h=(0,s.useRef)(null);return(0,a.jsx)(nY,{allowedOutsideClasses:".Menubar_inner",content:(0,a.jsx)("div",{className:"MenuBar__menu",style:{width:d},children:r}),children:(0,a.jsx)("div",{className:"Menubar_inner",ref:h,children:(0,a.jsx)(y,(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","children","onEnter","onEscape"]);return(0,a.jsx)(tp,{className:"Modal__dimmer",onKeyDown:function(e){e.key===w._.Enter&&(null==o||o(e)),(0,w.KL)(e.key)&&(null==l||l(e))},children:(0,a.jsx)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","color","info","success","danger"]);return(0,a.jsx)(y,function(e){for(var n=1;n=o?(t.currentValue=(0,c.qE)((0,c.LI)(u/o,0)*o,r,i),t.origin=n.screenY):Math.abs(a)>s&&(t.origin=n.screenY)}else Math.abs(a)>4&&(t.dragging=!0);return t})}),t8(e,"handleDragEnd",function(n){var t=e.state,r=t.dragging,i=t.currentValue,o=e.props,l=o.onChange;if(!o.disabled){if(document.body.style["pointer-events"]="auto",clearInterval(e.dragInterval),clearTimeout(e.dragTimeout),e.setState({dragging:!1,editing:!r,previousValue:i}),r)null==l||l(i);else if(e.inputRef){var a=e.inputRef.current;a&&(a.value="".concat(i),setTimeout(function(){a.focus(),a.select()},10))}document.removeEventListener("mousemove",e.handleDragMove),document.removeEventListener("mouseup",e.handleDragEnd)}}),t8(e,"handleBlur",function(n){var t=e.state,r=t.editing,i=t.previousValue,o=e.props,l=o.minValue,a=o.maxValue,s=o.onChange;if(!o.disabled&&r){var u=(0,c.qE)(Number.parseFloat(n.target.value),l,a);if(Number.isNaN(u))return void e.setState({editing:!1});e.setState({currentValue:u,editing:!1,previousValue:u}),i!==u&&(null==s||s(u))}}),t8(e,"handleKeyDown",function(n){var t=e.props,r=t.minValue,i=t.maxValue,o=t.onChange;if(!t.disabled){var l=e.state.previousValue;if(n.key===w._.Enter){var a=(0,c.qE)(Number.parseFloat(n.currentTarget.value),r,i);if(Number.isNaN(a))return void e.setState({editing:!1});e.setState({currentValue:a,editing:!1,previousValue:a}),l!==a&&(null==o||o(a))}else(0,w.KL)(n.key)&&e.setState({editing:!1})}}),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&t5(t,e),n=[{key:"componentDidMount",value:function(){var e=Number.parseFloat(this.props.value.toString());this.setState({currentValue:e,previousValue:e})}},{key:"render",value:function(){var e=this.state,n=e.dragging,t=e.editing,r=e.currentValue,i=this.props,o=i.className,l=i.fluid,s=i.animated,u=i.unit,d=i.value,f=i.minValue,m=i.maxValue,p=i.height,x=i.width,j=i.lineHeight,b=i.fontSize,v=i.format,w=Number.parseFloat(d.toString());n&&(w=r);var k=(0,a.jsxs)("div",{className:"NumberInput__content",children:[s&&!n?(0,a.jsx)(h,{format:v,value:w}):v?v(w):w,u?" ".concat(u):""]});return(0,a.jsxs)(y,{className:(0,g.Ly)(["NumberInput",l&&"NumberInput--fluid",o]),fontSize:b,lineHeight:j,minHeight:p,minWidth:x,onMouseDown:this.handleDragStart,children:[(0,a.jsx)("div",{className:"NumberInput__barContainer",children:(0,a.jsx)("div",{className:"NumberInput__bar",style:{height:"".concat((0,c.qE)((w-f)/(m-f)*100,0,100),"%")}})}),k,(0,a.jsx)("input",{className:"NumberInput__input",onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,ref:this.inputRef,style:{display:t?"inline":"none",fontSize:b,height:p,lineHeight:j}})]})}}],function(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["allowFloats","autoFocus","autoSelect","className","disabled","expensive","fluid","maxValue","minValue","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","onValidationChange","value"]),S=(0,s.useRef)(null),O=t9((0,s.useState)(null!=C?C:m),2),A=O[0],P=O[1],B=t9((0,s.useState)(!0),2),E=B[0],z=B[1];function T(e){b&&(u?re(function(){return b(e)}):b(e))}(0,s.useEffect)(function(){var e;return(i||o)&&(e=setTimeout(function(){var e,n;null==(e=S.current)||e.focus(),o&&(null==(n=S.current)||n.select())},1)),function(){return clearTimeout(e)}},[]),(0,s.useEffect)(function(){if(S.current){var e=S.current.validity.valid;E!==e&&(z(e),null==_||_(e))}},[A]),(0,s.useEffect)(function(){S.current&&document.activeElement!==S.current&&C!==A&&P(null!=C?C:m)},[C]);var N=(0,j.Fl)(I),R=(0,g.Ly)(["Input","RestrictedInput",c&&"Input--disabled",d&&"Input--fluid",p&&"Input--monospace",(0,j.WP)(I),l,!E&&"RestrictedInput--invalid"]);return(0,a.jsx)("input",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["buttons","children","className","container_id","fill","fitted","flexGrow","noTopPadding","onScroll","ref","scrollable","scrollableHorizontal","stretchContents","title"]),w=(0,g.b5)(y)||(0,g.b5)(r),k=(0,s.useRef)(null),_=null!=m?m:k;return(0,s.useEffect)(function(){return _.current&&(p||x)&&(0,rt.tk)(_.current),function(){_.current&&(0,rt.WK)(_.current)}},[]),(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["animated","tickWhileDragging","format","maxValue","minValue","onChange","step","stepPixelSize","unit","value","className","fillValue","color","ranges","children"]),w=void 0!==y;return(0,a.jsx)(tk,{dragMatrix:[1,0],animated:n,tickWhileDragging:t,format:r,maxValue:i,minValue:o,onChange:l,step:s,stepPixelSize:u,unit:d,value:f,children:function(e){var n,t,r=e.displayElement,l=e.displayValue,s=e.dragging,u=e.editing,d=e.handleDragStart,x=e.inputElement,k=(0,c.J$)((0,c.hs)(null!=m?m:l,o,i)),_=(0,c.J$)((0,c.hs)(l,o,i)),C=p||(0,c.TG)(null!=m?m:f,b)||"default";return(0,a.jsxs)("div",(n=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function ra(e){var n,t,r=e.className,i=e.collapsing,o=e.children,l=rl(e,["className","collapsing","children"]);return(0,a.jsx)("table",(n=ro({className:(0,g.Ly)(["Table",i&&"Table--collapsing",r,(0,j.WP)(l)])},(0,j.Fl)(l)),t=t={children:(0,a.jsx)("tbody",{children:o})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}function rc(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function rf(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return rc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rc(e,n)}}(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rh(e){var n=e.className,t=e.vertical,r=e.scrollable,i=e.fill,o=e.fluid,l=e.children,c=rd(e,["className","vertical","scrollable","fill","fluid","children"]),u=(0,s.useRef)(!0),d=(0,s.useRef)(null),f=(0,s.useRef)(null),h=rf((0,s.useState)(!1),2),m=h[0],p=h[1],x=rf((0,s.useState)(!1),2),b=x[0],y=x[1];function v(e){if(d.current){var n=d.current,t=.5*n.clientWidth;n.scrollBy({left:"left"===e?-t:t,behavior:"smooth"})}}(0,s.useEffect)(function(){var e=function(){p(i.scrollLeft>0),y(i.scrollLeft+i.clientWidthMath.abs(e.deltaX)&&(i.scrollLeft+=e.deltaY)};if(r&&!t&&d.current){var i=d.current;if(!(i.scrollWidthe.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["autoFocus","autoSelect","className","disabled","dontUseTabForIndent","expensive","fluid","maxLength","monospace","onBlur","onChange","onEnter","onEscape","onKeyDown","placeholder","ref","selfClear","spellcheck","userMarkup","value"]),P=(0,s.useRef)(null),B=null!=_?_:P,E=(n=(0,s.useState)(null!=O?O:""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return rp(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rp(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=E[0],T=E[1];(0,s.useEffect)(function(){(i||o)&&setTimeout(function(){var e,n;null==(e=B.current)||e.focus(),o&&(null==(n=B.current)||n.select())},1)},[]),(0,s.useEffect)(function(){B.current&&document.activeElement!==B.current&&O!==z&&T(null!=O?O:"")},[O]);var N=(0,j.Fl)(A),R=(0,g.Ly)(["Input","TextArea",f&&"Input--fluid",m&&"Input--monospace",c&&"Input--disabled",(0,j.WP)(A),l]);return(0,a.jsx)("textarea",(t=function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/g,U=RegExp(J.source),F=RegExp(X.source),V=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,Z=RegExp(Q.source),ee=/^\s+/,en=/\s/,et=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,er=/\{\n\/\* \[wrapped with (.+)\] \*/,ei=/,? & /,eo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,el=/[()=,{}\[\]\/\s]/,ea=/\\(\\)?/g,ec=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,es=/\w*$/,eu=/^[-+]0x[0-9a-f]+$/i,ed=/^0b[01]+$/i,ef=/^\[object .+?Constructor\]$/,eh=/^0o[0-7]+$/i,em=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ex=/($^)/,eg=/['\n\r\u2028\u2029\\]/g,ej="\ud800-\udfff",eb="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ey="\\u2700-\\u27bf",ev="a-z\\xdf-\\xf6\\xf8-\\xff",ew="A-Z\\xc0-\\xd6\\xd8-\\xde",ek="\\ufe0e\\ufe0f",e_="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",eC="['’]",eI="["+e_+"]",eS="["+eb+"]",eO="["+ev+"]",eA="[^"+ej+e_+"\\d+"+ey+ev+ew+"]",eP="\ud83c[\udffb-\udfff]",eB="[^"+ej+"]",eE="(?:\ud83c[\udde6-\uddff]){2}",ez="[\ud800-\udbff][\udc00-\udfff]",eT="["+ew+"]",eN="\\u200d",eR="(?:"+eO+"|"+eA+")",e$="(?:"+eT+"|"+eA+")",eD="(?:"+eC+"(?:d|ll|m|re|s|t|ve))?",eM="(?:"+eC+"(?:D|LL|M|RE|S|T|VE))?",eL="(?:"+eS+"|"+eP+")?",eK="["+ek+"]?",eJ="(?:"+eN+"(?:"+[eB,eE,ez].join("|")+")"+eK+eL+")*",eX=eK+eL+eJ,eU="(?:"+["["+ey+"]",eE,ez].join("|")+")"+eX,eF="(?:"+[eB+eS+"?",eS,eE,ez,"["+ej+"]"].join("|")+")",eV=RegExp(eC,"g"),eH=RegExp(eS,"g"),eW=RegExp(eP+"(?="+eP+")|"+eF+eX,"g"),eq=RegExp([eT+"?"+eO+"+"+eD+"(?="+[eI,eT,"$"].join("|")+")",e$+"+"+eM+"(?="+[eI,eT+eR,"$"].join("|")+")",eT+"?"+eR+"+"+eD,eT+"+"+eM,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",eU].join("|"),"g"),eG=RegExp("["+eN+ej+eb+ek+"]"),eY=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eQ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eZ=-1,e0={};e0[P]=e0[B]=e0[E]=e0[z]=e0[T]=e0[N]=e0[R]=e0[$]=e0[D]=!0,e0[f]=e0[h]=e0[O]=e0[m]=e0[A]=e0[p]=e0[x]=e0[g]=e0[b]=e0[y]=e0[v]=e0[k]=e0[_]=e0[C]=e0[S]=!1;var e1={};e1[f]=e1[h]=e1[O]=e1[A]=e1[m]=e1[p]=e1[P]=e1[B]=e1[E]=e1[z]=e1[T]=e1[b]=e1[y]=e1[v]=e1[k]=e1[_]=e1[C]=e1[I]=e1[N]=e1[R]=e1[$]=e1[D]=!0,e1[x]=e1[g]=e1[S]=!1;var e2={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},e8=parseFloat,e3=parseInt,e5=(void 0===t.g?"undefined":i(t.g))=="object"&&t.g&&t.g.Object===Object&&t.g,e4=("undefined"==typeof self?"undefined":i(self))=="object"&&self&&self.Object===Object&&self,e6=e5||e4||Function("return this")(),e7="object"==i(n)&&n&&!n.nodeType&&n,e9=e7&&"object"==i(e)&&e&&!e.nodeType&&e,ne=e9&&e9.exports===e7,nn=ne&&e5.process,nt=function(){try{var e=e9&&e9.require&&e9.require("util").types;if(e)return e;return nn&&nn.binding&&nn.binding("util")}catch(e){}}(),nr=nt&&nt.isArrayBuffer,ni=nt&&nt.isDate,no=nt&&nt.isMap,nl=nt&&nt.isRegExp,na=nt&&nt.isSet,nc=nt&&nt.isTypedArray;function ns(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}function nu(e,n,t,r){for(var i=-1,o=null==e?0:e.length;++i-1}function np(e,n,t){for(var r=-1,i=null==e?0:e.length;++r-1;);return t}function nD(e,n){for(var t=e.length;t--&&n_(n,e[t],0)>-1;);return t}var nM=nA({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nL=nA({"&":"&","<":"<",">":">",'"':""","'":"'"});function nK(e){return"\\"+e2[e]}function nJ(e){return eG.test(e)}function nX(e){var n=-1,t=Array(e.size);return e.forEach(function(e,r){t[++n]=[r,e]}),t}function nU(e,n){return function(t){return e(n(t))}}function nF(e,n){for(var t=-1,r=e.length,i=0,o=[];++t",""":'"',"'":"'"}),nY=function e(n){var t,en,ej,eb,ey=(n=null==n?e6:nY.defaults(e6.Object(),n,nY.pick(e6,eQ))).Array,ev=n.Date,ew=n.Error,ek=n.Function,e_=n.Math,eC=n.Object,eI=n.RegExp,eS=n.String,eO=n.TypeError,eA=ey.prototype,eP=ek.prototype,eB=eC.prototype,eE=n["__core-js_shared__"],ez=eP.toString,eT=eB.hasOwnProperty,eN=0,eR=(t=/[^.]+$/.exec(eE&&eE.keys&&eE.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"",e$=eB.toString,eD=ez.call(eC),eM=e6._,eL=eI("^"+ez.call(eT).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eK=ne?n.Buffer:o,eJ=n.Symbol,eX=n.Uint8Array,eU=eK?eK.allocUnsafe:o,eF=nU(eC.getPrototypeOf,eC),eW=eC.create,eG=eB.propertyIsEnumerable,e2=eA.splice,e5=eJ?eJ.isConcatSpreadable:o,e4=eJ?eJ.iterator:o,e7=eJ?eJ.toStringTag:o,e9=function(){try{var e=ix(eC,"defineProperty");return e({},"",{}),e}catch(e){}}(),nn=n.clearTimeout!==e6.clearTimeout&&n.clearTimeout,nt=ev&&ev.now!==e6.Date.now&&ev.now,nv=n.setTimeout!==e6.setTimeout&&n.setTimeout,nA=e_.ceil,nQ=e_.floor,nZ=eC.getOwnPropertySymbols,n0=eK?eK.isBuffer:o,n1=n.isFinite,n2=eA.join,n8=nU(eC.keys,eC),n3=e_.max,n5=e_.min,n4=ev.now,n6=n.parseInt,n7=e_.random,n9=eA.reverse,te=ix(n,"DataView"),tn=ix(n,"Map"),tt=ix(n,"Promise"),tr=ix(n,"Set"),ti=ix(n,"WeakMap"),to=ix(eC,"create"),tl=ti&&new ti,ta={},tc=iK(te),ts=iK(tn),tu=iK(tt),td=iK(tr),tf=iK(ti),th=eJ?eJ.prototype:o,tm=th?th.valueOf:o,tp=th?th.toString:o;function tx(e){if(oG(e)&&!oM(e)&&!r(e,ty)){if(r(e,tb))return e;if(eT.call(e,"__wrapped__"))return iJ(e)}return new tb(e)}var tg=function(){function e(){}return function(n){if(!oq(n))return{};if(eW)return eW(n);e.prototype=n;var t=new e;return e.prototype=o,t}}();function tj(){}function tb(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=o}function ty(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}function tv(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1},tw.prototype.set=function(e,n){var t=this.__data__,r=tP(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this},tk.prototype.clear=function(){this.size=0,this.__data__={hash:new tv,map:new(tn||tw),string:new tv}},tk.prototype.delete=function(e){var n=im(this,e).delete(e);return this.size-=!!n,n},tk.prototype.get=function(e){return im(this,e).get(e)},tk.prototype.has=function(e){return im(this,e).has(e)},tk.prototype.set=function(e,n){var t=im(this,e),r=t.size;return t.set(e,n),this.size+=+(t.size!=r),this},t_.prototype.add=t_.prototype.push=function(e){return this.__data__.set(e,a),this},t_.prototype.has=function(e){return this.__data__.has(e)};function tO(e,n,t){(o===t||oN(e[n],t))&&(o!==t||n in e)||tz(e,n,t)}function tA(e,n,t){var r=e[n];eT.call(e,n)&&oN(r,t)&&(o!==t||n in e)||tz(e,n,t)}function tP(e,n){for(var t=e.length;t--;)if(oN(e[t][0],n))return t;return -1}function tB(e,n,t,r){return tL(e,function(e,i,o){n(r,e,t(e),o)}),r}function tE(e,n){return e&&rX(n,lx(n),e)}function tz(e,n,t){"__proto__"==n&&e9?e9(e,n,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[n]=t}function tT(e,n){for(var t=-1,r=n.length,i=ey(r),l=null==e;++t=n?e:n)),e}function tR(e,n,t,r,i,l){var a,c=1&n,s=2&n,u=4&n;if(t&&(a=i?t(e,r,i,l):t(e)),o!==a)return a;if(!oq(e))return e;var d=oM(e);if(d){if(x=(h=e).length,w=new h.constructor(x),x&&"string"==typeof h[0]&&eT.call(h,"index")&&(w.index=h.index,w.input=h.input),a=w,!c)return rJ(e,a)}else{var h,x,w,S,M,L,K,J,X=ib(e),U=X==g||X==j;if(oX(e))return rR(e,c);if(X==v||X==f||U&&!i){if(a=s||U?{}:iv(e),!c){return s?(S=e,M=(J=a)&&rX(e,lg(e),J),rX(S,ij(S),M)):(L=e,K=tE(a,e),rX(L,ig(L),K))}}else{if(!e1[X])return i?e:{};a=function(e,n,t){var r,i,o=e.constructor;switch(n){case O:return r$(e);case m:case p:return new o(+e);case A:return r=t?r$(e.buffer):e.buffer,new e.constructor(r,e.byteOffset,e.byteLength);case P:case B:case E:case z:case T:case N:case R:case $:case D:return rD(e,t);case b:return new o;case y:case C:return new o(e);case k:return(i=new e.constructor(e.source,es.exec(e))).lastIndex=e.lastIndex,i;case _:return new o;case I:return tm?eC(tm.call(e)):{}}}(e,X,c)}}l||(l=new tC);var F=l.get(e);if(F)return F;l.set(e,a),o1(e)?e.forEach(function(r){a.add(tR(r,n,t,r,e,l))}):oY(e)&&e.forEach(function(r,i){a.set(i,tR(r,n,t,i,e,l))});var V=u?s?ic:ia:s?lg:lx,H=d?o:V(e);return nd(H||e,function(r,i){H&&(r=e[i=r]),tA(a,i,tR(r,n,t,i,e,l))}),a}function t$(e,n,t){var r=t.length;if(null==e)return!r;for(e=eC(e);r--;){var i=t[r],l=n[i],a=e[i];if(o===a&&!(i in e)||!l(a))return!1}return!0}function tD(e,n,t){if("function"!=typeof e)throw new eO(l);return iT(function(){e.apply(o,t)},n)}function tM(e,n,t,r){var i=-1,o=nm,l=!0,a=e.length,c=[],s=n.length;if(!a)return c;t&&(n=nx(n,nT(t))),r?(o=np,l=!1):n.length>=200&&(o=nR,l=!1,n=new t_(n));t:for(;++i0&&t(a)?n>1?tF(a,n-1,t,r,i):ng(i,a):r||(i[i.length]=a)}return i}var tV=rH(),tH=rH(!0);function tW(e,n){return e&&tV(e,n,lx)}function tq(e,n){return e&&tH(e,n,lx)}function tG(e,n){return nh(n,function(n){return oV(e[n])})}function tY(e,n){n=rz(n,e);for(var t=0,r=n.length;null!=e&&tn}function t1(e,n){return null!=e&&eT.call(e,n)}function t2(e,n){return null!=e&&n in eC(e)}function t8(e,n,t){for(var r=t?np:nm,i=e[0].length,l=e.length,a=l,c=ey(l),s=1/0,u=[];a--;){var d=e[a];a&&n&&(d=nx(d,nT(n))),s=n5(d.length,s),c[a]=!t&&(n||i>=120&&d.length>=120)?new t_(a&&d):o}d=e[0];var f=-1,h=c[0];t:for(;++f=a)return c;return c*("desc"==t[r]?-1:1)}}return e.index-n.index}(e,n,t)});o--;)i[o]=i[o].value;return i}function rc(e,n,t){for(var r=-1,i=n.length,o={};++r-1;)a!==e&&e2.call(a,c,1),e2.call(e,c,1);return e}function ru(e,n){for(var t=e?n.length:0,r=t-1;t--;){var i=n[t];if(t==r||i!==o){var o=i;ik(i)?e2.call(e,i,1):rC(e,i)}}return e}function rd(e,n){return e+nQ(n7()*(n-e+1))}function rf(e,n){var t="";if(!e||n<1||n>0x1fffffffffffff)return t;do n%2&&(t+=e),(n=nQ(n/2))&&(e+=e);while(n);return t}function rh(e,n){return iN(iP(e,n,lJ),e+"")}function rm(e,n,t,r){if(!oq(e))return e;n=rz(n,e);for(var i=-1,l=n.length,a=l-1,c=e;null!=c&&++ii?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var o=ey(i);++r>>1,l=e[o];null!==l&&!o8(l)&&(t?l<=n:l=200){var s=n?null:r7(e);if(s)return nV(s);l=!1,i=nR,c=new t_}else c=n?[]:a;t:for(;++r=r?e:rg(e,n,t)}var rN=nn||function(e){return e6.clearTimeout(e)};function rR(e,n){if(n)return e.slice();var t=e.length,r=eU?eU(t):new e.constructor(t);return e.copy(r),r}function r$(e){var n=new e.constructor(e.byteLength);return new eX(n).set(new eX(e)),n}function rD(e,n){var t=n?r$(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function rM(e,n){if(e!==n){var t=o!==e,r=null===e,i=e==e,l=o8(e),a=o!==n,c=null===n,s=n==n,u=o8(n);if(!c&&!u&&!l&&e>n||l&&a&&s&&!c&&!u||r&&a&&s||!t&&s||!i)return 1;if(!r&&!l&&!u&&e1?t[i-1]:o,a=i>2?t[2]:o;for(l=e.length>3&&"function"==typeof l?(i--,l):o,a&&i_(t[0],t[1],a)&&(l=i<3?o:l,i=1),n=eC(n);++r-1?i[l?n[a]:a]:o}}function rQ(e){return il(function(n){var t=n.length,r=t,i=tb.prototype.thru;for(e&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new eO(l);if(i&&!c&&"wrapper"==iu(a))var c=new tb([],!0)}for(r=c?r:t;++r1&&y.reverse(),f&&uc))return!1;var u=l.get(e),d=l.get(n);if(u&&d)return u==n&&d==e;var f=-1,h=!0,m=2&t?new t_:o;for(l.set(e,n),l.set(n,e);++f-1&&e%1==0&&e1?"& ":"")+n[r],n=n.join(t>2?", ":" "),e.replace(et,"{\n/* [wrapped with "+n+"] */\n")}(l,(r=(o=l.match(er))?o[1].split(ei):[],i=t,nd(d,function(e){var n="_."+e[0];i&e[1]&&!nm(r,n)&&r.push(n)}),r.sort())))}function i$(e){var n=0,t=0;return function(){var r=n4(),i=16-(r-t);if(t=r,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(o,arguments)}}function iD(e,n){var t=-1,r=e.length,i=r-1;for(n=o===n?r:n;++t1?e[n-1]:o;return t="function"==typeof t?(e.pop(),t):o,i7(e,t)});function oo(e){var n=tx(e);return n.__chain__=!0,n}function ol(e,n){return n(e)}var oa=il(function(e){var n=e.length,t=n?e[0]:0,i=this.__wrapped__,l=function(n){return tT(n,e)};return n>1||this.__actions__.length||!r(i,ty)||!ik(t)?this.thru(l):((i=i.slice(t,+t+ +!!n)).__actions__.push({func:ol,args:[l],thisArg:o}),new tb(i,this.__chain__).thru(function(e){return n&&!e.length&&e.push(o),e}))}),oc=rU(function(e,n,t){eT.call(e,t)?++e[t]:tz(e,t,1)}),os=rY(iV),ou=rY(iH);function od(e,n){return(oM(e)?nd:tL)(e,ih(n,3))}function of(e,n){return(oM(e)?function(e,n){for(var t=null==e?0:e.length;t--&&!1!==n(e[t],t,e););return e}:tK)(e,ih(n,3))}var oh=rU(function(e,n,t){eT.call(e,t)?e[t].push(n):tz(e,t,[n])}),om=rh(function(e,n,t){var r=-1,i="function"==typeof n,o=oK(e)?ey(e.length):[];return tL(e,function(e){o[++r]=i?ns(n,e,t):t3(e,n,t)}),o}),op=rU(function(e,n,t){tz(e,t,n)});function ox(e,n){return(oM(e)?nx:rt)(e,ih(n,3))}var og=rU(function(e,n,t){e[+!t].push(n)},function(){return[[],[]]}),oj=rh(function(e,n){if(null==e)return[];var t=n.length;return t>1&&i_(e,n[0],n[1])?n=[]:t>2&&i_(n[0],n[1],n[2])&&(n=[n[0]]),ra(e,tF(n,1),[])}),ob=nt||function(){return e6.Date.now()};function oy(e,n,t){return n=t?o:n,n=e&&null==n?e.length:n,ie(e,128,o,o,o,o,n)}function ov(e,n){var t;if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=o),t}}var ow=rh(function(e,n,t){var r=1;if(t.length){var i=nF(t,id(ow));r|=32}return ie(e,r,n,t,i)}),ok=rh(function(e,n,t){var r=3;if(t.length){var i=nF(t,id(ok));r|=32}return ie(n,r,e,t,i)});function o_(e,n,t){n=t?o:n;var r=ie(e,8,o,o,o,o,o,n);return r.placeholder=o_.placeholder,r}function oC(e,n,t){n=t?o:n;var r=ie(e,16,o,o,o,o,o,n);return r.placeholder=oC.placeholder,r}function oI(e,n,t){var r,i,a,c,s,u,d=0,f=!1,h=!1,m=!0;if("function"!=typeof e)throw new eO(l);function p(n){var t=r,l=i;return r=i=o,d=n,c=e.apply(l,t)}function x(e){var t=e-u,r=e-d;return o===u||t>=n||t<0||h&&r>=a}function g(){var e,t,r,i=ob();if(x(i))return j(i);s=iT(g,(e=i-u,t=i-d,r=n-e,h?n5(r,a-t):r))}function j(e){return(s=o,m&&r)?p(e):(r=i=o,c)}function b(){var e,t=ob(),l=x(t);if(r=arguments,i=this,u=t,l){if(o===s)return d=e=u,s=iT(g,n),f?p(e):c;if(h)return rN(s),s=iT(g,n),p(u)}return o===s&&(s=iT(g,n)),c}return n=ln(n)||0,oq(t)&&(f=!!t.leading,a=(h="maxWait"in t)?n3(ln(t.maxWait)||0,n):a,m="trailing"in t?!!t.trailing:m),b.cancel=function(){o!==s&&rN(s),d=0,r=u=i=s=o},b.flush=function(){return o===s?c:j(ob())},b}var oS=rh(function(e,n){return tD(e,1,n)}),oO=rh(function(e,n,t){return tD(e,ln(n)||0,t)});function oA(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new eO(l);var t=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return t.cache=o.set(i,l)||o,l};return t.cache=new(oA.Cache||tk),t}function oP(e){if("function"!=typeof e)throw new eO(l);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}oA.Cache=tk;var oB=rh(function(e,n){var t=(n=1==n.length&&oM(n[0])?nx(n[0],nT(ih())):nx(tF(n,1),nT(ih()))).length;return rh(function(r){for(var i=-1,o=n5(r.length,t);++i=n}),oD=t5(function(){return arguments}())?t5:function(e){return oG(e)&&eT.call(e,"callee")&&!eG.call(e,"callee")},oM=ey.isArray,oL=nr?nT(nr):function(e){return oG(e)&&tZ(e)==O};function oK(e){return null!=e&&oW(e.length)&&!oV(e)}function oJ(e){return oG(e)&&oK(e)}var oX=n0||l1,oU=ni?nT(ni):function(e){return oG(e)&&tZ(e)==p};function oF(e){if(!oG(e))return!1;var n=tZ(e);return n==x||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!oZ(e)}function oV(e){if(!oq(e))return!1;var n=tZ(e);return n==g||n==j||"[object AsyncFunction]"==n||"[object Proxy]"==n}function oH(e){return"number"==typeof e&&e==o9(e)}function oW(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function oq(e){var n=void 0===e?"undefined":i(e);return null!=e&&("object"==n||"function"==n)}function oG(e){return null!=e&&(void 0===e?"undefined":i(e))=="object"}var oY=no?nT(no):function(e){return oG(e)&&ib(e)==b};function oQ(e){return"number"==typeof e||oG(e)&&tZ(e)==y}function oZ(e){if(!oG(e)||tZ(e)!=v)return!1;var n=eF(e);if(null===n)return!0;var t=eT.call(n,"constructor")&&n.constructor;return"function"==typeof t&&r(t,t)&&ez.call(t)==eD}var o0=nl?nT(nl):function(e){return oG(e)&&tZ(e)==k},o1=na?nT(na):function(e){return oG(e)&&ib(e)==_};function o2(e){return"string"==typeof e||!oM(e)&&oG(e)&&tZ(e)==C}function o8(e){return(void 0===e?"undefined":i(e))=="symbol"||oG(e)&&tZ(e)==I}var o3=nc?nT(nc):function(e){return oG(e)&&oW(e.length)&&!!e0[tZ(e)]},o5=r5(rn),o4=r5(function(e,n){return e<=n});function o6(e){if(!e)return[];if(oK(e))return o2(e)?nW(e):rJ(e);if(e4&&e[e4]){for(var n,t=e[e4](),r=[];!(n=t.next()).done;)r.push(n.value);return r}var i=ib(e);return(i==b?nX:i==_?nV:lC)(e)}function o7(e){return e?(e=ln(e))===s||e===-s?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}function o9(e){var n=o7(e),t=n%1;return n==n?t?n-t:n:0}function le(e){return e?tN(o9(e),0,0xffffffff):0}function ln(e){if("number"==typeof e)return e;if(o8(e))return u;if(oq(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=oq(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=nz(e);var t=ed.test(e);return t||eh.test(e)?e3(e.slice(2),t?2:8):eu.test(e)?u:+e}function lt(e){return rX(e,lg(e))}function lr(e){return null==e?"":rk(e)}var li=rF(function(e,n){if(iO(n)||oK(n))return void rX(n,lx(n),e);for(var t in n)eT.call(n,t)&&tA(e,t,n[t])}),lo=rF(function(e,n){rX(n,lg(n),e)}),ll=rF(function(e,n,t,r){rX(n,lg(n),e,r)}),la=rF(function(e,n,t,r){rX(n,lx(n),e,r)}),lc=il(tT),ls=rh(function(e,n){e=eC(e);var t=-1,r=n.length,i=r>2?n[2]:o;for(i&&i_(n[0],n[1],i)&&(r=1);++t1),n}),rX(e,ic(e),t),r&&(t=tR(t,7,ii));for(var i=n.length;i--;)rC(t,n[i]);return t}),lv=il(function(e,n){return null==e?{}:rc(e,n,function(n,t){return lf(e,t)})});function lw(e,n){if(null==e)return{};var t=nx(ic(e),function(e){return[e]});return n=ih(n),rc(e,t,function(e,t){return n(e,t[0])})}var lk=r9(lx),l_=r9(lg);function lC(e){return null==e?[]:nN(e,lx(e))}var lI=rq(function(e,n,t){return n=n.toLowerCase(),e+(t?lS(n):n)});function lS(e){return lN(lr(e).toLowerCase())}function lO(e){return(e=lr(e))&&e.replace(ep,nM).replace(eH,"")}var lA=rq(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),lP=rq(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),lB=rW("toLowerCase"),lE=rq(function(e,n,t){return e+(t?"_":"")+n.toLowerCase()}),lz=rq(function(e,n,t){return e+(t?" ":"")+lN(n)}),lT=rq(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),lN=rW("toUpperCase");function lR(e,n,t){if(e=lr(e),n=t?o:n,o===n){var r;return(r=e,eY.test(r))?e.match(eq)||[]:e.match(eo)||[]}return e.match(n)||[]}var l$=rh(function(e,n){try{return ns(e,o,n)}catch(e){return oF(e)?e:new ew(e)}}),lD=il(function(e,n){return nd(n,function(n){tz(e,n=iL(n),ow(e[n],e))}),e});function lM(e){return function(){return e}}var lL=rQ(),lK=rQ(!0);function lJ(e){return e}function lX(e){return t9("function"==typeof e?e:tR(e,1))}var lU=rh(function(e,n){return function(t){return t3(t,e,n)}}),lF=rh(function(e,n){return function(t){return t3(e,t,n)}});function lV(e,n,t){var r=lx(n),i=tG(n,r);null!=t||oq(n)&&(i.length||!r.length)||(t=n,n=e,e=this,i=tG(n,lx(n)));var o=!(oq(t)&&"chain"in t)||!!t.chain,l=oV(e);return nd(i,function(t){var r=n[t];e[t]=r,l&&(e.prototype[t]=function(){var n=this.__chain__;if(o||n){var t=e(this.__wrapped__);return(t.__actions__=rJ(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t}return r.apply(e,ng([this.value()],arguments))})}),e}function lH(){}var lW=r2(nx),lq=r2(nf),lG=r2(ny);function lY(e){return iC(e)?nO(iL(e)):function(n){return tY(n,e)}}var lQ=r3(),lZ=r3(!0);function l0(){return[]}function l1(){return!1}var l2=r1(function(e,n){return e+n},0),l8=r6("ceil"),l3=r1(function(e,n){return e/n},1),l5=r6("floor"),l4=r1(function(e,n){return e*n},1),l6=r6("round"),l7=r1(function(e,n){return e-n},0);return tx.after=function(e,n){if("function"!=typeof n)throw new eO(l);return e=o9(e),function(){if(--e<1)return n.apply(this,arguments)}},tx.ary=oy,tx.assign=li,tx.assignIn=lo,tx.assignInWith=ll,tx.assignWith=la,tx.at=lc,tx.before=ov,tx.bind=ow,tx.bindAll=lD,tx.bindKey=ok,tx.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return oM(e)?e:[e]},tx.chain=oo,tx.chunk=function(e,n,t){n=(t?i_(e,n,t):o===n)?1:n3(o9(n),0);var r=null==e?0:e.length;if(!r||n<1)return[];for(var i=0,l=0,a=ey(nA(r/n));ic?0:c+l),(a=o===a||a>c?c:o9(a))<0&&(a+=c),a=l>a?0:le(a);l>>0)?(e=lr(e))&&("string"==typeof n||null!=n&&!o0(n))&&!(n=rk(n))&&nJ(e)?rT(nW(e),0,t):e.split(n,t):[]},tx.spread=function(e,n){if("function"!=typeof e)throw new eO(l);return n=null==n?0:n3(o9(n),0),rh(function(t){var r=t[n],i=rT(t,0,n);return r&&ng(i,r),ns(e,this,i)})},tx.tail=function(e){var n=null==e?0:e.length;return n?rg(e,1,n):[]},tx.take=function(e,n,t){return e&&e.length?rg(e,0,(n=t||o===n?1:o9(n))<0?0:n):[]},tx.takeRight=function(e,n,t){var r=null==e?0:e.length;return r?rg(e,(n=r-(n=t||o===n?1:o9(n)))<0?0:n,r):[]},tx.takeRightWhile=function(e,n){return e&&e.length?rS(e,ih(n,3),!1,!0):[]},tx.takeWhile=function(e,n){return e&&e.length?rS(e,ih(n,3)):[]},tx.tap=function(e,n){return n(e),e},tx.throttle=function(e,n,t){var r=!0,i=!0;if("function"!=typeof e)throw new eO(l);return oq(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),oI(e,n,{leading:r,maxWait:n,trailing:i})},tx.thru=ol,tx.toArray=o6,tx.toPairs=lk,tx.toPairsIn=l_,tx.toPath=function(e){return oM(e)?nx(e,iL):o8(e)?[e]:rJ(iM(lr(e)))},tx.toPlainObject=lt,tx.transform=function(e,n,t){var r=oM(e),i=r||oX(e)||o3(e);if(n=ih(n,4),null==t){var o=e&&e.constructor;t=i?r?new o:[]:oq(e)&&oV(o)?tg(eF(e)):{}}return(i?nd:tW)(e,function(e,r,i){return n(t,e,r,i)}),t},tx.unary=function(e){return oy(e,1)},tx.union=i3,tx.unionBy=i5,tx.unionWith=i4,tx.uniq=function(e){return e&&e.length?r_(e):[]},tx.uniqBy=function(e,n){return e&&e.length?r_(e,ih(n,2)):[]},tx.uniqWith=function(e,n){return n="function"==typeof n?n:o,e&&e.length?r_(e,o,n):[]},tx.unset=function(e,n){return null==e||rC(e,n)},tx.unzip=i6,tx.unzipWith=i7,tx.update=function(e,n,t){return null==e?e:rI(e,n,rE(t))},tx.updateWith=function(e,n,t,r){return r="function"==typeof r?r:o,null==e?e:rI(e,n,rE(t),r)},tx.values=lC,tx.valuesIn=function(e){return null==e?[]:nN(e,lg(e))},tx.without=i9,tx.words=lR,tx.wrap=function(e,n){return oE(rE(n),e)},tx.xor=oe,tx.xorBy=on,tx.xorWith=ot,tx.zip=or,tx.zipObject=function(e,n){return rP(e||[],n||[],tA)},tx.zipObjectDeep=function(e,n){return rP(e||[],n||[],rm)},tx.zipWith=oi,tx.entries=lk,tx.entriesIn=l_,tx.extend=lo,tx.extendWith=ll,lV(tx,tx),tx.add=l2,tx.attempt=l$,tx.camelCase=lI,tx.capitalize=lS,tx.ceil=l8,tx.clamp=function(e,n,t){return o===t&&(t=n,n=o),o!==t&&(t=(t=ln(t))==t?t:0),o!==n&&(n=(n=ln(n))==n?n:0),tN(ln(e),n,t)},tx.clone=function(e){return tR(e,4)},tx.cloneDeep=function(e){return tR(e,5)},tx.cloneDeepWith=function(e,n){return tR(e,5,n="function"==typeof n?n:o)},tx.cloneWith=function(e,n){return tR(e,4,n="function"==typeof n?n:o)},tx.conformsTo=function(e,n){return null==n||t$(e,n,lx(n))},tx.deburr=lO,tx.defaultTo=function(e,n){return null==e||e!=e?n:e},tx.divide=l3,tx.endsWith=function(e,n,t){e=lr(e),n=rk(n);var r=e.length,i=t=o===t?r:tN(o9(t),0,r);return(t-=n.length)>=0&&e.slice(t,i)==n},tx.eq=oN,tx.escape=function(e){return(e=lr(e))&&F.test(e)?e.replace(X,nL):e},tx.escapeRegExp=function(e){return(e=lr(e))&&Z.test(e)?e.replace(Q,"\\$&"):e},tx.every=function(e,n,t){var r=oM(e)?nf:tJ;return t&&i_(e,n,t)&&(n=o),r(e,ih(n,3))},tx.find=os,tx.findIndex=iV,tx.findKey=function(e,n){return nw(e,ih(n,3),tW)},tx.findLast=ou,tx.findLastIndex=iH,tx.findLastKey=function(e,n){return nw(e,ih(n,3),tq)},tx.floor=l5,tx.forEach=od,tx.forEachRight=of,tx.forIn=function(e,n){return null==e?e:tV(e,ih(n,3),lg)},tx.forInRight=function(e,n){return null==e?e:tH(e,ih(n,3),lg)},tx.forOwn=function(e,n){return e&&tW(e,ih(n,3))},tx.forOwnRight=function(e,n){return e&&tq(e,ih(n,3))},tx.get=ld,tx.gt=oR,tx.gte=o$,tx.has=function(e,n){return null!=e&&iy(e,n,t1)},tx.hasIn=lf,tx.head=iq,tx.identity=lJ,tx.includes=function(e,n,t,r){e=oK(e)?e:lC(e),t=t&&!r?o9(t):0;var i=e.length;return t<0&&(t=n3(i+t,0)),o2(e)?t<=i&&e.indexOf(n,t)>-1:!!i&&n_(e,n,t)>-1},tx.indexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=null==t?0:o9(t);return i<0&&(i=n3(r+i,0)),n_(e,n,i)},tx.inRange=function(e,n,t){var r,i,l;return n=o7(n),o===t?(t=n,n=0):t=o7(t),(r=e=ln(e))>=n5(i=n,l=t)&&r=-0x1fffffffffffff&&e<=0x1fffffffffffff},tx.isSet=o1,tx.isString=o2,tx.isSymbol=o8,tx.isTypedArray=o3,tx.isUndefined=function(e){return o===e},tx.isWeakMap=function(e){return oG(e)&&ib(e)==S},tx.isWeakSet=function(e){return oG(e)&&"[object WeakSet]"==tZ(e)},tx.join=function(e,n){return null==e?"":n2.call(e,n)},tx.kebabCase=lA,tx.last=iZ,tx.lastIndexOf=function(e,n,t){var r=null==e?0:e.length;if(!r)return -1;var i=r;return o!==t&&(i=(i=o9(t))<0?n3(r+i,0):n5(i,r-1)),n==n?function(e,n,t){for(var r=t+1;r--&&e[r]!==n;);return r}(e,n,i):nk(e,nI,i,!0)},tx.lowerCase=lP,tx.lowerFirst=lB,tx.lt=o5,tx.lte=o4,tx.max=function(e){return e&&e.length?tX(e,lJ,t0):o},tx.maxBy=function(e,n){return e&&e.length?tX(e,ih(n,2),t0):o},tx.mean=function(e){return nS(e,lJ)},tx.meanBy=function(e,n){return nS(e,ih(n,2))},tx.min=function(e){return e&&e.length?tX(e,lJ,rn):o},tx.minBy=function(e,n){return e&&e.length?tX(e,ih(n,2),rn):o},tx.stubArray=l0,tx.stubFalse=l1,tx.stubObject=function(){return{}},tx.stubString=function(){return""},tx.stubTrue=function(){return!0},tx.multiply=l4,tx.nth=function(e,n){return e&&e.length?rl(e,o9(n)):o},tx.noConflict=function(){return e6._===this&&(e6._=eM),this},tx.noop=lH,tx.now=ob,tx.pad=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;if(!n||r>=n)return e;var i=(n-r)/2;return r8(nQ(i),t)+e+r8(nA(i),t)},tx.padEnd=function(e,n,t){e=lr(e);var r=(n=o9(n))?nH(e):0;return n&&rn){var r=e;e=n,n=r}if(t||e%1||n%1){var i=n7();return n5(e+i*(n-e+e8("1e-"+((i+"").length-1))),n)}return rd(e,n)},tx.reduce=function(e,n,t){var r=oM(e)?nj:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tL)},tx.reduceRight=function(e,n,t){var r=oM(e)?nb:nP,i=arguments.length<3;return r(e,ih(n,4),t,i,tK)},tx.repeat=function(e,n,t){return n=(t?i_(e,n,t):o===n)?1:o9(n),rf(lr(e),n)},tx.replace=function(){var e=arguments,n=lr(e[0]);return e.length<3?n:n.replace(e[1],e[2])},tx.result=function(e,n,t){n=rz(n,e);var r=-1,i=n.length;for(i||(i=1,e=o);++r0x1fffffffffffff)return[];var t=0xffffffff,r=n5(e,0xffffffff);n=ih(n),e-=0xffffffff;for(var i=nE(r,n);++t=l)return e;var c=t-nH(r);if(c<1)return r;var s=a?rT(a,0,c).join(""):e.slice(0,c);if(o===i)return s+r;if(a&&(c+=s.length-c),o0(i)){if(e.slice(c).search(i)){var u,d=s;for(i.global||(i=eI(i.source,lr(es.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;s=s.slice(0,o===f?c:f)}}else if(e.indexOf(rk(i),c)!=c){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},tx.unescape=function(e){return(e=lr(e))&&U.test(e)?e.replace(J,nG):e},tx.uniqueId=function(e){var n=++eN;return lr(e)+n},tx.upperCase=lT,tx.upperFirst=lN,tx.each=od,tx.eachRight=of,tx.first=iq,lV(tx,(eb={},tW(tx,function(e,n){eT.call(tx.prototype,n)||(eb[n]=e)}),eb),{chain:!1}),tx.VERSION="4.18.1",nd(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){tx[e].placeholder=tx}),nd(["drop","take"],function(e,n){ty.prototype[e]=function(t){t=o===t?1:n3(o9(t),0);var r=this.__filtered__&&!n?new ty(this):this.clone();return r.__filtered__?r.__takeCount__=n5(t,r.__takeCount__):r.__views__.push({size:n5(t,0xffffffff),type:e+(r.__dir__<0?"Right":"")}),r},ty.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),nd(["filter","map","takeWhile"],function(e,n){var t=n+1,r=1==t||3==t;ty.prototype[e]=function(e){var n=this.clone();return n.__iteratees__.push({iteratee:ih(e,3),type:t}),n.__filtered__=n.__filtered__||r,n}}),nd(["head","last"],function(e,n){var t="take"+(n?"Right":"");ty.prototype[e]=function(){return this[t](1).value()[0]}}),nd(["initial","tail"],function(e,n){var t="drop"+(n?"":"Right");ty.prototype[e]=function(){return this.__filtered__?new ty(this):this[t](1)}}),ty.prototype.compact=function(){return this.filter(lJ)},ty.prototype.find=function(e){return this.filter(e).head()},ty.prototype.findLast=function(e){return this.reverse().find(e)},ty.prototype.invokeMap=rh(function(e,n){return"function"==typeof e?new ty(this):this.map(function(t){return t3(t,e,n)})}),ty.prototype.reject=function(e){return this.filter(oP(ih(e)))},ty.prototype.slice=function(e,n){e=o9(e);var t=this;return t.__filtered__&&(e>0||n<0)?new ty(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),o!==n&&(t=(n=o9(n))<0?t.dropRight(-n):t.take(n-e)),t)},ty.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ty.prototype.toArray=function(){return this.take(0xffffffff)},tW(ty.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),l=tx[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);l&&(tx.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,s=r(n,ty),u=c[0],d=s||oM(n),f=function(e){var n=l.apply(tx,ng([e],c));return i&&h?n[0]:n};d&&t&&"function"==typeof u&&1!=u.length&&(s=d=!1);var h=this.__chain__,m=!!this.__actions__.length,p=a&&!h,x=s&&!m;if(!a&&d){n=x?n:new ty(this);var g=e.apply(n,c);return g.__actions__.push({func:ol,args:[f],thisArg:o}),new tb(g,h)}return p&&x?e.apply(this,c):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})}),nd(["pop","push","shift","sort","splice","unshift"],function(e){var n=eA[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);tx.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(oM(i)?i:[],e)}return this[t](function(t){return n.apply(oM(t)?t:[],e)})}}),tW(ty.prototype,function(e,n){var t=tx[n];if(t){var r=t.name+"";eT.call(ta,r)||(ta[r]=[]),ta[r].push({name:n,func:t})}}),ta[rZ(o,2).name]=[{name:"wrapper",func:o}],ty.prototype.clone=function(){var e=new ty(this.__wrapped__);return e.__actions__=rJ(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rJ(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rJ(this.__views__),e},ty.prototype.reverse=function(){if(this.__filtered__){var e=new ty(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e},ty.prototype.value=function(){var e=this.__wrapped__.value(),n=this.__dir__,t=oM(e),r=n<0,i=t?e.length:0,o=function(e,n,t){for(var r=-1,i=t.length;++r=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}},tx.prototype.plant=function(e){for(var n,t=this;r(t,tj);){var i=iJ(t);i.__index__=0,i.__values__=o,n?l.__wrapped__=i:n=i;var l=i;t=t.__wrapped__}return l.__wrapped__=e,n},tx.prototype.reverse=function(){var e=this.__wrapped__;if(r(e,ty)){var n=e;return this.__actions__.length&&(n=new ty(this)),(n=n.reverse()).__actions__.push({func:ol,args:[i8],thisArg:o}),new tb(n,this.__chain__)}return this.thru(i8)},tx.prototype.toJSON=tx.prototype.valueOf=tx.prototype.value=function(){return rO(this.__wrapped__,this.__actions__)},tx.prototype.first=tx.prototype.head,e4&&(tx.prototype[e4]=function(){return this}),tx}();"function"==typeof define&&"object"==i(define.amd)&&define.amd?(e6._=nY,define(function(){return nY})):e9?((e9.exports=nY)._=nY,e7._=nY):e6._=nY}).call(this)},6312:function(e,n){"use strict";var t=Symbol.for("react.transitional.element");function r(e,n,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==n.key&&(i=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return{$$typeof:t,type:e,key:i,ref:void 0!==(n=r.ref)?n:null,props:r}}n.Fragment=Symbol.for("react.fragment"),n.jsx=r,n.jsxs=r},5059:function(e,n){"use strict";function t(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var r=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),p=Symbol.iterator,x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,j={};function b(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}function y(){}function v(e,n,t){this.props=e,this.context=n,this.refs=j,this.updater=t||x}b.prototype.isReactComponent={},b.prototype.setState=function(e,n){if("object"!==(void 0===e?"undefined":t(e))&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function _(){}var C={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function S(e,n,t){var i=t.ref;return{$$typeof:r,type:e,key:n,ref:void 0!==i?i:null,props:t}}function O(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e&&e.$$typeof===r}var A=/\/+/g;function P(e,n){var r,i;return"object"===(void 0===e?"undefined":t(e))&&null!==e&&null!=e.key?(r=""+e.key,i={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return i[e]})):n.toString(36)}function B(e,n,o){if(null==e)return e;var l=[],a=0;return!function e(n,o,l,a,c){var s,u,d,f=void 0===n?"undefined":t(n);("undefined"===f||"boolean"===f)&&(n=null);var m=!1;if(null===n)m=!0;else switch(f){case"bigint":case"string":case"number":m=!0;break;case"object":switch(n.$$typeof){case r:case i:m=!0;break;case h:return e((m=n._init)(n._payload),o,l,a,c)}}if(m)return c=c(n),m=""===a?"."+P(n,0):a,k(c)?(l="",null!=m&&(l=m.replace(A,"$&/")+"/"),e(c,o,l,"",function(e){return e})):null!=c&&(O(c)&&(s=c,u=l+(null==c.key||n&&n.key===c.key?"":(""+c.key).replace(A,"$&/")+"/")+m,c=S(s.type,u,s.props)),o.push(c)),1;m=0;var x=""===a?".":a+":";if(k(n))for(var g=0;g>>1,i=e[r];if(0>>1;rl(c,t))sl(u,c)?(e[r]=u,e[s]=t,r=s):(e[r]=c,e[a]=t,r=a);else if(sl(u,t))e[r]=u,e[s]=t,r=s;else break}}return n}function l(e,n){var t=e.sortIndex-n.sortIndex;return 0!==t?t:e.id-n.id}if(n.unstable_now=void 0,"object"===("undefined"==typeof performance?"undefined":t(performance))&&"function"==typeof performance.now){var a,c=performance;n.unstable_now=function(){return c.now()}}else{var s=Date,u=s.now();n.unstable_now=function(){return s.now()-u}}var d=[],f=[],h=1,m=null,p=3,x=!1,g=!1,j=!1,b=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var n=i(f);null!==n;){if(null===n.callback)o(f);else if(n.startTime<=e)o(f),n.sortIndex=n.expirationTime,r(d,n);else break;n=i(f)}}function _(e){if(j=!1,k(e),!g)if(null!==i(d))g=!0,C||(C=!0,a());else{var n=i(f);null!==n&&z(_,n.startTime-e)}}var C=!1,I=-1,S=5,O=-1;function A(){return!!b||!(n.unstable_now()-Oe&&A());){var l=m.callback;if("function"==typeof l){m.callback=null,p=m.priorityLevel;var c=l(m.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof c){m.callback=c,k(e),t=!0;break n}m===i(d)&&o(d),k(e)}else o(d);m=i(d)}if(null!==m)t=!0;else{var s=i(f);null!==s&&z(_,s.startTime-e),t=!1}}break e}finally{m=null,p=r,x=!1}}}finally{t?a():C=!1}}}if("function"==typeof w)a=function(){w(P)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,E=B.port2;B.port1.onmessage=P,a=function(){E.postMessage(null)}}else a=function(){y(P,0)};function z(e,t){I=y(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.unstable_forceFrameRate=function(e){0>e||125c?(e.sortIndex=l,r(f,e),null===i(d)&&e===i(f)&&(j?(v(I),I=-1):j=!0,z(_,l-c))):(e.sortIndex=s,r(d,e),g||x||(g=!0,C||(C=!0,a()))),e},n.unstable_shouldYield=A,n.unstable_wrapCallback=function(e){var n=p;return function(){var t=p;p=n;try{return e.apply(this,arguments)}finally{p=t}}}},8014:function(e,n,t){"use strict";e.exports=t(2685)},8587:function(e,n,t){"use strict";t.d(n,{TS:()=>s,Tj:()=>o,Ul:()=>a,pb:()=>i,y1:()=>c,yU:()=>u});function r(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var i=function(e,n){if(null==e)return e;if(Array.isArray(e)){for(var t=[],i=0;ia)return 1}return 0},a=function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;ri}),null==(r=window.performance)||r.now;var r,i={mark:function(e,n){},measure:function(e,n){}}},5900:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc,Tw:()=>a,VP:()=>s,y$:()=>l});var l=function(e,n){if(n)return n(l)(e);var t,r=[],i=function(n){t=e(t,n);for(var i=0;i1?a-1:0),s=1;s1?n-1:0),r=1;r1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=i({},t),l=!1,a=!0,c=!1,s=void 0;try{for(var u,d=n[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value,h=e[f],m=t[f],p=h(m,r);m!==p&&(l=!0,o[f]=p)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}return l?o:t}},s=function(e,n){var t=function(){for(var t=arguments.length,r=Array(t),l=0;l0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]m});var u,d=(u=function(){return window.hubStorage&&!!window.hubStorage.getItem},function(){try{return!!u()}catch(e){return!1}}),f=function(){function e(){o(this,e),c(this,"store",void 0),c(this,"impl",void 0),this.impl=0,this.store={}}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){return[2,this.store[e]]})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return this.store[e]=n,[2]})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return this.store[e]=void 0,[2]})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return this.store={},[2]})}).call(this)}}]),e}(),h=function(){function e(){o(this,e),c(this,"impl",void 0),this.impl=1}return a(e,[{key:"get",value:function(e){return i(function(){var n;return s(this,function(t){switch(t.label){case 0:return[4,window.hubStorage.getItem("paradise-"+e)];case 1:if("string"==typeof(n=t.sent()))return[2,JSON.parse(n)];return[2,void 0]}})})()}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){return window.hubStorage.setItem("paradise-"+e,JSON.stringify(n)),[2]})})()}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){return window.hubStorage.removeItem("paradise-"+e),[2]})})()}},{key:"clear",value:function(){return i(function(){return s(this,function(e){return window.hubStorage.clear(),[2]})})()}}]),e}(),m=new(function(){function e(){o(this,e),c(this,"backendPromise",void 0),c(this,"impl",0),this.backendPromise=i(function(){return s(this,function(e){return d()?[2,new h]:(console.warn("No supported storage backend found. Using in-memory storage."),[2,new f])})})()}return a(e,[{key:"get",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().get(e)]}})}).call(this)}},{key:"set",value:function(e,n){return i(function(){return s(this,function(t){switch(t.label){case 0:return[4,this.backendPromise];case 1:return[2,t.sent().set(e,n)]}})}).call(this)}},{key:"remove",value:function(e){return i(function(){return s(this,function(n){switch(n.label){case 0:return[4,this.backendPromise];case 1:return[2,n.sent().remove(e)]}})}).call(this)}},{key:"clear",value:function(){return i(function(){return s(this,function(e){switch(e.label){case 0:return[4,this.backendPromise];case 1:return[2,e.sent().clear()]}})}).call(this)}}]),e}())},6183:function(e,n,t){"use strict";t.d(n,{CO:()=>s,Xd:()=>f,Z4:()=>u,tk:()=>d});var r=t(8587);function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,l:()=>o});var r=[/v4shim/i],i={},o=function(e){return i[e]||e},l=function(e){return function(e){return function(n){var t=n.type,o=n.payload;if("asset/stylesheet"===t)return void Byond.loadCss(o);if("asset/mappings"===t){var l=!0,a=!1,c=void 0;try{for(var s,u=Object.keys(o)[Symbol.iterator]();!(l=(s=u.next()).done);l=!0)!function(){var e=s.value;if(!r.some(function(n){return n.test(e)})){var n=o[e],t=e.split(".").pop();i[e]=n,"css"===t&&Byond.loadCss(n),"js"===t&&Byond.loadJs(n)}}()}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return}e(n)}}}},2864:function(e,n,t){"use strict";t.d(n,{H$:()=>w,J3:()=>r,JV:()=>C,Oc:()=>$,QY:()=>M,Ul:()=>D,d4:()=>L,jB:()=>B,pX:()=>E});var r,i=t(9227),o=t(5900),l=t(1874),a=t(6400),c=t(1604),s=t(2533),u=t(2901);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function j(e){var n=function(e,n){if("object"!==b(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===b(n)?n:String(n)}function b(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function y(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,n)}}var v=(0,s.h)("backend"),w=function(e){r=e},k=(0,o.VP)("backend/update"),_=(0,o.VP)("backend/setSharedState"),C=(0,o.VP)("backend/suspendStart"),I=(0,o.VP)("backend/createPayloadQueue"),S=(0,o.VP)("backend/dequeuePayloadQueue"),O=(0,o.VP)("backend/removePayloadQueue"),A=(0,o.VP)("nextPayloadChunk"),P={config:{},data:{},shared:{},outgoingPayloadQueues:{},suspended:Date.now(),suspending:!1},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P,n=arguments.length>1?arguments[1]:void 0,t=n.type,r=n.payload;if("backend/update"===t){var i=p({},e.config,r.config),o=p({},e.data,r.static_data,r.data),l=p({},e.shared);if(r.shared){var a=!0,c=!1,s=void 0;try{for(var u,d=Object.keys(r.shared)[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var b=u.value,v=r.shared[b];""===v?l[b]=void 0:l[b]=JSON.parse(v)}}catch(e){c=!0,s=e}finally{try{a||null==d.return||d.return()}finally{if(c)throw s}}}return x(p({},e),{config:i,data:o,shared:l,suspended:!1})}if("backend/setSharedState"===t){var w=r.key,k=r.nextState;return x(p({},e),{shared:x(p({},e.shared),h({},w,k))})}if("backend/suspendStart"===t)return x(p({},e),{suspending:!0});if("backend/suspendSuccess"===t){var _=r.timestamp;return x(p({},e),{data:{},shared:{},config:x(p({},e.config),{title:"",status:1}),suspending:!1,suspended:_})}if("backend/createPayloadQueue"===t){var C=r.id,I=r.chunks,S=e.outgoingPayloadQueues;return x(p({},e),{outgoingPayloadQueues:x(p({},S),h({},C,I))})}if("backend/dequeuePayloadQueue"===t){var O=r.id,A=e.outgoingPayloadQueues,B=A[O],E=g(A,[O].map(j)),z=f(B)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(B)||y(B)||m(),T=(z[0],z.slice(1));return x(p({},e),{outgoingPayloadQueues:T.length?x(p({},E),h({},O,T)):E})}if("backend/removePayloadQueue"===t){var N=r.id,R=e.outgoingPayloadQueues;R[N];var $=g(R,[N].map(j));return x(p({},e),{outgoingPayloadQueues:$})}return e},E=function(e){var n,t;return function(r){return function(o){var s=R(e.getState()),d=s.suspended,f=s.outgoingPayloadQueues,h=o.type,m=o.payload;if("update"===h)return void e.dispatch(k(m));if("suspend"===h)return void e.dispatch({type:"backend/suspendSuccess",payload:{timestamp:Date.now()}});if("ping"===h)return void Byond.sendMessage("ping/reply");if("backend/suspendStart"===h&&!t){v.log("suspending (".concat(Byond.windowId,")"));var p=function(){return Byond.sendMessage("suspend")};p(),t=setInterval(p,2e3)}if("backend/suspendSuccess"===h&&((0,u.Su)(),clearInterval(t),t=void 0,Byond.winset(Byond.windowId,{"is-visible":!1}),(0,l.sc)(),(0,l.zr)(),setTimeout(function(){return(0,c.$)()})),"backend/update"===h){var x,g,j=null==(g=m.config)||null==(x=g.window)?void 0:x.fancy;void 0===n?n=j:n!==j&&(v.log("changing fancy mode to",j),n=j,Byond.winset(Byond.windowId,{titlebar:!j,"can-resize":!j}))}if("backend/update"===h&&d&&(v.log("backend/update",m),(0,u.P7)(),(0,l.ao)(),(0,a.MN)(),setTimeout(function(){i.k.mark("resume/start"),R(e.getState()).suspended||(Byond.winset(Byond.windowId,{"is-visible":!0}),Byond.sendMessage("visible"),i.k.mark("resume/finish"))})),"oversizePayloadResponse"===h&&(m.allow?e.dispatch(A(m)):e.dispatch(O(m))),"acknowlegePayloadChunk"===h&&(e.dispatch(S(m)),e.dispatch(A(m))),"nextPayloadChunk"===h){var b=m.id,y=f[b][0];Byond.sendMessage("payloadChunk",{id:b,chunk:y})}return r(o)}}},z=function(e,n){for(var t=e.length-1,r=0,i=0;r1024){var c=i+z(l,1024);r.push(n.slice(i,c1&&void 0!==arguments[1]?arguments[1]:{};if(!((void 0===n?"undefined":b(n))==="object"&&null!==n&&!Array.isArray(n)))return void v.error("Payload for act() must be an object, got this:",n);var t=JSON.stringify(n);if(Object.entries({type:"act/"+e,payload:t,tgui:1,windowId:Byond.windowId}).reduce(function(e,n,t){var r=f(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||y(n,2)||m(),i=r[0],o=r[1];return e+"".concat(t>0?"&":"?").concat(encodeURIComponent(i),"=").concat(encodeURIComponent(o))},"").length>2048){var i=t.split(T),o="".concat(Date.now());null==r||r.dispatch(I({id:o,chunks:i})),Byond.sendMessage("oversizedPayloadRequest",{type:"act/"+e,id:o,chunkCount:i.length});return}Byond.sendMessage("act/"+e,n)},R=function(e){return e.backend||{}},$=function(){var e;return x(p({},null==r||null==(e=r.getState())?void 0:e.backend),{act:N})},D=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){r.dispatch(_({key:e,nextState:"function"==typeof n?n(a):n}))}]},M=function(e,n){var t,i,o=null==r||null==(t=r.getState())?void 0:t.backend,l=null!=(i=null==o?void 0:o.shared)?i:{},a=e in l?l[e]:n;return[a,function(n){Byond.sendMessage({type:"setSharedState",key:e,value:JSON.stringify("function"==typeof n?n(a):n)||""})}]},L=function(e){return e(null==r?void 0:r.getState())}},8095:function(e,n,t){"use strict";t.d(n,{H:()=>u});var r=t(8138),i=t(4530),o=t(6859);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["onMove","onKey","style"]),m=(0,i.useRef)(null),p=a(u),x=a(d),g=(n=(0,i.useMemo)(function(){var e=function(e){e.preventDefault(),e.buttons>0&&m.current?p(s(m.current,e)):t(!1)},n=function(){return t(!1)},t=function(t){var r=c(m.current),i=t?r.addEventListener:r.removeEventListener;i("mousemove",e),i("mouseup",n)};return[function(e){var n=e.nativeEvent,r=m.current;r&&(n.preventDefault(),r.focus(),p(s(r,n)),t(!0))},function(e){var n=e.which||e.keyCode;n<37||n>40||(e.preventDefault(),x({left:39===n?.05:37===n?-.05:0,top:40===n?.05:38===n?-.05:0}))},t]},[x,p]),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),3!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,3)||function(e,n){if(e){if("string"==typeof e)return l(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,3)}}(n,3)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=g[0],b=g[1],y=g[2];return(0,i.useEffect)(function(){return y},[y]),(0,r.jsx)("div",(t=function(e){for(var n=1;nu,gm:()=>C,tx:()=>v,Gi:()=>a});var r=t(8138),i=t(4530),o=t(7790);function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["children","progressBar","timeStart","timeEnd","format"]),m=Math.max((u?d-u:d)*100,0),p=(n=(0,i.useState)(m),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=p[0],g=p[1],j=(0,i.useRef)(null);function b(){g(function(e){var n=Math.max(e-1e3,0);return n<=0&&clearInterval(j.current),n})}(0,i.useEffect)(function(){return j.current||(j.current=setInterval(b,1e3)),function(){return clearInterval(j.current)}},[]);var y=new Date(x).toISOString().slice(11,19),v=(0,r.jsx)(o.az,(t=function(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var u=function(e){var n,t,i=e.children,l=s(e,["children"]);return(0,r.jsx)(o.XI,(n=c({},l),t=t={children:(0,r.jsx)(o.XI.Row,{children:i})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))};u.Column=function(e){var n=e.size,t=e.style,i=s(e,["size","style"]);return(0,r.jsx)(o.XI.Cell,c({style:c({width:(void 0===n?1:n)+"%"},t)},i))},t(8095);var d=t(8595),f=t(2864);function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function g(e,n){return(g=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}var b=(0,i.createContext)({zoom:1}),y=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},v=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i,o,l,a;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return l=t,a=[e],l=h(l),n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,j()?Reflect.construct(l,a||[],h(this).constructor):l.apply(this,a)),window.innerWidth,window.innerHeight,n.state={offsetX:null!=(r=e.offsetX)?r:0,offsetY:null!=(i=e.offsetY)?i:0,dragging:!1,originX:null,originY:null,zoom:null!=(o=e.zoom)?o: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),y(e)},n.handleDragMove=function(e){n.setState(function(n){var t=m({},n),r=e.screenX-t.originX,i=e.screenY-t.originY;return n.dragging?(t.offsetX+=r/t.zoom,t.offsetY+=i/t.zoom,t.originX=e.screenX,t.originY=e.screenY):t.dragging=!0,t}),y(e)},n.handleDragEnd=function(t){var r;n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),null==(r=e.onOffsetChange)||r.call(e,t,n.state),y(t)},n.handleZoom=function(t,r){n.setState(function(n){return n.zoom=Math.min(Math.max(r,1),8),e.onZoom&&e.onZoom(n.zoom),n})},n.handleReset=function(t){n.setState(function(r){var i;r.offsetX=0,r.offsetY=0,r.zoom=1,n.handleZoom(t,1),null==(i=e.onOffsetChange)||i.call(e,t,r)})},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e),n=[{key:"render",value:function(){var e=(0,f.Oc)().config,n=this.state,t=n.dragging,i=n.offsetX,l=n.offsetY,a=n.zoom,c=void 0===a?1:a,s=this.props.children,u=e.map+"_nanomap_z1.png",h=510*c+"px";return(0,r.jsx)(b.Provider,{value:{zoom:c},children:(0,r.jsxs)(o.az,{className:"NanoMap__container",children:[(0,r.jsxs)(o.az,{style:{width:h,height:h,marginTop:l*c+"px",marginLeft:i*c+"px",overflow:"hidden",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)",backgroundSize:"cover",backgroundRepeat:"no-repeat",textAlign:"center",cursor:t?"move":"auto"},onMouseDown:this.handleDragStart,children:[(0,r.jsx)("img",{src:(0,d.l)(u),style:{width:"100%",height:"100%",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",imageRendering:"pixelated"}}),(0,r.jsx)(o.az,{children:s})]}),(0,r.jsx)(k,{zoom:c,onZoom:this.handleZoom,onReset:this.handleReset})]})})}}],function(e,n){for(var t=0;ti,b_:()=>a,fF:()=>c,lm:()=>r,wM:()=>l});var r={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"}},i=[{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"}],o=[{id:"o2",name:"Oxygen",label:"O₂",color:"blue"},{id:"n2",name:"Nitrogen",label:"N₂",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO₂",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H₂O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N₂O",color:"red"},{id:"no2",name:"Nitryl",label:"NO₂",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₂",color:"#997379"},{id:"ab",name:"Agent B",label:"Agent B",color:"purple"}],l=function(e,n){var t=String(e).toLowerCase(),r=o.find(function(e){return e.id===t||e.name.toLowerCase()===t});return r&&r.label||n||e},a=function(e){var n=String(e).toLowerCase(),t=o.find(function(e){return e.id===n||e.name.toLowerCase()===n});return t&&t.color},c=function(e,n){if(e>n)return"in the future";var t=(n/=10)-(e/=10);if(t>3600){var r=Math.round(t/3600);return r+" hour"+(1===r?"":"s")+" ago"}if(t>60){var i=Math.round(t/60);return i+" minute"+(1===i?"":"s")+" ago"}var o=Math.round(t);return o+" second"+(1===o?"":"s")+" ago"}},4981:function(e,n,t){"use strict";t(8138),t(7218),t(4530),t(7790),t(3384),t(937)},7218:function(e,n,t){"use strict";t.d(n,{D:()=>r});var r=(0,t(4530).createContext)(["",function(e){}])},3123:function(e,n,t){"use strict";var r=t(5900);(0,r.VP)("debug/toggleKitchenSink"),(0,r.VP)("debug/toggleDebugLayout"),(0,r.VP)("debug/openExternalBrowser")},9216:function(e,n,t){"use strict";t.d(n,{L:()=>o});var r=t(2864),i=t(8318);function o(){return(0,r.d4)(i.m)}},1956:function(e,n,t){"use strict";t.d(n,{A$:()=>i.A,Lo:()=>r.L});var r=t(9216);t(4981),t(2550);var i=t(8408)},2550:function(e,n,t){"use strict";t(1128),t(1874),t(3123)},8408:function(e,n,t){"use strict";function r(e){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=n.type;return"debug/toggleKitchenSink"===t?i(r({},e),{kitchenSink:!e.kitchenSink}):"debug/toggleDebugLayout"===t?i(r({},e),{debugLayout:!e.debugLayout}):e}t.d(n,{A:()=>o})},8318:function(e,n,t){"use strict";function r(e){return e.debug}t.d(n,{m:()=>r})},6400:function(e,n,t){"use strict";t.d(n,{BF:()=>z,C8:()=>P,MN:()=>B,nZ:()=>R,y9:()=>w});var r,i,o,l,a,c,s=t(1699),u=t(6183);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]2&&void 0!==arguments[2]?arguments[2]:50,i=[n],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return h(function(){var n,t,r,o,l;return p(this,function(a){switch(a.label){case 0:if(!(t=e.fancy))return[3,2];return[4,s.IG.get(j)];case 1:t=a.sent(),a.label=2;case 2:return(n=t)&&x.log("recalled geometry:",n),r=(null==n?void 0:n.pos)||e.pos,o=e.size,e.scale&&o&&(o=[o[0]*g,o[1]*g]),e.scale?(document.body.style.zoom="",document.documentElement.style.setProperty("--scaling-amount",null)):(document.body.style.zoom="".concat(100/window.devicePixelRatio,"%"),document.documentElement.style.setProperty("--scaling-amount",window.devicePixelRatio.toString())),[4,i];case 3:return a.sent(),l=S(),o&&I(o=[Math.min(l[0],o[0]),Math.min(l[1],o[1])]),r?(o&&e.locked&&(r=E(r,o)[1]),C(r)):o&&C(r=(0,u.CO)((0,u.Xd)(l,.5),(0,u.Xd)(o,-.5),(0,u.Xd)(v,-1))),[2]}})})()},B=function(){return h(function(){var e;return p(this,function(n){switch(n.label){case 0:return e=k(),[4,i=Byond.winget(Byond.windowId,"pos").then(function(n){return[n.x-e[0],n.y-e[1]]})];case 1:return v=n.sent(),x.debug("screen offset",v),[2]}})})()},E=function(e,n){for(var t=[0-v[0],0-v[1]],r=S(),i=[e[0],e[1]],o=!1,l=0;l<2;l++){var a=t[l],c=t[l]+r[l];e[l]c&&(i[l]=c-n[l],o=!0)}return[o,i]},z=function(e){var n;x.log("drag start"),b=!0,o=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),null==(n=e.target)||n.focus(),document.addEventListener("mousemove",N),document.addEventListener("mouseup",T),N(e)},T=function(e){x.log("drag end"),N(e),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",T),b=!1,A()},N=function(e){b&&(e.preventDefault(),C((0,u.Z4)([e.screenX*g,e.screenY*g],o)))},R=function(e,n){return function(t){var r;l=[e,n],x.log("resize start",l),y=!0,o=(0,u.Z4)([t.screenX*g,t.screenY*g],k()),a=_(),null==(r=t.target)||r.focus(),document.addEventListener("mousemove",D),document.addEventListener("mouseup",$),D(t)}},$=function(e){x.log("resize end",c),D(e),document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",$),y=!1,A()},D=function(e){if(y){e.preventDefault();var n=(0,u.Z4)([e.screenX*g,e.screenY*g],k()),t=(0,u.Z4)(n,o);(c=(0,u.CO)(a,(0,u.tk)(l,t),[1,1]))[0]=Math.max(c[0],150*g),c[1]=Math.max(c[1],50*g),I(c)}}},1604:function(e,n,t){"use strict";t.d(n,{$:()=>r});var r=function(){Byond.winset("paramapwindow.map",{focus:!0})}},9609:function(e,n,t){"use strict";t.r(n),t.d(n,{AICard:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(0===a.has_ai)return(0,r.jsx)(l.p8,{width:250,height:120,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Stored AI",children:(0,r.jsx)(i.az,{children:(0,r.jsx)("h3",{children:"No AI detected."})})})})});var c=null;return c=a.integrity>=75?"green":a.integrity>=25?"yellow":"red",(0,r.jsx)(l.p8,{width:600,height:420,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:a.name,children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:c,value:a.integrity/100})})}),(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h2",{children:1===a.flushing?"Wipe of AI in progress...":""})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{width:10,icon:a.wireless?"check":"times",content:a.wireless?"Enabled":"Disabled",color:a.wireless?"green":"red",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{width:10,icon:a.radio?"check":"times",content:a.radio?"Enabled":"Disabled",color:a.radio?"green":"red",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Wipe",children:(0,r.jsx)(i.$n.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:a.flushing||0===a.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return t("wipe")}})})]})})})]})})})}},1664:function(e,n,t){"use strict";t.r(n),t.d(n,{AIControllerDebugger:()=>u,CopyableValue:()=>c,ObjectReference:()=>s});var r=t(8138),i=t(9856),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=e.text;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{icon:"clipboard-list",onClick:function(){return navigator.clipboard.writeText(n)}}),(0,r.jsx)("span",{style:{fontFamily:"monospace"},children:n})]})},s=function(e){var n=(0,l.Oc)().act,t=e.obj_ref;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return n("vv",{uid:t.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return n("flw",{uid:t.uid})},children:"FLW"}),"\xa0",t.name]})},u=function(e){var n=(0,l.Oc)(),t=n.data,u=n.act,d=t.controller;return(0,r.jsx)(a.p8,{width:675,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.wn,{title:"Basic Info",children:(0,r.jsxs)(o.XI,{children:[d.pawn&&(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Pawn"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.pawn})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Status"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.ai_status})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Type"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.type})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Idle Behavior"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.idle_behavior})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Delay"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_delay})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Able to Plan"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.able_to_plan?"Yes":"No"})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"On Failed Planning Timeout"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.on_failed_planning_timeout?"Yes":"No"})})]}),d.movement_target&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Movement Target"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(s,{obj_ref:d.movement_target})})]}),(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:"Target Source"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:d.movement_target.source})})]})]})]})}),(0,r.jsx)(o.wn,{title:"Blackboard",children:(0,r.jsx)(o.XI,{className:"AIControllerDebugger__Blackboard",children:d.blackboard.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name.length>30?(0,r.jsx)(o.m_,{content:e.name,children:(0,r.jsx)(o.az,{children:(0,i.truncate)(e.name)})}):e.name}),(0,r.jsxs)(o.XI.Cell,{className:"bb_value",children:[e.uid&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{onClick:function(){return u("vv",{uid:e.uid})},children:"VV"}),(0,r.jsx)(o.$n,{onClick:function(){return u("flw",{uid:e.uid})},children:"FLW"}),"\xa0"]}),e.value||"null"]})]},e.name)})})}),(0,r.jsx)(o.wn,{title:"Current Behaviors",children:(0,r.jsx)(o.XI,{children:d.current_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})}),(0,r.jsx)(o.wn,{title:"Planned Behaviors",children:(0,r.jsx)(o.XI,{children:d.planned_behaviors.map(function(e,n){return(0,r.jsx)(o.XI.Row,{children:(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(c,{text:e})})},n)})})})]})})})}},8679:function(e,n,t){"use strict";t.r(n),t.d(n,{AIFixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;if(null===a.occupant)return(0,r.jsx)(l.p8,{width:550,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stored AI",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"robot",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),(0,r.jsx)("h3",{children:"No Artificial Intelligence detected."})]})})})})});var c=!0;(2===a.stat||null===a.stat)&&(c=!1);var s=null;s=a.integrity>=75?"green":a.integrity>=25?"yellow":"red";var u=!0;return a.integrity>=100&&2!==a.stat&&(u=!1),(0,r.jsx)(l.p8,{children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:a.occupant,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:s,value:a.integrity/100})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Laws",children:!!a.has_laws&&(0,r.jsx)(i.az,{children:a.laws.map(function(e,n){return(0,r.jsx)(i.az,{inline:!0,children:e},n)})})||(0,r.jsx)(i.az,{color:"red",children:(0,r.jsx)("h3",{children:"No laws detected."})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Actions",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Wireless Activity",children:(0,r.jsx)(i.$n,{icon:a.wireless?"times":"check",content:a.wireless?"Disabled":"Enabled",color:a.wireless?"red":"green",onClick:function(){return t("wireless")}})}),(0,r.jsx)(i.Ki.Item,{label:"Subspace Transceiver",children:(0,r.jsx)(i.$n,{icon:a.radio?"times":"check",content:a.radio?"Disabled":"Enabled",color:a.radio?"red":"green",onClick:function(){return t("radio")}})}),(0,r.jsx)(i.Ki.Item,{label:"Start Repairs",children:(0,r.jsx)(i.$n,{icon:"wrench",disabled:!u||a.active,content:!u||a.active?"Already Repaired":"Repair",onClick:function(){return t("fix")}})})]}),(0,r.jsx)(i.az,{color:"green",lineHeight:2,children:a.active?"Reconstruction in progress.":""})]})})]})})})}},5233:function(e,n,t){"use strict";t.r(n),t.d(n,{AIProgramPicker:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.program_list,s=a.ai_info;return(0,r.jsx)(l.p8,{width:450,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Select Program",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory Available",children:s.memory}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth Available",children:s.bandwidth})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(i.$n,{icon:"file",onClick:function(){return t("select",{uid:e.UID})},children:1===e.installed?"Update":"Install"}),children:(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.BJ.Item,{mb:2,children:(0,r.jsx)(i.Ki.Item,{label:"Description",children:e.description})}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:1===e.installed?"Bandwidth Cost":"Memory Cost",children:e.memory_cost}),(0,r.jsx)(i.Ki.Item,{label:"Upgrade Level",children:e.upgrade_level})]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki.Item,{label:"Installed",children:1===e.installed?"True":"False"}),(0,r.jsx)(i.Ki.Item,{label:"Passive",children:1===e.is_passive?"True":"False"})]})]})]})})},e)})})]})})})}},9991:function(e,n,t){"use strict";t.r(n),t.d(n,{AIResourceManagementConsole:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n,t=(0,l.Oc)().data.screen;return 0===t?n=(0,r.jsx)(u,{}):1===t&&(n=(0,r.jsx)(d,{})),n},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data;o.auth,o.ai_list,o.nodes_list;var s=o.screen;return(0,r.jsx)(a.p8,{width:350,height:425,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:0===s,icon:"list",onClick:function(){return t("menu",{screen:0})},children:"Allocated Resources"}),(0,r.jsx)(i.tU.Tab,{selected:1===s,icon:"circle-nodes",onClick:function(){return t("menu",{screen:1})},children:"Online Nodes"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{})})})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.screen;var o=t.ai_list;return t.nodes_list,(0,r.jsxs)(i.az,{children:[(!o||0===o.length)&&(0,r.jsx)(i.IC,{children:"No AI detected."}),!!o&&o.map(function(e,n){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Memory",children:e.memory}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Memory",children:e.memory_max}),(0,r.jsx)(i.Ki.Item,{label:"Bandwidth",children:e.bandwidth}),(0,r.jsx)(i.Ki.Item,{label:"Maximum Bandwidth",children:e.bandwidth_max})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data;a.screen,a.ai_list;var c=a.nodes_list;return(0,r.jsxs)(i.az,{children:[(!c||0===c.length)&&(0,r.jsx)(i.IC,{children:"No nodes detected."}),!!c&&c.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),buttons:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"circle-nodes",onClick:function(){return t("reassign",{uid:e.uid})},children:"Reassign"})}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Assigned AI",children:e.assigned_ai}),(0,r.jsx)(i.Ki.Item,{label:"Resource",children:(0,o.ZH)(e.resource)}),(0,r.jsx)(i.Ki.Item,{label:"Amount",children:e.amount})]})},e)})]})}},731:function(e,n,t){"use strict";t.r(n),t.d(n,{APC:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(1992),c=function(e){return(0,r.jsx)(l.p8,{width:510,height:435,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(d,{})})})},s={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"}},u={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"}},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.locked&&!l.siliconUser;l.normallyLocked;var d=s[l.externalPower]||s[0],f=s[l.chargingStatus]||s[0],h=l.powerChannels||[],m=u[l.malfStatus]||u[0],p=l.powerCellStatus/100;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.InterfaceLockNoticeBox,{}),(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main Breaker",color:d.color,buttons:(0,r.jsx)(i.$n,{icon:l.isOperating?"power-off":"times",content:l.isOperating?"On":"Off",selected:l.isOperating&&!c,color:l.isOperating?"":"bad",disabled:c,onClick:function(){return t("breaker")}}),children:["[ ",d.externalPowerText," ]"]}),(0,r.jsx)(i.Ki.Item,{label:"Power Cell",children:(0,r.jsx)(i.z2,{color:"good",value:p})}),(0,r.jsxs)(i.Ki.Item,{label:"Charge Mode",color:f.color,buttons:(0,r.jsx)(i.$n,{icon:l.chargeMode?"sync":"times",content:l.chargeMode?"Auto":"Off",selected:l.chargeMode,disabled:c,onClick:function(){return t("charge")}}),children:["[ ",f.chargingText," ]"]})]})}),(0,r.jsx)(i.wn,{title:"Power Channels",children:(0,r.jsxs)(i.Ki,{children:[h.map(function(e){var n=e.topicParams;return(0,r.jsxs)(i.Ki.Item,{label:e.title,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:!c&&(1===e.status||3===e.status),disabled:c,onClick:function(){return t("channel",n.auto)}}),(0,r.jsx)(i.$n,{icon:"power-off",content:"On",selected:!c&&2===e.status,disabled:c,onClick:function(){return t("channel",n.on)}}),(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:!c&&0===e.status,disabled:c,onClick:function(){return t("channel",n.off)}})]}),children:[e.powerLoad," W"]},e.title)}),(0,r.jsx)(i.Ki.Item,{label:"Total Load",children:(0,r.jsxs)("b",{children:[l.totalLoad," W"]})})]})}),(0,r.jsx)(i.wn,{title:"Misc",buttons:!!l.siliconUser&&(0,r.jsxs)(r.Fragment,{children:[!!l.malfStatus&&(0,r.jsx)(i.$n,{icon:m.icon,content:m.content,color:"bad",onClick:function(){return t(m.action)}}),(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:"Overload",onClick:function(){return t("overload")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cover Lock",buttons:(0,r.jsx)(i.$n,{mb:.4,icon:l.coverLocked?"lock":"unlock",content:l.coverLocked?"Engaged":"Disengaged",disabled:c,onClick:function(){return t("cover")}})}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Lighting",buttons:(0,r.jsx)(i.$n,{icon:"lightbulb-o",content:l.emergencyLights?"Enabled":"Disabled",disabled:c,onClick:function(){return t("emergency_lighting")}})}),(0,r.jsx)(i.Ki.Item,{label:"Night Shift Lighting",buttons:(0,r.jsx)(i.$n,{mt:.4,icon:"lightbulb-o",content:l.nightshiftLights?"Enabled":"Disabled",onClick:function(){return t("toggle_nightshift")}})})]})})]})}},6181:function(e,n,t){"use strict";t.r(n),t.d(n,{ATM:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(g)if(s)switch(c){case 1:n=(0,r.jsx)(f,{});break;case 2:n=(0,r.jsx)(h,{});break;case 3:n=(0,r.jsx)(x,{});break;default:n=(0,r.jsx)(m,{})}else n=(0,r.jsx)(p,{});else n=(0,r.jsxs)(o.az,{bold:!0,color:"bad",children:[(0,r.jsx)(o.In,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,r.jsx)(a.p8,{width:550,height:650,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(o.wn,{children:n})]})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data;i.machine_id;var a=i.held_card_name;return(0,r.jsxs)(o.wn,{title:"Nanotrasen Automatic Teller Machine",children:[(0,r.jsx)(o.az,{children:"For all your monetary needs!"}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Card",children:(0,r.jsx)(o.$n,{content:a,icon:"eject",onClick:function(){return t("insert_card")}})})})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.security_level;return(0,r.jsxs)(o.wn,{title:"Select a new security level for this account",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Number",icon:"unlock",selected:0===i,onClick:function(){return t("change_security_level",{new_security_level:1})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.Ki.Item,{label:"Level",children:(0,r.jsx)(o.$n,{content:"Account Pin",icon:"unlock",selected:2===i,onClick:function(){return t("change_security_level",{new_security_level:2})}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},h=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=s((0,i.useState)(0),2),h=f[0],m=f[1],p=s((0,i.useState)(0),2),x=p[0],j=p[1],b=a.money;return(0,r.jsxs)(o.wn,{title:"Transfer Fund",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",b]}),(0,r.jsx)(o.Ki.Item,{label:"Target Account Number",children:(0,r.jsx)(o.pd,{placeholder:"7 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Funds to Transfer",children:(0,r.jsx)(o.pd,{onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Transaction Purpose",children:(0,r.jsx)(o.pd,{fluid:!0,onChange:function(e){return j(e)}})})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return t("transfer",{target_acc_number:u,funds_amount:h,purpose:x})}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(0),2),u=c[0],d=c[1],f=a.owner_name,h=a.money;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Welcome, "+f,buttons:(0,r.jsx)(o.$n,{content:"Logout",icon:"sign-out-alt",onClick:function(){return t("logout")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Account Balance",children:["$",h]}),(0,r.jsx)(o.Ki.Item,{label:"Withdrawal Amount",children:(0,r.jsx)(o.pd,{onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){return t("withdrawal",{funds_amount:u})}})})]})}),(0,r.jsxs)(o.wn,{title:"Menu",children:[(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Change account security level",icon:"lock",onClick:function(){return t("view_screen",{view_screen:1})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return t("view_screen",{view_screen:2})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"View transaction log",icon:"list",onClick:function(){return t("view_screen",{view_screen:3})}})}),(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{content:"Print balance statement",icon:"print",onClick:function(){return t("balance_statement")}})})]})]})},p=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=s((0,i.useState)(null),2),u=c[0],d=c[1],f=s((0,i.useState)(null),2),h=f[0],m=f[1];return a.machine_id,a.held_card_name,(0,r.jsx)(o.wn,{title:"Insert card or enter ID and pin to login",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Account ID",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return d(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Pin",children:(0,r.jsx)(o.pd,{placeholder:"6 Digit Number",onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{children:(0,r.jsx)(o.$n,{content:"Login",icon:"sign-in-alt",onClick:function(){return t("attempt_auth",{account_num:u,account_pin:h})}})})]})})},x=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).transaction_log;return(0,r.jsxs)(o.wn,{title:"Transactions",children:[(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Timestamp"}),(0,r.jsx)(o.XI.Cell,{children:"Reason"}),(0,r.jsx)(o.XI.Cell,{children:"Value"}),(0,r.jsx)(o.XI.Cell,{children:"Terminal"})]}),t.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.time}),(0,r.jsx)(o.XI.Cell,{children:e.purpose}),(0,r.jsxs)(o.XI.Cell,{color:e.is_deposit?"green":"red",children:["$",e.amount]}),(0,r.jsx)(o.XI.Cell,{children:e.target_name})]},e)})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,l.Oc)(),t=n.act;return n.data,(0,r.jsx)(o.$n,{content:"Back",icon:"sign-out-alt",onClick:function(){return t("view_screen",{view_screen:0})}})}},4558:function(e,n,t){"use strict";t.r(n),t.d(n,{AccountsUplinkTerminal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(7352),u=t(736),d=t(6888),f=t(2264),h=t(4900);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(6888),u=t(2264),d=t(4900),f=function(e){switch(e){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";case 4:return"Advanced Disease Carriers";default:return"Something went wrong with this menu, make an issue report please!"}},h=function(e){switch(e){case 0:return(0,r.jsx)(j,{});case 1:return(0,r.jsx)(y,{});case 2:return(0,r.jsx)(w,{});case 3:return(0,r.jsx)(_,{});case 4:return(0,r.jsx)(I,{});default:return"Something went wrong with this menu, make an issue report please!"}},m=function(e){return(0,r.jsx)(c.p8,{width:800,height:600,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.IC,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,r.jsxs)(d.default.Default,{tabIndex:0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(p,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(x,{})})]})]})})})},p=function(){var e=(0,i.useContext)(d.default),n=e.tabIndex,t=e.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:0===n,onClick:function(){t(0)},icon:"user",children:"Antagonists"},"Antagonists"),(0,r.jsx)(o.tU.Tab,{selected:1===n,onClick:function(){t(1)},icon:"people-robbery",children:"Objectives"},"Objectives"),(0,r.jsx)(o.tU.Tab,{selected:2===n,onClick:function(){t(2)},icon:"handcuffs",children:"Security"},"Security"),(0,r.jsx)(o.tU.Tab,{selected:3===n,onClick:function(){t(3)},icon:"lock",children:"High Value Items"},"HighValueItems"),(0,r.jsx)(o.tU.Tab,{selected:4===n,onClick:function(){t(4)},icon:"virus",children:"Advanced Disease Carriers"},"AdvancedDiseaseCarriers")]})},x=function(){return(0,r.jsx)(s.default.Default,{children:(0,r.jsx)(g,{})})},g=function(){var e=(0,a.Oc)().act,n=(0,i.useContext)(d.default).tabIndex,t=(0,i.useContext)(s.default).setSearchText;return(0,r.jsx)(o.wn,{title:f(n),fill:!0,scrollable:!0,buttons:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.pd,{width:"300px",placeholder:"Search...",onChange:function(e){return t(e)}}),(0,r.jsx)(o.$n,{icon:"sync",onClick:function(){return e("refresh")},children:"Refresh"})]}),children:h(n)})},j=function(){return(0,r.jsx)(u.default.Default,{sortId:"antag_name",children:(0,r.jsx)(b,{})})},b=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.antagonists,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{id:"name",children:"Mob Name"}),(0,r.jsx)(O,{id:"",children:"Buttons"}),(0,r.jsx)(O,{id:"antag_name",children:"Antagonist Type"}),(0,r.jsx)(O,{id:"status",children:"Status"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.status+"|"+e.antag_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.body_destroyed?e.name:(0,r.jsx)(o.$n,{color:e.is_hijacker||!e.name?"red":"",tooltip:e.is_hijacker?"Hijacker":"",onClick:function(){return t("show_player_panel",{mind_uid:e.antag_mind_uid})},children:e.name?e.name:"??? (NO NAME)"})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.antag_mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.antag_mind_uid})},children:"OBS"}),(0,r.jsx)(o.$n,{onClick:function(){t("tp",{mind_uid:e.antag_mind_uid})},children:"TP"})]}),(0,r.jsx)(o.XI.Cell,{children:e.antag_name}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"red":"grey",children:e.status?e.status:"Alive"})})]},n)})]}):"No Antagonists!"},y=function(){return(0,r.jsx)(u.default.Default,{sortId:"target_name",children:(0,r.jsx)(v,{})})},v=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.objectives,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),c.filter((0,l.XZ)(d,function(e){return e.obj_name+"|"+e.target_name+"|"+(e.status?"success":"incompleted")+"|"+e.owner_name})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]||"target_name"===h&&e.no_target?t:void 0===n[h]||null===n[h]||"target_name"===h&&n.no_target?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.obj_uid})},children:e.obj_name})}),(0,r.jsx)(o.XI.Cell,{children:e.no_target?"":e.track.length?e.track.map(function(n,i){return(0,r.jsxs)(o.$n,{onClick:function(){return t("follow",{datum_uid:n})},children:[e.target_name," ",e.track.length>1?"("+(parseInt(i,10)+1)+")":""]},i)}):"No "+e.target_name+" Found"}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.status?"green":"grey",children:e.status?"Success":"Incomplete"})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("obj_owner",{owner_uid:e.owner_uid})},children:e.owner_name})})]},n)})]}):"No Objectives!"},w=function(){return(0,r.jsx)(u.default.Default,{sortId:"health",children:(0,r.jsx)(k,{})})},k=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.security,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder,p=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":e.broken_bone&&e.internal_bleeding?"Broken Bone, IB":e.broken_bone?"Broken Bone":e.internal_bleeding?"IB":"Alive"};return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId3",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"role",children:"Role"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,r.jsx)(O,{sort_group:"sortId3",id:"health",children:"Health"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.role+"|"+p(e)+"|"+e.antag})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.role}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:p(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.antag?(0,r.jsx)(o.$n,{textColor:"red",onClick:function(){t("tp",{mind_uid:e.mind_uid})},children:e.antag}):""}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{my:.5,minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Security!"},_=function(){return(0,r.jsx)(u.default.Default,{sortId:"person",children:(0,r.jsx)(C,{})})},C=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.high_value_items,d=(0,i.useContext)(s.default).searchText,f=(0,i.useContext)(u.default),h=f.sortId,m=f.sortOrder;return c.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),c.filter((0,l.XZ)(d,function(e){return e.name+"|"+e.loc})).sort(function(e,n){var t=m?1:-1;return void 0===e[h]||null===e[h]?t:void 0===n[h]||null===n[h]?-1*t:"number"==typeof e[h]?(e[h]-n[h])*t:e[h].localeCompare(n[h])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{tooltip:e.obj_desc,onClick:function(){return t("vv",{uid:e.uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.person})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:e.admin_z?"grey":"",children:e.loc})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.az,{color:"grey",children:e.admin_z?"On Admin Z-level":""})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.uid})},children:"FLW"})})]},n)})]}):"No High Value Items!"},I=function(){return(0,r.jsx)(u.default.Default,{sortId:"strain",children:(0,r.jsx)(S,{})})},S=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data,d=c.disease_carriers,f=c.virus_data,h=(0,i.useContext)(s.default).searchText,m=(0,i.useContext)(u.default),p=m.sortId,x=m.sortOrder,g=function(e){return 2===e.status?"Dead":1===e.status?"Unconscious":"Alive"};return d.length?(0,r.jsxs)(o.XI,{className:"AdminAntagMenu__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(O,{sort_group:"sortId4",id:"name",children:"Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"status",children:"Status"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"virus_name",children:"Virus Name"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"strain",children:"Strain"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"progress",children:"Progress"}),(0,r.jsx)(O,{sort_group:"sortId4",id:"health",children:"Health"})]}),d.filter((0,l.XZ)(h,function(e){return e.name+"||"+g(e)+"|"+e.strain+"|"+e.virus_name})).sort(function(e,n){var t=x?1:-1;return void 0===e[p]||null===e[p]?t:void 0===n[p]||null===n[p]?-1*t:"number"==typeof e[p]?(e[p]-n[p])*t:e[p].localeCompare(n[p])*t}).map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.$n,{color:e.patient_zero?"red":"",onClick:function(){return t("show_player_panel",{mind_uid:e.mind_uid})},children:e.name})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)(o.az,{color:2===e.status?"red":1===e.status?"orange":e.broken_bone||e.internal_bleeding?"yellow":"grey",children:g(e)})}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.virus_name}),(0,r.jsx)(o.m_,{position:"right",content:"Symptoms: "+f[e.strain],children:(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:e.strain})},n),(0,r.jsx)(o.XI.Cell,{children:e.patient_zero?"Patient Zero":(0,r.jsx)(o.z2,{minValue:0,value:e.progress/100,maxValue:1,ranges:{good:[0,20],average:[20,60],bad:[60,100]},children:e.progress})}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.z2,{minValue:0,value:e.health/e.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:e.health})}),(0,r.jsxs)(o.XI.Cell,{collapsing:!0,children:[(0,r.jsx)(o.$n,{onClick:function(){t("pm",{ckey:e.ckey})},children:"PM"}),(0,r.jsx)(o.$n,{onClick:function(){t("follow",{datum_uid:e.mind_uid})},children:"FLW"}),(0,r.jsx)(o.$n,{onClick:function(){t("obs",{mind_uid:e.mind_uid})},children:"OBS"})]})]},n)})]}):"No Disease Carriers!"},O=function(e){var n=e.id,t=(e.sort_group,e.default_sort,e.children),l=(0,i.useContext)(u.default),a=l.sortId,c=l.setSortId,s=l.sortOrder,d=l.setSortOrder;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:a!==n&&"transparent",width:"100%",onClick:function(){a===n?d(!s):(c(n),d(!0))},children:[t,a===n&&(0,r.jsx)(o.In,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},2794:function(e,n,t){"use strict";t.r(n),t.d(n,{AgentCard:()=>m,AgentCardAppearances:()=>x,AgentCardInfo:()=>p});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=a[c.power.main]||a[0],u=a[c.power.backup]||a[0],d=a[c.shock]||a[0];return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Power Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Main",color:s.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){return t("disrupt-main")}}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"[".concat(c.power.main_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Backup",color:u.color,buttons:(0,r.jsx)(i.$n,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){return t("disrupt-backup")}}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"[".concat(c.power.backup_timeleft,"s]")]}),(0,r.jsxs)(i.Ki.Item,{label:"Electrify",color:d.color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&2!==c.shock),content:"Restore",onClick:function(){return t("shock-restore")}}),(0,r.jsx)(i.$n,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){return t("shock-temp")}}),(0,r.jsx)(i.$n,{icon:"bolt",disabled:!c.wires.shock||0===c.shock,content:"Permanent",onClick:function(){return t("shock-perm")}})]}),children:[2===c.shock?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"[".concat(c.shock_timeleft,"s]")||-1===c.shock_timeleft&&"[Permanent]"]})]})}),(0,r.jsx)(i.wn,{title:"Access and Door Control",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Scan",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){return t("idscan-toggle")}}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Emergency Access",buttons:(0,r.jsx)(i.$n,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){return t("emergency-toggle")}})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolts",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){return t("bolt-toggle")}}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){return t("light-toggle")}}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){return t("safe-toggle")}}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,r.jsx)(i.$n,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){return t("speed-toggle")}}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Door Control",color:"bad",buttons:(0,r.jsx)(i.$n,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){return t("open-close")}}),children:!!(c.locked||c.welded)&&(0,r.jsxs)("span",{children:["[Door is ",c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"","!]"]})})]})})]})})}},5486:function(e,n,t){"use strict";t.r(n),t.d(n,{AirAlarm:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1992),s=t(4900),u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).locked;return(0,r.jsx)(a.p8,{width:570,height:t?310:755,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(c.InterfaceLockNoticeBox,{}),(0,r.jsx)(f,{}),!t&&(0,r.jsxs)(s.default.Default,{tabIndex:0,children:[(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})]})})},d=function(e){return 0===e?"green":1===e?"orange":"red"},f=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.air,s=a.mode,u=a.atmos_alarm,f=a.locked,h=a.alarmActivated,m=a.fireAlarmActivated,p=a.rcon,x=a.target_temp;return n=0===c.danger.overall?0===u?"Optimal":"Caution: Atmos alert in area":1===c.danger.overall?"Caution":"DANGER: Internals Required",(0,r.jsx)(o.wn,{title:"Air Status",children:c?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Pressure",children:(0,r.jsxs)(o.az,{color:d(c.danger.pressure),children:[(0,r.jsx)(o.zv,{value:c.pressure})," kPa",!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{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})}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Oxygen",children:(0,r.jsx)(o.z2,{value:c.contents.oxygen/100,fractionDigits:"1",color:d(c.danger.oxygen)})}),(0,r.jsx)(o.Ki.Item,{label:"Nitrogen",children:(0,r.jsx)(o.z2,{value:c.contents.nitrogen/100,fractionDigits:"1",color:d(c.danger.nitrogen)})}),(0,r.jsx)(o.Ki.Item,{label:"Carbon Dioxide",children:(0,r.jsx)(o.z2,{value:c.contents.co2/100,fractionDigits:"1",color:d(c.danger.co2)})}),(0,r.jsx)(o.Ki.Item,{label:"Toxins",children:(0,r.jsx)(o.z2,{value:c.contents.plasma/100,fractionDigits:"1",color:d(c.danger.plasma)})}),c.contents.n2o>.1&&(0,r.jsx)(o.Ki.Item,{label:"Nitrous Oxide",children:(0,r.jsx)(o.z2,{value:c.contents.n2o/100,fractionDigits:"1",color:d(c.danger.n2o)})}),c.contents.h2>.1&&(0,r.jsx)(o.Ki.Item,{label:"Hydrogen",children:(0,r.jsx)(o.z2,{value:c.contents.h2/100,fractionDigits:"1",color:d(c.danger.h2)})}),c.contents.water_vapor>.1&&(0,r.jsx)(o.Ki.Item,{label:"Water Vapor",children:(0,r.jsx)(o.z2,{value:c.contents.water_vapor/100,fractionDigits:"1",color:d(c.danger.water_vapor)})}),c.contents.other>.1&&(0,r.jsx)(o.Ki.Item,{label:"Other",children:(0,r.jsx)(o.z2,{value:c.contents.other/100,fractionDigits:"1",color:d(c.danger.other)})}),(0,r.jsx)(o.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(o.az,{color:d(c.danger.temperature),children:[(0,r.jsx)(o.zv,{value:c.temperature})," K / ",(0,r.jsx)(o.zv,{value:c.temperature_c})," C\xa0",(0,r.jsx)(o.$n,{icon:"thermometer-full",content:x+" C",onClick:function(){return i("temperature")}}),(0,r.jsx)(o.$n,{content:c.thermostat_state?"On":"Off",selected:c.thermostat_state,icon:"power-off",onClick:function(){return i("thermostat_state")}})]})}),(0,r.jsx)(o.Ki.Item,{label:"Local Status",children:(0,r.jsxs)(o.az,{color:d(c.danger.overall),children:[n,!f&&(0,r.jsxs)(r.Fragment,{children:["\xa0",(0,r.jsx)(o.$n,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return i(h?"atmos_reset":"atmos_alarm")}})]})]})}),(0,r.jsx)(o.Ki.Item,{label:"Fire Alarm Status",children:!f&&(0,r.jsx)(o.$n,{content:m?"Reset Fire Alarm":"Activate Fire Alarm",selected:m,onClick:function(){return i("set_fire_alarm")}})}),(0,r.jsxs)(o.Ki.Item,{label:"Remote Control Settings",children:[(0,r.jsx)(o.$n,{content:"Off",selected:1===p,onClick:function(){return i("set_rcon",{rcon:1})}}),(0,r.jsx)(o.$n,{content:"Auto",selected:2===p,onClick:function(){return i("set_rcon",{rcon:2})}}),(0,r.jsx)(o.$n,{content:"On",selected:3===p,onClick:function(){return i("set_rcon",{rcon:3})}})]})]}):(0,r.jsx)(o.az,{children:"Unable to acquire air sample!"})})},h=function(e){var n=(0,i.useContext)(s.default),t=n.tabIndex,l=n.setTabIndex;return(0,r.jsxs)(o.tU,{children:[(0,r.jsxs)(o.tU.Tab,{selected:0===t,onClick:function(){return l(0)},children:[(0,r.jsx)(o.In,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,r.jsxs)(o.tU.Tab,{selected:1===t,onClick:function(){return l(1)},children:[(0,r.jsx)(o.In,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,r.jsxs)(o.tU.Tab,{selected:2===t,onClick:function(){return l(2)},children:[(0,r.jsx)(o.In,{name:"cog"})," Mode"]},"Mode"),(0,r.jsxs)(o.tU.Tab,{selected:3===t,onClick:function(){return l(3)},children:[(0,r.jsx)(o.In,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},m=function(e){switch((0,i.useContext)(s.default).tabIndex){case 0:return(0,r.jsx)(p,{});case 1:return(0,r.jsx)(x,{});case 2:return(0,r.jsx)(g,{});case 3:return(0,r.jsx)(j,{});default:return"WE SHOULDN'T BE HERE!"}},p=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.vents.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.direction?"Blowing":"Siphoning",icon:e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return t("command",{cmd:"direction",val:!e.direction,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(o.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,r.jsxs)(o.Ki.Item,{label:"External Pressure Target",children:[(0,r.jsx)(o.zv,{value:e.external})," kPa\xa0",(0,r.jsx)(o.$n,{content:"Set",icon:"cog",onClick:function(){return t("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Reset",icon:"redo-alt",onClick:function(){return t("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)})},x=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubbers.map(function(e){return(0,r.jsx)(o.wn,{title:e.name,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Status",children:[(0,r.jsx)(o.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",val:!e.power,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",val:!e.scrubbing,id_tag:e.id_tag})}})]}),(0,r.jsx)(o.Ki.Item,{label:"Range",children:(0,r.jsx)(o.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",val:!e.widenet,id_tag:e.id_tag})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(o.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",val:!e.filter_co2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",val:!e.filter_toxins,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",val:!e.filter_n2o,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",val:!e.filter_o2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",val:!e.filter_n2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",val:!e.filter_h2,id_tag:e.id_tag})}}),(0,r.jsx)(o.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",val:!e.filter_h2o,id_tag:e.id_tag})}})]})]})},e.name)})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.modes,c=i.presets,s=i.emagged,u=i.mode,d=i.preset;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"System Mode",children:Object.keys(a).map(function(e){var n=a[e];if(!n.emagonly||s)return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:n.name,icon:"cog",selected:n.id===u,onClick:function(){return t("mode",{mode:n.id})}})}),(0,r.jsx)(o.XI.Cell,{children:n.desc})]},n.name)})}),(0,r.jsxs)(o.wn,{title:"System Presets",children:[(0,r.jsx)(o.az,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,r.jsx)(o.XI,{mt:1,children:c.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{textAlign:"right",width:1,children:(0,r.jsx)(o.$n,{content:e.name,icon:"cog",selected:e.id===d,onClick:function(){return t("preset",{preset:e.id})}})}),(0,r.jsx)(o.XI.Cell,{children:e.desc})]},e.name)})})]})]})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.thresholds;return(0,r.jsx)(o.wn,{title:"Alarm Thresholds",children:(0,r.jsxs)(o.XI,{children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{width:"20%",children:"Value"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,r.jsx)(o.XI.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,r.jsx)(o.XI.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),e.settings.map(function(e){return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:-1===e.selected?"Off":e.selected,onClick:function(){return t("command",{cmd:"set_threshold",env:e.env,var:e.val})}})},e.val)})]},e.name)})]})})}},6962:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockAccessController:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.exterior_status,d=s.interior_status,f=s.processing;return n="open"===u?(0,r.jsx)(i.$n,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:f,onClick:function(){return c("force_ext")}}):(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:f,onClick:function(){return c("cycle_ext_door")}}),t="open"===d?(0,r.jsx)(i.$n,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:f,color:"open"===d?"red":f?"yellow":null,onClick:function(){return c("force_int")}}):(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:f,onClick:function(){return c("cycle_int_door")}}),(0,r.jsx)(l.p8,{width:330,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Door Status",children:"closed"===u?"Locked":"Open"}),(0,r.jsx)(i.Ki.Item,{label:"Internal Door Status",children:"closed"===d?"Locked":"Open"})]})}),(0,r.jsx)(i.wn,{title:"Actions",children:(0,r.jsxs)(i.az,{children:[n,t]})})]})})}},9281:function(e,n,t){"use strict";t.r(n),t.d(n,{AirlockElectronics:()=>c,ChooseAccess:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){return(0,r.jsx)(l.p8,{width:500,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.unrestricted_dir;return(0,r.jsx)(i.wn,{title:"Access Control",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:4&l,onClick:function(){return t("unrestricted_access",{unres_dir:4})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:2&l,onClick:function(){return t("unrestricted_access",{unres_dir:2})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:8&l,onClick:function(){return t("unrestricted_access",{unres_dir:8})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:1&l,onClick:function(){return t("unrestricted_access",{unres_dir:1})}})})]})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.selected_accesses,s=l.one_access,u=l.regions;return(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(r.Fragment,{}),grantableList:[],usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return t("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,content:"All",onClick:function(){return t("set_one_access",{access:"all"})}})]}),accesses:u,selectedList:c,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}},934:function(e,n,t){"use strict";t.r(n),t.d(n,{AlertModal:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t30?Math.ceil(b.length/4):0)+(b.length&&g?5:0),I=325+100*(x.length>2),S=function(e){0===k&&-1===e?_(x.length-1):k===x.length-1&&1===e?_(0):_(k+e)};return(0,r.jsxs)(c.p8,{title:v,height:C,width:I,children:[!!y&&(0,r.jsx)(s.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.iy||n===l.Ri?d("choose",{choice:x[k]}):n===l.s6?d("cancel"):n===l.iU?(e.preventDefault(),S(-1)):(n===l.aW||n===l.zh)&&(e.preventDefault(),S(1))},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,m:1,children:(0,r.jsx)(o.az,{color:"label",overflow:"hidden",children:b})}),(0,r.jsxs)(o.BJ.Item,{children:[!!m&&(0,r.jsx)(o.y5,{}),(0,r.jsx)(f,{selected:k})]})]})})})]})},f=function(e){var n=(0,a.Oc)().data,t=n.buttons,i=void 0===t?[]:t,l=n.large_buttons,c=n.swapped_buttons,s=e.selected;return(0,r.jsx)(o.so,{fill:!0,align:"center",direction:c?"row":"row-reverse",justify:"space-around",wrap:!0,children:null==i?void 0:i.map(function(e,n){return l&&i.length<3?(0,r.jsx)(o.so.Item,{grow:!0,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n):(0,r.jsx)(o.so.Item,{grow:+!!l,children:(0,r.jsx)(h,{button:e,id:n.toString(),selected:s===n})},n)})})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.large_buttons,l=e.button,c=e.selected,s=l.length>7?"100%":7;return(0,r.jsx)(o.$n,{mx:+!!i,pt:.33*!!i,content:l,fluid:!!i,onClick:function(){return t("choose",{choice:l})},selected:c,textAlign:"center",height:!!i&&2,width:!i&&s})}},2712:function(e,n,t){"use strict";t.r(n),t.d(n,{AntagInfoHeretic:()=>y});var r=t(8138),i=t(4530),o=t(2864),l=t(7790),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?e.cost:"FREE")})]}),!!e.ascension&&(0,r.jsx)(l.az,{textAlign:"center",fontSize:"32px",children:(0,r.jsx)("span",{style:d,children:"DUSK"})})]},e.name)})}),(0,r.jsx)("hr",{})]},n)})})]})},b=function(){var e=(0,o.Oc)().data.charges;return(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsxs)(l.az,{textAlign:"center",fontSize:"20px",mb:1,children:["You have ",(0,r.jsx)("b",{children:e||0}),"\xa0",(0,r.jsxs)("span",{style:u,children:["knowledge point",1!==e?"s":""]})," to spend."]}),(0,r.jsx)(l.so.Item,{grow:!0,children:(0,r.jsx)(j,{})})]})},y=function(){var e,n=(0,o.Oc)().data.ascended,t=(e=(0,i.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,2)||function(e,n){if(e){if("string"==typeof e)return c(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return c(e,2)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=t[0],u=t[1];return(0,r.jsx)(a.p8,{width:675,height:635,children:(0,r.jsx)(a.p8.Content,{style:{backgroundImage:"none",background:n?"radial-gradient(circle, rgba(24,9,9,1) 54%, rgba(31,10,10,1) 60%, rgba(46,11,11,1) 80%, rgba(47,14,14,1) 100%);":"radial-gradient(circle, rgba(9,9,24,1) 54%, rgba(10,10,31,1) 60%, rgba(21,11,46,1) 80%, rgba(24,14,47,1) 100%);"},children:(0,r.jsxs)(l.so,{direction:"column",height:"100%",children:[(0,r.jsx)(l.so.Item,{children:(0,r.jsxs)(l.tU,{fluid:!0,children:[(0,r.jsx)(l.tU.Tab,{icon:"info",selected:0===s,onClick:function(){return u(0)},children:"Information"}),(0,r.jsx)(l.tU.Tab,{icon:1===s?"book-open":"book",selected:1===s,onClick:function(){return u(1)},children:"Research"})]})}),(0,r.jsx)(l.so.Item,{grow:!0,children:0===s?(0,r.jsx)(m,{}):(0,r.jsx)(b,{})})]})})})}},6473:function(e,n,t){"use strict";t.r(n),t.d(n,{AppearanceChanger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.change_race,u=a.species,d=a.specimen,f=a.change_gender,h=a.gender,m=a.change_eye_color,p=a.change_skin_tone,x=a.change_skin_color,g=a.change_runechat_color,j=a.change_head_accessory_color,b=a.change_hair_color,y=a.change_secondary_hair_color,v=a.change_facial_hair_color,w=a.change_secondary_facial_hair_color,k=a.change_head_marking_color,_=a.change_body_marking_color,C=a.change_tail_marking_color,I=a.change_head_accessory,S=a.head_accessory_styles,O=a.head_accessory_style,A=a.change_hair,P=a.hair_styles,B=a.hair_style,E=a.change_hair_gradient,z=a.change_facial_hair,T=a.facial_hair_styles,N=a.facial_hair_style,R=a.change_head_markings,$=a.head_marking_styles,D=a.head_marking_style,M=a.change_body_markings,L=a.body_marking_styles,K=a.body_marking_style,J=a.change_tail_markings,X=a.tail_marking_styles,U=a.tail_marking_style,F=a.change_body_accessory,V=a.body_accessory_styles,H=a.body_accessory_style,W=a.change_alt_head,q=a.alt_head_styles,G=a.alt_head_style,Y=!1;return(m||p||x||j||g||b||y||v||w||k||_||C)&&(Y=!0),(0,r.jsx)(l.p8,{width:800,height:450,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[!!s&&(0,r.jsx)(i.Ki.Item,{label:"Species",children:u.map(function(e){return(0,r.jsx)(i.$n,{content:e.specimen,selected:e.specimen===d,onClick:function(){return t("race",{race:e.specimen})}},e.specimen)})}),!!f&&(0,r.jsxs)(i.Ki.Item,{label:"Gender",children:[(0,r.jsx)(i.$n,{content:"Male",selected:"male"===h,onClick:function(){return t("gender",{gender:"male"})}}),(0,r.jsx)(i.$n,{content:"Female",selected:"female"===h,onClick:function(){return t("gender",{gender:"female"})}}),(0,r.jsx)(i.$n,{content:"Genderless",selected:"plural"===h,onClick:function(){return t("gender",{gender:"plural"})}})]}),!!Y&&(0,r.jsx)(c,{}),!!I&&(0,r.jsx)(i.Ki.Item,{label:"Head accessory",children:S.map(function(e){return(0,r.jsx)(i.$n,{content:e.headaccessorystyle,selected:e.headaccessorystyle===O,onClick:function(){return t("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)})}),!!A&&(0,r.jsx)(i.Ki.Item,{label:"Hair",children:P.map(function(e){return(0,r.jsx)(i.$n,{content:e.hairstyle,selected:e.hairstyle===B,onClick:function(){return t("hair",{hair:e.hairstyle})}},e.hairstyle)})}),!!E&&(0,r.jsxs)(i.Ki.Item,{label:"Hair Gradient",children:[(0,r.jsx)(i.$n,{content:"Change Style",onClick:function(){return t("hair_gradient")}}),(0,r.jsx)(i.$n,{content:"Change Offset",onClick:function(){return t("hair_gradient_offset")}}),(0,r.jsx)(i.$n,{content:"Change Color",onClick:function(){return t("hair_gradient_colour")}}),(0,r.jsx)(i.$n,{content:"Change Alpha",onClick:function(){return t("hair_gradient_alpha")}})]}),!!z&&(0,r.jsx)(i.Ki.Item,{label:"Facial hair",children:T.map(function(e){return(0,r.jsx)(i.$n,{content:e.facialhairstyle,selected:e.facialhairstyle===N,onClick:function(){return t("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)})}),!!R&&(0,r.jsx)(i.Ki.Item,{label:"Head markings",children:$.map(function(e){return(0,r.jsx)(i.$n,{content:e.headmarkingstyle,selected:e.headmarkingstyle===D,onClick:function(){return t("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)})}),!!M&&(0,r.jsx)(i.Ki.Item,{label:"Body markings",children:L.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===K,onClick:function(){return t("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)})}),!!J&&(0,r.jsx)(i.Ki.Item,{label:"Tail markings",children:X.map(function(e){return(0,r.jsx)(i.$n,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===U,onClick:function(){return t("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)})}),!!F&&(0,r.jsx)(i.Ki.Item,{label:"Body accessory",children:V.map(function(e){return(0,r.jsx)(i.$n,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===H,onClick:function(){return t("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)})}),!!W&&(0,r.jsx)(i.Ki.Item,{label:"Alternate head",children:q.map(function(e){return(0,r.jsx)(i.$n,{content:e.altheadstyle,selected:e.altheadstyle===G,onClick:function(){return t("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.Ki.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_runechat_color",text:"Change runechat color",action:"runechat_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!!l[e.key]&&(0,r.jsx)(i.$n,{content:e.text,onClick:function(){return t(e.action)}},e.key)})})}},6085:function(e,n,t){"use strict";t.r(n),t.d(n,{ArcadeBattle:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e,n){var t=(0,o.Oc)(),a=t.act,c=t.data,s=c.enemyName,u=c.playerHP,d=c.playerMaxHP,f=c.playerMP,h=c.playerMaxMP,m=c.enemyHP,p=c.enemyMaxHP,x=c.onCooldown,g=c.gameOver,j=c.previousEvent;return g?(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,align:"center",title:m<1?"Rejoyce!":"Game Over!",children:(0,r.jsxs)(i.BJ,{justify:"space-between",vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:j})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(i.$n,{bold:!0,fluid:!0,height:"100%",fontSize:"min(8vw, 15vh)",textAlign:"center",verticalAlignContent:"middle",onClick:function(){return a("newgame")},children:"New Game"})})]})})})}):(0,r.jsx)(l.p8,{height:350,width:350,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:s,children:(0,r.jsxs)(i.z2,{maxValue:p,minValue:0,value:m,ranges:{red:[-10,10],orange:[10,20],green:[20,p]},children:["Their Health: ",m]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Fight!",children:j})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"You",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:d,minValue:0,value:u,ranges:{red:[-10,10],orange:[10,20],green:[20,d]},children:["Your Health: ",u]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.z2,{maxValue:h,minValue:0,value:f,ranges:{red:[-10,h/4],orange:[h/4,h/2],green:[h/2,h]},children:["Your Magic: ",f]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{bold:!0,align:"center",children:"What will you do?"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"burst",lineHeight:3,onClick:function(){return a("attack")},disabled:x,children:"Attack"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"plus",lineHeight:3,onClick:function(){return a("heal")},disabled:x,children:"Heal"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"star",lineHeight:3,onClick:function(){return a("charge")},disabled:x,children:"Recharge"})})]})})]})})})]})})})}},3438:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosAlertConsole:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.pressure,u=a.max_pressure,d=a.filter_type,f=a.filter_type_list;return(0,r.jsx)(l.p8,{width:380,height:160,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:s,tickWhileDragging:!0,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Filter",children:f.map(function(e){return(0,r.jsx)(i.$n,{selected:e.gas_type===d,content:e.label,onClick:function(){return t("set_filter",{filter:e.gas_type})}},e.label)})})]})})})})}},7440:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosMixer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.on,u=a.pressure,d=a.max_pressure,f=a.node1_concentration,h=a.node2_concentration;return(0,r.jsx)(l.p8,{width:330,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return t("min_pressure")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:d,value:u,onChange:function(e){return t("custom_pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:u===d,width:2.2,onClick:function(){return t("max_pressure")}})]}),(0,r.jsx)(c,{node_name:"Node 1",node_ref:f}),(0,r.jsx)(c,{node_name:"Node 2",node_ref:h})]})})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.node_name,a=e.node_ref;return(0,r.jsxs)(i.Ki.Item,{label:l,children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a-10)/100})}}),(0,r.jsx)(i.Q7,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,step:1,stepPixelSize:10,minValue:0,maxValue:100,value:a,onChange:function(e){return t("set_node",{node_name:l,concentration:e/100})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===a,onClick:function(){return t("set_node",{node_name:l,concentration:(a+10)/100})}})]})}},7897:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosPump:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.rate,u=a.max_rate,d=a.gas_unit,f=a.step;return(0,r.jsx)(l.p8,{width:330,height:110,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Rate",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_rate")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_rate",{rate:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_rate")}})]})]})})})})}},1164:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTankControl:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.sensors||{};return(0,r.jsx)(c.p8,{width:400,height:435,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[Object.keys(d).map(function(e){return(0,r.jsx)(i.wn,{title:e,children:(0,r.jsxs)(i.Ki,{children:[Object.keys(d[e]).indexOf("pressure")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[d[e].pressure," kpa"]}):"",Object.keys(d[e]).indexOf("temperature")>-1?(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[d[e].temperature," K"]}):"",["o2","n2","plasma","co2","n2o","h2"].map(function(n){return Object.keys(d[e]).indexOf(n)>-1?(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(n),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(n),value:d[e][n],minValue:0,maxValue:100,children:(0,o.Mg)(d[e][n],2)+"%"})},(0,a.wM)(n)):""})]})},e)}),(0,r.jsx)(i.wn,{title:"Inlets",children:s.inlets&&Object.keys(s.inlets).length>0?s.inlets.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_inlet_active",{dev:e.uid})}})}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:e.rate,onChange:function(n){return t("set_inlet_volume_rate",{dev:e.uid,val:n})}})})]})},e)}):""}),(0,r.jsxs)(i.wn,{title:"Outlets",children:[s.vent_outlets&&Object.keys(s.vent_outlets).length>0?s.vent_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:(e.on,"power-off"),content:e.on?"On":"Off",color:e.on?null:"red",selected:e.on,onClick:function(){return t("toggle_outlet_active",{dev:e.uid})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure Checks",children:[(0,r.jsx)(i.$n,{content:"External",selected:1===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:1})}}),(0,r.jsx)(i.$n,{content:"Internal",selected:2===e.checks,onClick:function(){return t("set_outlet_reference",{dev:e.uid,val:2})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Rate",children:(0,r.jsx)(i.Q7,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:e.rate,onChange:function(n){return t("set_outlet_pressure",{dev:e.uid,val:n})}})})]})},e)}):"",s.scrubber_outlets&&Object.keys(s.scrubber_outlets).length>0?(0,r.jsx)(u,{}):""]})]})})},u=function(e){var n=(0,l.Oc)(),t=n.act;return n.data.scrubber_outlets.map(function(e){return(0,r.jsx)(i.wn,{title:"Outlet: "+e.name,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[(0,r.jsx)(i.$n,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return t("command",{cmd:"power",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:e.scrubbing?"Scrubbing":"Siphoning",icon:e.scrubbing?"filter":"sign-in-alt",onClick:function(){return t("command",{cmd:"scrubbing",id_tag:e.id_tag})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Range",children:(0,r.jsx)(i.$n,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return t("command",{cmd:"widenet",id_tag:e.id_tag})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Filtering",children:[(0,r.jsx)(i.$n,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return t("command",{cmd:"co2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return t("command",{cmd:"tox_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return t("command",{cmd:"n2o_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return t("command",{cmd:"o2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return t("command",{cmd:"n2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Hydrogen",selected:e.filter_h2,onClick:function(){return t("command",{cmd:"h2_scrub",id_tag:e.id_tag})}}),(0,r.jsx)(i.$n,{content:"Water Vapor",selected:e.filter_h2o,onClick:function(){return t("command",{cmd:"h2o_scrub",id_tag:e.id_tag})}})]})]})},e.name)})}},8340:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosTemperatureGate:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.on,s=a.temperature,u=a.max_temp,d=a.temp_unit,f=a.step,h=a.inverted;return(0,r.jsx)(l.p8,{width:330,height:130,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inverted",children:(0,r.jsx)(i.$n,{icon:h?"arrow-up":"arrow-down",content:h?"Yes":"No",color:h?null:"red",selected:h,onClick:function(){return t("inverted")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",textAlign:"center",disabled:0===s,width:2.2,onClick:function(){return t("min_temp")}}),(0,r.jsx)(i.Q7,{animated:!0,unit:d,width:6.1,lineHeight:1.5,step:f,minValue:0,maxValue:u,value:s,onChange:function(e){return t("custom_temperature",{temperature:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",textAlign:"center",disabled:s===u,width:2.2,onClick:function(){return t("max_temp")}})]})]})})})})}},6561:function(e,n,t){"use strict";t.r(n),t.d(n,{AugmentMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"".concat(t.current_level," / ").concat(t.max_level):"0 / ".concat(e.max_level);return(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.BJ,{vertical:!1,children:[(0,r.jsx)(o.$n,{height:"20px",width:"35px",mb:1,textAlign:"center",content:i,disabled:i>c||t&&t.current_level===t.max_level,tooltip:"Purchase this ability?",onClick:function(){n("purchase",{ability_path:e.ability_path}),p(m)}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.desc||"Description not available"}),(0,r.jsxs)(o.BJ.Item,{children:["Level: ",(0,r.jsx)("span",{style:{color:"green"},children:l}),v&&e.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",e.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})]})},h=function(e){var n=e.act,t=e.abilityTabs,i=e.knownAbilities,l=e.usableSwarms,a=i.filter(function(e){return e.current_levell,tooltip:"Upgrade this ability?",onClick:function(){return n("purchase",{ability_path:e.ability_path})}}),(0,r.jsx)(o.BJ.Item,{fontSize:"16px",children:e.name})]}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{fontSize:"13px",children:e.upgrade_text}),(0,r.jsxs)(o.BJ.Item,{children:["Level:"," ",(0,r.jsx)("span",{style:{color:"green"},children:"".concat(e.current_level," / ").concat(e.max_level)}),i&&i.stage>0&&(0,r.jsxs)("span",{children:[" (Stage: ",i.stage,")"]})]}),(0,r.jsx)(o.BJ.Divider,{})]})})]},e.name)})})}},8762:function(e,n,t){"use strict";t.r(n),t.d(n,{Autolathe:()=>f});var r=t(8138),i=t(8587),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn)&&!(e.requirements.glass*r>t)},f=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,f=s.total_amount,h=(s.max_amount,s.metal_amount),m=s.glass_amount,p=s.busyname,x=s.busyamt,g=s.showhacked,j=s.buildQueue,b=s.buildQueueLen,y=s.recipes,v=s.categories,w=s.fill_percent,k=u((0,a.QY)("category","Tools"),2),_=k[0],C=k[1],I=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),S=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),O=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),A=u((0,a.QY)("searchText",""),2),P=A[0],B=A[1],E=[];b>0&&(E=j.map(function(e,n){return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.$n,{fluid:!0,icon:"times",color:"transparent",content:e[0],onClick:function(){return t("remove_from_queue",{remove_from_queue:n+1})}},n)},n)}));var z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return(e.category.indexOf(_)>-1||!!n)&&(!!g||!e.hacked)});if(n){var r=(0,l.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name.toLowerCase()})}(y,P),T="Build";return P?T="Results for: '"+P+"':":_&&(T="Build ("+_+")"),(0,r.jsx)(c.p8,{width:750,height:525,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{width:"70%",children:(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:T,buttons:(0,r.jsx)(o.ms,{width:"150px",options:v,selected:_,onSelected:function(e){return C(e)}}),children:[(0,r.jsx)(o.pd,{fluid:!0,mb:1,placeholder:"Search for...",onChange:function(e){return B(e)},value:P}),z.map(function(e){return(0,r.jsxs)(o.BJ.Item,{grow:!0,children:[(0,r.jsx)("img",{src:"data:image /jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&1===x,disabled:!d(e,h,m,1),onClick:function(){return t("make",{make:e.uid,multiplier:1})},children:e.name}),e.max_multiplier>=10&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&10===x,disabled:!d(e,h,m,10),onClick:function(){return t("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,r.jsx)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&25===x,disabled:!d(e,h,m,25),onClick:function(){return t("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,r.jsxs)(o.$n,{mr:1,icon:"hammer",selected:p===e.name&&x===e.max_multiplier,disabled:!d(e,h,m,e.max_multiplier),onClick:function(){return t("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]}),e.requirements&&Object.keys(e.requirements).map(function(n){return(0,l.Sn)(n)+": "+e.requirements[n]}).join(", ")||(0,r.jsx)(o.az,{children:"No resources required."})]},e.uid)})]})}),(0,r.jsxs)(o.BJ.Item,{width:"30%",children:[(0,r.jsx)(o.wn,{title:"Materials",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Metal",children:I}),(0,r.jsx)(o.Ki.Item,{label:"Glass",children:S}),(0,r.jsx)(o.Ki.Item,{label:"Total",children:O}),(0,r.jsxs)(o.Ki.Item,{label:"Storage",children:[w,"% Full"]})]})}),(0,r.jsx)(o.wn,{title:"Building",children:(0,r.jsx)(o.az,{color:p?"green":"",children:p||"Nothing"})}),(0,r.jsxs)(o.wn,{title:"Build Queue",height:23.7,children:[E,(0,r.jsx)(o.$n,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!b,onClick:function(){return t("clear_queue")}})]})]})]})})})}},9766:function(e,n,t){"use strict";t.r(n),t.d(n,{BioChipPad:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.glow_brightness_base,s=a.glow_brightness_power,u=a.glow_contrast_base,d=a.glow_contrast_power,f=a.exposure_brightness_base,h=a.exposure_brightness_power,m=a.exposure_contrast_base,p=a.exposure_contrast_power;return(0,r.jsx)(l.p8,{title:"BloomEdit",width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Bloom Edit",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:c,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:s,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Lamp Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:u,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Lamp Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Lamp Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:d,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("glow_contrast_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Brightness"}),(0,r.jsx)(i.Q7,{fluid:!0,value:f,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Brightness Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Brightness * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:h,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_brightness_power",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Base",children:[(0,r.jsx)(i.az,{inline:!0,children:"Base Exposure Contrast"}),(0,r.jsx)(i.Q7,{fluid:!0,value:m,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_base",{value:e})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Exposure Contrast Power",children:[(0,r.jsx)(i.az,{inline:!0,children:"Exposure Contrast * Light Power"}),(0,r.jsx)(i.Q7,{fluid:!0,value:p,minValue:-10,maxValue:10,step:.01,width:"20px",onChange:function(e){return t("exposure_contrast_power",{value:e})}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{children:[(0,r.jsx)(i.$n,{content:"Reload Lamps with New Parameters",onClick:function(){return t("update_lamps")}}),(0,r.jsx)(i.$n,{content:"Reset to Default",onClick:function(){return t("default")}})]})]})})})})}},7166:function(e,n,t){"use strict";t.r(n),t.d(n,{BlueSpaceArtilleryControl:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.ready?(0,r.jsx)(i.Ki.Item,{label:"Status",color:"green",children:"Ready"}):c.reloadtime_text?(0,r.jsx)(i.Ki.Item,{label:"Reloading In",color:"red",children:c.reloadtime_text}):(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:"No cannon connected!"}),(0,r.jsx)(l.p8,{width:400,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(i.Ki,{children:[c.notice&&(0,r.jsx)(i.Ki.Item,{label:"Alert",color:"red",children:c.notice}),n,(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.$n,{icon:"crosshairs",content:c.target?c.target:"None",onClick:function(){return a("recalibrate")}})}),1===c.ready&&!!c.target&&(0,r.jsx)(i.Ki.Item,{label:"Firing",children:(0,r.jsx)(i.$n,{icon:"skull",content:"FIRE!",color:"red",onClick:function(){return a("fire")}})}),!c.connected&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance",children:(0,r.jsx)(i.$n,{icon:"wrench",content:"Complete Deployment",onClick:function(){return a("build")}})})]})})})})})})}},8128:function(e,n,t){"use strict";t.r(n),t.d(n,{Alerts:()=>u,BluespaceTap:()=>s,Incursion:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){if((0,l.Oc)().data.portaling)return(0,r.jsx)(i.Rr,{fontsize:"256px",backgroundColor:"rgba(35,0,0,0.85)",children:(0,r.jsx)(i.Z8,{fontsize:"256px",interval:Math.random()>.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"skull",size:14,mb:"64px"}),(0,r.jsx)("br",{}),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})},s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,d=s.product||[],f=s.desiredMiningPower,h=s.miningPower,m=s.points,p=s.totalPoints,x=s.powerUse,g=s.availablePower,j=s.emagged,b=s.dirty,y=s.autoShutown,v=s.stabilizers,w=s.stabilizerPower,k=s.stabilizerPriority;return(0,r.jsx)(a.p8,{width:650,height:450,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(u,{}),(0,r.jsx)(i.Nt,{title:"Input Management",children:(0,r.jsxs)(i.wn,{fill:!0,title:"Input",children:[(0,r.jsx)(i.$n,{icon:y&&!j?"toggle-on":"toggle-off",content:"Auto shutdown",color:y&&!j?"green":"red",disabled:!!j,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){return t("auto_shutdown")}}),(0,r.jsx)(i.$n,{icon:v&&!j?"toggle-on":"toggle-off",content:"Stabilizers",color:v&&!j?"green":"red",disabled:!!j,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){return t("stabilizers")}}),(0,r.jsx)(i.$n,{icon:k&&!j?"toggle-on":"toggle-off",content:"Stabilizer priority",color:k&&!j?"green":"red",disabled:!!j,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){return t("stabilizer_priority")}}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Desired Mining Power",children:(0,o.d5)(f)}),(0,r.jsx)(i.Ki.Item,{verticalAlign:"top",label:"Set Desired Mining Power",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"step-backward",disabled:0===f||j,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:0})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:0===f||j,onClick:function(){return t("set",{set_power:f-1e7})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===f||j,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f-1e6})}})]}),(0,r.jsx)(i.BJ.Item,{mx:1,children:(0,r.jsx)(i.Q7,{disabled:j,minValue:0,value:f,maxValue:1/0,step:1,onChange:function(e){return t("set",{set_power:e})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:j,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e6})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:j,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){return t("set",{set_power:f+1e7})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Total Power Use",children:(0,o.d5)(x)}),(0,r.jsx)(i.Ki.Item,{label:"Mining Power Use",children:(0,o.d5)(h)}),(0,r.jsx)(i.Ki.Item,{label:"Stabilizer Power Use",children:(0,o.d5)(w)}),(0,r.jsx)(i.Ki.Item,{label:"Surplus Power",children:(0,o.d5)(g)})]})]})}),(0,r.jsxs)(i.wn,{fill:!0,title:"Output",children:[b?(0,r.jsx)(i.Rr,{backgroundColor:"rgba(63, 39, 18, 0.85)",children:(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,color:"brown",fontsize:"256px",textAlign:"center",children:["Blockage Detected",(0,r.jsx)("br",{}),"Cleanup Required"]})})}):"",(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available Points",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Total Points",children:p})]})})}),(0,r.jsx)(i.BJ.Item,{align:"end",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.Ki,{children:d.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:(0,r.jsx)(i.$n,{disabled:e.price>=m,onClick:function(){return t("vend",{target:e.key})},content:e.price})},e.key)})})})})]})]})]})})})},u=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.product;var o=t.miningPower,a=t.stabilizerPower,c=t.emagged,s=(t.safeLevels,t.autoShutown),u=t.stabilizers;return t.overhead,(0,r.jsxs)(r.Fragment,{children:[!s&&!c&&(0,r.jsx)(i.IC,{danger:1,children:"Auto shutdown disabled"}),c?(0,r.jsx)(i.IC,{danger:1,children:"All safeties disabled"}):o<=15e6?"":u?o>a+15e6?(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,r.jsx)(i.IC,{children:"High Power, engaging stabilizers"}):(0,r.jsx)(i.IC,{danger:1,children:"Stabilizers disabled, Instability likely"})]})}},6807:function(e,n,t){"use strict";t.r(n),t.d(n,{BodyScanner:()=>p});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."],["paraplegic","bad","Lumbar nerves damaged."]],u=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],d={average:[.25,.5],bad:[.5,1/0]},f=function(e,n){for(var t=[],r=0;r0?e.filter(function(e){return!!e}).reduce(function(e,n){return(0,r.jsxs)(r.Fragment,{children:[e,(0,r.jsx)(i.az,{children:n},n)]})},null):null},m=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""},p=function(e){var n=(0,l.Oc)().data,t=n.occupied,i=n.occupant,o=t?(0,r.jsx)(x,{occupant:void 0===i?{}:i}):(0,r.jsx)(k,{});return(0,r.jsx)(a.p8,{width:700,height:600,title:"Body Scanner",children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:o})})},x=function(e){var n=e.occupant;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(g,{occupant:n}),(0,r.jsx)(j,{occupant:n}),(0,r.jsx)(b,{occupant:n}),(0,r.jsx)(v,{organs:n.extOrgan}),(0,r.jsx)(w,{organs:n.intOrgan})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"print",onClick:function(){return t("print_p")},children:"Print Report"}),(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectify")},children:"Eject"})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:o.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:o.maxHealth,value:o.health/o.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[o.stat][0],children:c[o.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempC)}),"\xb0C,\xa0",(0,r.jsx)(i.zv,{value:Math.round(o.bodyTempF)}),"\xb0F"]}),(0,r.jsx)(i.Ki.Item,{label:"Implants",children:o.implant_len?(0,r.jsx)(i.az,{children:o.implant.map(function(e){return e.name}).join(", ")}):(0,r.jsx)(i.az,{color:"label",children:"None"})})]})})},j=function(e){var n=e.occupant;return n.hasBorer||n.blind||n.colourblind||n.nearsighted||n.hasVirus||n.paraplegic?(0,r.jsx)(i.wn,{title:"Abnormalities",children:s.map(function(e,t){if(n[e[0]])return(0,r.jsx)(i.az,{color:e[1],bold:"bad"===e[1],children:e[2]},e[2])})}):(0,r.jsx)(i.wn,{title:"Abnormalities",children:(0,r.jsx)(i.az,{color:"label",children:"No abnormalities found."})})},b=function(e){var n=e.occupant;return(0,r.jsx)(i.wn,{title:"Damage",children:(0,r.jsx)(i.XI,{children:f(u,function(e,t,o){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.XI.Row,{color:"label",children:[(0,r.jsxs)(i.XI.Cell,{children:[e[0],":"]}),(0,r.jsx)(i.XI.Cell,{children:!!t&&t[0]+":"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(y,{value:n[e[1]],marginBottom:o100)&&"average"||!!e.status.robotic&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{m:-.5,min:"0",max:e.maxHealth,mt:n>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:d,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.m_,{content:"Total damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"heartbeat",mr:.5}),Math.round(e.totalLoss)]})}),!!e.bruteLoss&&(0,r.jsx)(i.m_,{content:"Brute damage",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(0,r.jsx)(i.In,{name:"bone",mr:.5}),Math.round(e.bruteLoss)]})}),!!e.fireLoss&&(0,r.jsx)(i.m_,{content:"Burn damage",children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.In,{name:"fire",mr:.5}),Math.round(e.fireLoss)]})})]})})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([!!e.internalBleeding&&"Internal bleeding",!!e.burnWound&&"Critical tissue burns",!!e.lungRuptured&&"Ruptured lung",!!e.liverCirrhosis&&"Liver cirrhosis",!!e.status.broken&&e.status.broken,m(e.germ_level),!!e.open&&"Open incision"])}),(0,r.jsxs)(i.az,{inline:!0,children:[h([!!e.status.splinted&&(0,r.jsx)(i.az,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})]),h(e.shrapnel.map(function(e){return e.known?e.name:"Unknown object"}))]})]})]},n)})]})})},w=function(e){return 0===e.organs.length?(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsx)(i.az,{color:"label",children:"N/A"})}):(0,r.jsx)(i.wn,{title:"Internal Organs",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:"Damage"}),(0,r.jsx)(i.XI.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{color:!!e.dead&&"bad"||e.germ_level>100&&"average"||e.robotic>0&&"label",width:"33%",children:(0,o.ZH)(e.name)}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.z2,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:n>0&&"0.5rem",ranges:d,children:Math.round(e.damage)})}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:n>0&&"calc(0.5rem + 2px)",children:[(0,r.jsx)(i.az,{color:"average",inline:!0,children:h([m(e.germ_level)])}),(0,r.jsx)(i.az,{inline:!0,children:h([1===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Robotic"}),2===e.robotic&&(0,r.jsx)(i.az,{color:"label",children:"Assisted"}),!!e.dead&&(0,r.jsx)(i.az,{color:"bad",bold:!0,children:"DEAD"})])})]})]},n)})]})})},k=function(){return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},2790:function(e,n,t){"use strict";t.r(n),t.d(n,{BookBinder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.selectedbook,u=c.book_categories,d=[];return u.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(l.p8,{width:600,height:400,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,title:"Book Binder",buttons:(0,r.jsx)(i.$n,{icon:"print",width:"auto",content:"Print Book",onClick:function(){return t("print_book")}}),children:[(0,r.jsxs)(i.az,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Title",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.title,onClick:function(){return(0,a.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(i.Ki.Item,{label:"Author",children:(0,r.jsx)(i.$n,{textAlign:"left",icon:"pen",width:"auto",content:s.author,onClick:function(){return(0,a.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(i.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.ms,{width:"190px",options:u.map(function(e){return e.description}),onSelected:function(e){return t("toggle_binder_category",{category_id:d[e]})}})})}),(0,r.jsx)(i.Ki.Item,{label:"Summary",children:(0,r.jsx)(i.$n,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){return(0,a.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(i.Ki.Item,{children:s.summary})]}),(0,r.jsx)("br",{}),u.filter(function(e){return s.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(i.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_binder_category",{category_id:e.category_id})}},e.category_id)})]})})]})})})]})}},1326:function(e,n,t){"use strict";t.r(n),t.d(n,{BotCall:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.cleanblood,f=c.area;return(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsx)(i.wn,{title:"Cleaning Settings",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Clean Blood",disabled:s,onClick:function(){return t("blood")}})}),(0,r.jsxs)(i.wn,{title:"Misc Settings",children:[(0,r.jsx)(i.$n,{fluid:!0,content:f?"Reset Area Selection":"Restrict to Current Area",onClick:function(){return t("area")}}),null!==f&&(0,r.jsx)(i.az,{mb:1,children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Locked Area",children:f})})})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},3578:function(e,n,t){"use strict";t.r(n),t.d(n,{BotFloor:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.hullplating,f=c.replace,h=c.eat,m=c.make,p=c.fixfloor,x=c.nag_empty,g=c.magnet,j=c.tiles_amount;return(0,r.jsx)(l.p8,{width:500,height:510,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Floor Settings",children:[(0,r.jsx)(i.az,{mb:"5px",children:(0,r.jsx)(i.Ki.Item,{label:"Tiles Left",children:j})}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:s,onClick:function(){return t("autotile")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:s,onClick:function(){return t("replacetiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Repair damaged tiles and platings",disabled:s,onClick:function(){return t("fixfloors")}})]}),(0,r.jsxs)(i.wn,{title:"Miscellaneous",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Finds tiles",disabled:s,onClick:function(){return t("eattiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Make pieces of metal into tiles when empty",disabled:s,onClick:function(){return t("maketiles")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:x,content:"Transmit notice when empty",disabled:s,onClick:function(){return t("nagonempty")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:g,content:"Traction Magnets",disabled:s,onClick:function(){return t("anchored")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},5144:function(e,n,t){"use strict";t.r(n),t.d(n,{BotHonk:()=>a});var r=t(8138),i=t(2864),o=t(3384),l=t(9226),a=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.p8,{width:500,height:220,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(l.BotStatus,{})})})}},2078:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMed:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;c.locked;var s=c.noaccess,u=(c.maintpanel,c.on,c.autopatrol,c.canhack,c.emagged,c.remote_disabled,c.painame),d=c.shut_up,f=c.declare_crit,h=c.stationary_mode,m=c.heal_threshold,p=c.injection_amount,x=c.use_beaker,g=c.treat_virus,j=c.reagent_glass;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Communication Settings",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Speaker",checked:!d,disabled:s,onClick:function(){return t("toggle_speaker")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:f,disabled:s,onClick:function(){return t("toggle_critical_alerts")}})]}),(0,r.jsxs)(i.wn,{fill:!0,title:"Treatment Settings",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Healing Threshold",children:(0,r.jsx)(i.Ap,{value:m.value,minValue:m.min,maxValue:m.max,step:5,disabled:s,onChange:function(e,n){return t("set_heal_threshold",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Injection Level",children:(0,r.jsx)(i.Ap,{value:p.value,minValue:p.min,maxValue:p.max,step:5,format:function(e){return"".concat(e,"u")},disabled:s,onChange:function(e,n){return t("set_injection_amount",{target:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reagent Source",children:(0,r.jsx)(i.$n,{content:x?"Beaker":"Internal Synthesizer",icon:x?"flask":"cogs",disabled:s,onClick:function(){return t("toggle_use_beaker")}})}),j&&(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsxs)(i.BJ,{inline:!0,width:"100%",children:[(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsxs)(i.z2,{value:j.amount,minValue:0,maxValue:j.max_amount,children:[j.amount," / ",j.max_amount]})}),(0,r.jsx)(i.BJ.Item,{ml:1,children:(0,r.jsx)(i.$n,{content:"Eject",disabled:s,onClick:function(){return t("eject_reagent_glass")}})})]})})]}),(0,r.jsx)(i.$n.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:g,disabled:s,onClick:function(){return t("toggle_treat_viral")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,content:"Stationary Mode",checked:h,disabled:s,onClick:function(){return t("toggle_stationary_mode")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})})}},881:function(e,n,t){"use strict";t.r(n),t.d(n,{BotMule:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9226),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.noaccess,u=c.painame,d=c.check_id,f=c.check_weapons,h=c.check_warrant,m=c.arrest_mode,p=c.arrest_declare;return(0,r.jsx)(l.p8,{width:500,height:445,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(a.BotStatus,{}),(0,r.jsxs)(i.wn,{title:"Who To Arrest",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Unidentifiable Persons",disabled:s,onClick:function(){return t("authid")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:f,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:h,content:"Wanted Criminals",disabled:s,onClick:function(){return t("authwarrant")}})]}),(0,r.jsxs)(i.wn,{title:"Arrest Procedure",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Detain Targets Indefinitely",disabled:s,onClick:function(){return t("arrtype")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Announce Arrests On Radio",disabled:s,onClick:function(){return t("arrdeclare")}})]}),u&&(0,r.jsx)(i.wn,{title:"pAI",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:u,disabled:s,onClick:function(){return t("ejectpai")}})})]})})}},2850:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigCells:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=e.cell,t=(0,o.Oc)().act,l=n.cell_id,a=n.occupant,c=n.crimes,s=n.brigged_by,u=n.time_left_seconds,d=n.time_set_seconds,f=n.ref,h="";return u>0&&(h+=" BrigCells__listRow--active"),(0,r.jsxs)(i.XI.Row,{className:h,children:[(0,r.jsx)(i.XI.Cell,{children:l}),(0,r.jsx)(i.XI.Cell,{children:a}),(0,r.jsx)(i.XI.Cell,{children:c}),(0,r.jsx)(i.XI.Cell,{children:s}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:d})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.qT,{totalSeconds:u})}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{type:"button",onClick:function(){t("release",{ref:f})},children:"Release"})})]})},c=function(e){var n=e.cells;return(0,r.jsxs)(i.XI,{className:"BrigCells__list",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{header:!0,children:"Cell"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Occupant"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Crimes"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Brigged By"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Brigged For"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Time Left"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Release"})]}),n.map(function(e){return(0,r.jsx)(a,{cell:e},e.ref)})]})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).cells;return(0,r.jsx)(l.p8,{theme:"security",width:800,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(c,{cells:t})})})})})}},9478:function(e,n,t){"use strict";t.r(n),t.d(n,{BrigTimer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;a.nameText=a.occupant,a.timing&&(a.prisoner_hasrec?a.nameText=(0,r.jsx)(i.az,{color:"green",children:a.occupant}):a.nameText=(0,r.jsx)(i.az,{color:"red",children:a.occupant}));var c="pencil-alt";a.prisoner_name&&!a.prisoner_hasrec&&(c="exclamation-triangle");var s=[],u=0;for(u=0;ud});var r=t(8138),i=t(4530),o=t(2864),l=t(3384),a=t(7790);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tp,CameraConsoleContent:()=>x});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(5490),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);te?this.substring(0,e)+"...":this};var h=function(e,n){if(!n)return[];var t,r,i=e.findIndex(function(e){return e.name===n.name});return[null==(t=e[i-1])?void 0:t.name,null==(r=e[i+1])?void 0:r.name]},m=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,c.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,r)}return(0,i.Ul)(t,function(e){return e.name})},p=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,o=i.mapRef,c=i.activeCamera,d=f(h(m(i.cameras),c),2),p=d[0],g=d[1];return(0,r.jsxs)(u.p8,{width:870,height:708,children:[(0,r.jsx)("div",{className:"CameraConsole__left",children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(l.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(x,{})})})}),(0,r.jsxs)("div",{className:"CameraConsole__right",children:[(0,r.jsxs)("div",{className:"CameraConsole__toolbar",children:[(0,r.jsx)("b",{children:"Camera: "}),c&&c.name||"—"]}),(0,r.jsxs)("div",{className:(0,a.Ly)(["CameraConsole__toolbar","CameraConsole__toolbar--right"]),children:[(0,r.jsx)(l.$n,{icon:"chevron-left",disabled:!p,onClick:function(){return t("switch_camera",{name:p})}}),(0,r.jsx)(l.$n,{icon:"chevron-right",disabled:!g,onClick:function(){return t("switch_camera",{name:g})}})]}),(0,r.jsx)(l.D1,{className:"CameraConsole__map",params:{id:o,type:"map"}})]})]})},x=function(e){var n=(0,s.Oc)(),t=n.act,i=n.data,c=f((0,o.useState)(""),2),u=c[0],d=c[1],h=i.activeCamera,p=m(i.cameras,u);return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search for a camera",onChange:function(e){return d(e)}})}),(0,r.jsx)(l.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:p.map(function(e){return(0,r.jsx)("div",{title:e.name,className:(0,a.Ly)(["Button","Button--fluid",h&&e.name===h.name?"Button--selected":"Button--color--transparent"]),onClick:function(){return t("switch_camera",{name:e.name})},children:e.name.trimLongStr(23)},e.name)})})})]})}},2094:function(e,n,t){"use strict";t.r(n),t.d(n,{Canister:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=s.portConnected,d=s.tankPressure,f=s.releasePressure,h=s.defaultReleasePressure,m=s.minReleasePressure,p=s.maxReleasePressure,x=s.valveOpen,g=s.name,j=s.canLabel,b=s.colorContainer,y=s.color_index,v=s.hasHoldingTank,w=s.holdingTank,k="";y.prim&&(k=b.prim.options[y.prim].name);var _="";y.sec&&(_=b.sec.options[y.sec].name);var C="";y.ter&&(C=b.ter.options[y.ter].name);var I="";y.quart&&(I=b.quart.options[y.quart].name);var S=[],O=[],A=[],P=[],B=0;for(B=0;Bl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.scanned_card,l=e.modifying_card;return(0,r.jsx)(i.wn,{title:"Authentication",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Login/Logout",children:t?(0,r.jsx)(i.$n,{icon:"sign-out-alt",selected:!0,onClick:function(){return n("interact_scanned")},children:"Log Out: ".concat(t.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_scanned")},children:"-----"})}),(0,r.jsx)(i.Ki.Item,{label:"Card To Modify",children:l?(0,r.jsx)(i.$n,{icon:"eject",selected:!0,onClick:function(){return n("interact_modify")},children:"Remove Card: ".concat(l.name)}):(0,r.jsx)(i.$n,{icon:"id-card",onClick:function(){return n("interact_modify")},children:"-----"})})]})})}},7542:function(e,n,t){"use strict";t.r(n),t.d(n,{CardInformation:()=>l,CardSkins:()=>a,DropdownCardSkins:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.card;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Registered Name",children:(0,r.jsx)(i.$n,{icon:t&&"Unknown"!==t.registered_name?"pencil-alt":"exclamation-triangle",selected:!!t,onClick:function(){return n("reg")},children:null==t?void 0:t.registered_name})}),(0,r.jsx)(i.Ki.Item,{label:"Account Number",children:(0,r.jsx)(i.$n,{icon:(null==t?void 0:t.associated_account_number)?"pencil-alt":"exclamation-triangle",selected:!!(null==t?void 0:t.associated_account_number),onClick:function(){return n("set_card_account_number")},children:(null==t?void 0:t.associated_account_number)?null==t?void 0:t.associated_account_number:"None"})})]})},a=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[t.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)}),!!a&&(0,r.jsx)(i.az,{children:Array.isArray(c)&&c.map(function(e){return(0,r.jsx)(i.c_,{selected:(null==l?void 0:l.current_skin)===e.skin,tooltip:e.display_name,dmIcon:e.icon,dmIconState:e.skin,color:"purple",onClick:function(){return n("set_card_skin",{skin_target:e.skin})}},e.skin)})})]})},c=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.card,a=e.is_centcom,c=e.all_centcom_skins,s=t.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}),u=Array.isArray(c)?c.map(function(e){return{displayText:e.display_name,value:e.skin}}).sort(function(e,n){return e.displayText.localeCompare(n.displayText)}):[],d=s.filter(function(e){return e.value===(null==l?void 0:l.current_skin)}).length>0;return(0,r.jsxs)(i.wn,{title:"Card Skins",children:[(0,r.jsx)(i.Ki.Item,{label:"Department Skins",children:(0,r.jsx)(i.ms,{options:s,selected:d?null==l?void 0:l.current_skin_name:null,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})}),!!a&&(0,r.jsx)(i.Ki.Item,{label:"Centcom Skins",children:(0,r.jsx)(i.ms,{options:u,selected:d?null:null==l?void 0:l.current_skin_name,onSelected:function(e){return n("set_card_skin",{skin_target:e})}})})]})}},991:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputer:()=>x,SlashedIcon:()=>f});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(1487),s=t(4287),u=t(6530),d=t(9490),f=function(e){var n=e.title,t=e.name,o=e.text;return(0,r.jsx)(i.wn,{fill:!0,title:n,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:t,size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),o]})})})},h=function(){return(0,r.jsx)(f,{title:"Warning",name:"user",text:"Not logged in"})},m=function(){return(0,r.jsx)(f,{title:"Records",name:"scroll",text:"No records"})},p=function(){return(0,r.jsx)(f,{title:"Card Missing",name:"id-card",text:"No card to modify"})},x=function(){var e,n=(0,o.Oc)(),t=n.act,f=n.data,x=f.all_centcom_skins,g=f.auth_or_ghost,j=f.authenticated,b=f.can_terminate,y=f.card_skins,v=f.cooldown_time,w=f.is_centcom,k=f.job_slots,_=f.job_formats,C=f.jobs_dept,I=f.jobs,S=f.mode,O=f.modifying_card,A=f.people_dept,P=f.priority_jobs,B=f.records,E=f.regions,z=f.scanned_card,T=f.selectedAccess,N=f.target_dept,R=(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:0===S,onClick:function(){return t("mode",{mode:0})},children:"Job Transfers"}),!N&&(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:2===S,onClick:function(){return t("mode",{mode:2})},children:"Access Modification"}),(0,r.jsx)(i.tU.Tab,{icon:"folder-open",selected:1===S,onClick:function(){return t("mode",{mode:1})},children:"Job Management"}),(0,r.jsx)(i.tU.Tab,{icon:"scroll",selected:3===S,onClick:function(){return t("mode",{mode:3})},children:"Records"}),(0,r.jsx)(i.tU.Tab,{icon:"users",selected:4===S,onClick:function(){return t("mode",{mode:4})},children:"Department"})]});switch(S){case 0:e=j&&z?O?(0,r.jsx)(u.CardComputerJobTransfer,{target_dept:N,card:O,can_terminate:b,is_centcom:w,jobs:I,job_colors:_,jobs_dept:C,card_skins:y,all_centcom_skins:x}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 1:e=g?(0,r.jsx)(s.CardComputerJobPriority,{cooldown_time:v,target_dept:N,priority_jobs:P,job_slots:k}):(0,r.jsx)(h,{});break;case 2:e=j&&z?O?(0,r.jsx)(a.AccessList,{accesses:E,selectedList:T,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}}):(0,r.jsx)(p,{}):(0,r.jsx)(h,{});break;case 3:e=j?B.length?(0,r.jsx)(d.CardComputerRecordsLog,{authenticated:j,records:B,target_dept:N,is_centcom:w}):(0,r.jsx)(m,{}):(0,r.jsx)(h,{});break;case 4:e=j&&z?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Your Team",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Name"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Sec Status"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Actions"})]}),A.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.name}),(0,r.jsx)(i.XI.Cell,{children:e.title}),(0,r.jsx)(i.XI.Cell,{children:e.crimstat}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{disabled:!e.demotable,onClick:function(){return t("remote_demote",{remote_demote:e.name})},children:e.buttontext})})]},e.title)})]})}):(0,r.jsx)(h,{});break;default:e=(0,r.jsx)(i.wn,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,r.jsx)(l.p8,{width:760,height:800,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(c.AuthBlock,{scanned_card:z,modifying_card:O})}),(0,r.jsx)(i.BJ.Item,{children:R}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:e})]})})})}},4287:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobPriority:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.cooldown_time,l=e.job_slots,a=e.target_dept,c=e.priority_jobs;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{color:t?"red":"",children:["Next Change Available:",t||"Now"]}),(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Job Slots",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Title"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Used Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Total Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Free Slots"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Close Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Open Slot"}),(0,r.jsx)(i.XI.Cell,{bold:!0,textAlign:"center",children:"Priority"})]}),l&&l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,className:"candystripe",children:[(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.az,{color:e.is_priority?"green":"",children:e.title})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.current_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:e.total_positions>e.current_positions&&(0,r.jsx)(i.az,{color:"green",children:e.total_positions-e.current_positions})||(0,r.jsx)(i.az,{color:"red",children:"0"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_close,onClick:function(){return n("make_job_unavailable",{job:e.title})},children:"-"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:(0,r.jsx)(i.$n,{disabled:!!t||!e.can_open,onClick:function(){return n("make_job_available",{job:e.title})},children:"+"})}),(0,r.jsx)(i.XI.Cell,{textAlign:"center",children:a&&(0,r.jsx)(i.az,{color:"green",children:c.indexOf(e.title)>-1?"Yes":""})||(0,r.jsx)(i.$n,{selected:e.is_priority,disabled:!!t||!e.can_prioritize,onClick:function(){return n("prioritize_job",{job:e.title})},children:e.is_priority?"Yes":"No"})})]},e.title)})]})})]})}},6530:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerJobTransfer:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(421),a=t(7542),c=l.lm.department,s=function(e){var n=(0,o.Oc)().act,t=e.job_colors,l=e.dept_name,a=e.job_names,c=e.dept_color,s=e.default_job_color,u=void 0===s?"":s,d=e.card;return(0,r.jsx)(i.Ki.Item,{label:l,labelColor:c,children:a.map(function(e){return(0,r.jsx)(i.$n,{selected:(null==d?void 0:d.rank)===e,color:t[e]?t[e]:u,onClick:function(){return n("assign",{assign_target:e})},children:e},e)})})},u=function(e){var n=(0,o.Oc)().act,t=e.card_skins,l=e.target_dept,u=e.card,d=e.can_terminate,f=e.is_centcom,h=e.jobs,m=e.jobs_dept,p=e.job_colors,x=e.all_centcom_skins,g=h&&[{name:"Special",jobs:h.top},{name:"Engineering",color:c.engineering,jobs:h.engineering},{name:"Medical",color:c.medical,jobs:h.medical},{name:"Science",color:c.science,jobs:h.science},{name:"Security",color:c.security,jobs:h.security},{name:"Service",color:c.service,jobs:h.service},{name:"Supply",color:c.supply,jobs:h.supply},{name:"Retirement",jobs:h.assistant}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{title:"Card Information",children:[!l&&(0,r.jsx)(a.CardInformation,{card:u}),(0,r.jsx)(i.Ki.Item,{label:"Latest Transfer",children:(null==u?void 0:u.lastlog)||"---"})]}),(0,r.jsx)(i.wn,{title:l?"Department Job Transfer":"Job Transfer",children:(0,r.jsxs)(i.Ki,{children:[l?(0,r.jsx)(s,{dept_name:"Department",job_colors:p,job_names:void 0===m?[]:m,card:u}):(0,r.jsx)(r.Fragment,{children:g.map(function(e){return(0,r.jsx)(s,{dept_name:e.name,dept_color:e.color,job_names:e.jobs,job_colors:p,card:u})})}),!!f&&(0,r.jsx)(s,{dept_name:"Centcom",dept_color:c.centcom,job_colors:p,job_names:h.centcom,default_job_color:"purple",card:u}),(0,r.jsx)(i.Ki.Item,{label:"Demotion",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Demoted"||(null==u?void 0:u.assignment)==="Terminated",tooltip:"Assistant access, 'demoted' title.",color:"red",icon:"times",onClick:function(){return n("demote")},children:"Demoted"},"Demoted")}),!!d&&(0,r.jsx)(i.Ki.Item,{label:"Non-Crew",children:(0,r.jsx)(i.$n,{disabled:(null==u?void 0:u.assignment)==="Terminated",tooltip:"Zero access. Not crew.",color:"red",icon:"eraser",onClick:function(){return n("terminate")},children:"Terminated"},"Terminate")})]})}),!l&&(0,r.jsx)(a.CardSkins,{card:u,card_skins:t,is_centcom:f,all_centcom_skins:x})]})}},9490:function(e,n,t){"use strict";t.r(n),t.d(n,{CardComputerRecordsLog:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act,t=e.authenticated,l=e.records,a=e.target_dept,c=e.is_centcom;return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Records",buttons:(0,r.jsx)(i.$n,{icon:"times",disabled:!t||0===l.length||a,onClick:function(){return n("wipe_all_logs")},children:"Delete All Records"}),children:[(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Crewman"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Old Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"New Rank"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Authorized By"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Time"}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Reason"}),!!c&&(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Deleted By"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{height:2,children:[(0,r.jsx)(i.XI.Cell,{children:e.transferee}),(0,r.jsx)(i.XI.Cell,{children:e.oldvalue}),(0,r.jsx)(i.XI.Cell,{children:e.newvalue}),(0,r.jsx)(i.XI.Cell,{children:e.whodidit}),(0,r.jsx)(i.XI.Cell,{children:e.timestamp}),(0,r.jsx)(i.XI.Cell,{children:e.reason}),!!c&&(0,r.jsx)(i.XI.Cell,{children:e.deletedby})]},e.timestamp)})]}),!!c&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{icon:"pencil-alt",color:"purple",disabled:!t||0===l.length,onClick:function(){return n("wipe_my_logs")},children:"Delete MY Records"})})]})}},1488:function(e,n,t){"use strict";t.r(n)},6466:function(e,n,t){"use strict";t.r(n),t.d(n,{CargoConsole:()=>f});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,ChameleonAppearances:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,l.XZ)(n,function(e){return e.name});return e.filter(t)},f=function(e){var n,t=(0,a.Oc)(),l=t.act,c=t.data,u=(n=(0,i.useState)(""),function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,2)||function(e,n){if(e){if("string"==typeof e)return s(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,2)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=u[0],h=u[1],m=d(c.chameleon_skins,f),p=c.selected_appearance;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for an appearance",onChange:function(e){return h(e)}})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Item Appearance",children:m.map(function(e){var n=e.name+"_"+e.icon_state;return(0,r.jsx)(o.c_,{dmIcon:e.icon,dmIconState:e.icon_state,imageSize:64,m:.5,selected:n===p,tooltip:e.name,style:{opacity:n===p&&"1"||"0.5"},onClick:function(){l("change_appearance",{new_appearance:n})}},n)})})})]})}},9072:function(e,n,t){"use strict";t.r(n),t.d(n,{ChangelogView:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=[1,5,10,20,30,50,75],s=[1,5,10],u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).chemicals;return(0,r.jsx)(l.p8,{width:420,height:400+24*Math.ceil(t.length/3),children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.amount,s=l.energy,u=l.maxEnergy;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Dispense",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:c.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:a===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})})]})})})},f=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=[],u=0;u<(c.length+1)%3;u++)s.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:l.glass?"Drink Dispenser":"Chemical Dispenser",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",content:e.title,style:{marginLeft:"2px",textOverflow:"ellipsis"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%"},n)})]})})},h=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.isBeakerLoaded,u=l.beakerCurrentVolume,d=l.beakerMaxVolume,f=l.beakerContents;return(0,r.jsx)(i.BJ.Item,{height:16,children:(0,r.jsx)(i.wn,{title:l.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsxs)(i.az,{children:[!!c&&(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[u," / ",d," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!c,onClick:function(){return t("ejectBeaker")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:void 0===f?[]:f,buttons:function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){return t("remove",{reagent:e.id,amount:-1})}}),s.map(function(n,o){return(0,r.jsx)(i.$n,{content:n,onClick:function(){return t("remove",{reagent:e.id,amount:n})}},o)}),(0,r.jsx)(i.$n,{content:"ALL",onClick:function(){return t("remove",{reagent:e.id,amount:e.volume})}})]})}})})})}},6277:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemHeater:()=>s});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(3013),s=function(e){return(0,r.jsx)(a.p8,{width:350,height:275,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.targetTemp,s=a.targetTempReached,u=a.autoEject,d=a.isActive,f=a.currentTemp,h=a.isBeakerLoaded;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Settings",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Auto-eject",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){return t("toggle_autoeject")}}),(0,r.jsx)(i.$n,{content:d?"On":"Off",icon:"power-off",selected:d,disabled:!h,onClick:function(){return t("toggle_on")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.Q7,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,o.LI)(c,0),minValue:0,maxValue:1e3,onChange:function(e){return t("adjust_temperature",{target:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Reading",color:s?"good":"average",children:h&&(0,r.jsx)(i.zv,{value:f,format:function(e){return(0,o.Mg)(e)+" K"}})||"—"})]})})})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.isBeakerLoaded,s=o.beakerCurrentVolume,u=o.beakerMaxVolume,d=o.beakerContents;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!a&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",onClick:function(){return t("eject_beaker")}})]}),children:(0,r.jsx)(c.BeakerContents,{beakerLoaded:a,beakerContents:d})})})}},9306:function(e,n,t){"use strict";t.r(n),t.d(n,{ChemMaster:()=>x});var r=t(8138),i=t(7790),o=t(5490),l=t(3375),a=t(2864),c=t(3384),s=t(3013),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=[1,5,10,25,75],x=function(e){return(0,r.jsxs)(c.p8,{width:575,height:650,children:[(0,r.jsx)(u.ComplexModal,{}),(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(g,{}),(0,r.jsx)(j,{}),(0,r.jsx)(b,{}),(0,r.jsx)(C,{})]})})]})},g=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.beaker,c=o.beaker_reagents;return o.buffer_reagents.length,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Beaker",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!l,content:"Eject",onClick:function(){return t("eject")}}),children:l?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0?(0,r.jsx)(s.BeakerContents,{beakerLoaded:!0,beakerContents:c,buttons:function(e,n){return(0,r.jsxs)(i.az,{mb:n0&&(n=s.map(function(e){var n=e.id,i=e.sprite;return(0,r.jsx)(k,{icon:i,selected:c===n,onClick:function(){return t("set_sprite_style",{production_mode:l,style:n})}},n)})),(0,r.jsx)(w,{productionData:e.productionData,children:n&&(0,r.jsx)(i.Ki.Item,{label:"Style",children:n})})},C=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.loaded_pill_bottle_style,c=o.containerstyles,s=o.loaded_pill_bottle,u="20px",d="20px",f=c.map(function(e){var n=e.color,o=e.name,a=l===n;return(0,r.jsxs)(i.$n,{style:{position:"relative",width:u,height:d},onClick:function(){return t("set_container_style",{style:n})},icon:a?"check":"",tooltip:o,tooltipPosition:"top",children:[!a&&(0,r.jsx)("div",{style:{display:"inline-block"}}),(0,r.jsx)("span",{className:"Button",style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:u,height:d,backgroundColor:n,opacity:.6,filter:"alpha(opacity=60)"}})]},n)});return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Container Customization",buttons:(0,r.jsx)(i.$n,{icon:"eject",disabled:!s,content:"Eject Container",onClick:function(){return t("ejectp")}}),children:s?(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Style",children:[(0,r.jsx)(i.$n,{style:{width:u,height:d},icon:"tint-slash",onClick:function(){return t("clear_container_style")},selected:!l,tooltip:"Default",tooltipPosition:"top"}),f]})}):(0,r.jsx)(i.az,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,u.modalRegisterBodyOverride)("analyze",function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=e.args.analysis;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:o.condi?"Condiment Analysis":"Reagent Analysis",children:(0,r.jsx)(i.az,{mx:"0.5rem",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:l.name}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:(l.desc||"").length>0?l.desc:"N/A"}),l.blood_type&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood type",children:l.blood_type}),(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})]}),!o.condi&&(0,r.jsx)(i.$n,{icon:o.printing?"spinner":"print",disabled:o.printing,iconSpin:!!o.printing,ml:"0.5rem",content:"Print",onClick:function(){return t("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})})},2636:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningConsole:()=>c});var r=t(8138),i=t(7790),o=t(8595),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,c=o.tab,u=o.has_scanner,d=o.pod_amount;return(0,r.jsx)(a.p8,{width:640,height:520,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Cloning Console",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected scanner",children:u?"Online":"Missing"}),(0,r.jsx)(i.Ki.Item,{label:"Connected pods",children:d})]})}),(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:1===c,icon:"home",onClick:function(){return t("menu",{tab:1})},children:"Main Menu"}),(0,r.jsx)(i.tU.Tab,{selected:2===c,icon:"user",onClick:function(){return t("menu",{tab:2})},children:"Damage Configuration"})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(s,{})})]})})},s=function(e){var n,t=(0,l.Oc)().data.tab;return 1===t?n=(0,r.jsx)(u,{}):2===t&&(n=(0,r.jsx)(d,{})),n},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.pods,s=a.pod_amount,u=a.selected_pod_UID;return(0,r.jsxs)(i.az,{children:[!s&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No pods connected."}),!!s&&c.map(function(e,n){return(0,r.jsx)(i.wn,{layer:2,title:"Pod "+(n+1),children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsxs)(i.BJ.Item,{basis:"96px",shrink:0,children:[(0,r.jsx)("img",{src:(0,o.l)("pod_"+(e.cloning?"cloning":"idle")+".gif"),style:{width:"100%",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{selected:u===e.uid,onClick:function(){return t("select_pod",{uid:e.uid})},children:"Select"})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Progress",children:[!e.cloning&&(0,r.jsx)(i.az,{color:"average",children:"Pod is inactive."}),!!e.cloning&&(0,r.jsx)(i.z2,{value:e.clone_progress,maxValue:100,color:"good"})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Biomass",children:(0,r.jsxs)(i.z2,{value:e.biomass,ranges:{good:[2*e.biomass_storage_capacity/3,e.biomass_storage_capacity],average:[e.biomass_storage_capacity/3,2*e.biomass_storage_capacity/3],bad:[0,e.biomass_storage_capacity/3]},minValue:0,maxValue:e.biomass_storage_capacity,children:[e.biomass,"/",e.biomass_storage_capacity+" ("+100*e.biomass/e.biomass_storage_capacity+"%)"]})}),(0,r.jsx)(i.Ki.Item,{label:"Sanguine Reagent",children:e.sanguine_reagent}),(0,r.jsx)(i.Ki.Item,{label:"Osseous Reagent",children:e.osseous_reagent})]})})]})},e)})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.selected_pod_data,c=o.has_scanned,s=o.scanner_has_patient,u=o.feedback,d=o.scan_successful,m=o.cloning_cost,p=o.has_scanner,x=o.currently_scanning;return(0,r.jsxs)(i.az,{children:[!p&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No scanner connected."}),!!p&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.wn,{layer:2,title:"Scanner Info",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{icon:"hourglass-half",onClick:function(){return t("scan")},disabled:!s||x,children:"Scan"}),(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("eject")},disabled:!s||x,children:"Eject Patient"})]}),children:[!c&&!x&&(0,r.jsx)(i.az,{color:"average",children:s?"No scan detected for current patient.":"No patient is in the scanner."}),(!!c||!!x)&&(0,r.jsx)(i.az,{color:u.color,children:u.text})]}),(0,r.jsx)(i.wn,{layer:2,title:"Damages Breakdown",children:(0,r.jsxs)(i.az,{children:[(!d||!c)&&(0,r.jsx)(i.az,{color:"average",children:"No valid scan detected."}),!!d&&!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{onClick:function(){return t("fix_all")},children:"Repair All Damages"}),(0,r.jsx)(i.$n,{onClick:function(){return t("fix_none")},children:"Repair No Damages"})]}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{onClick:function(){return t("clone")},children:"Clone"})})]}),(0,r.jsxs)(i.BJ,{height:"25px",children:[(0,r.jsx)(i.BJ.Item,{width:"40%",children:(0,r.jsxs)(i.z2,{value:m[0],maxValue:a.biomass_storage_capacity,ranges:{bad:[2*a.biomass_storage_capacity/3,a.biomass_storage_capacity],average:[a.biomass_storage_capacity/3,2*a.biomass_storage_capacity/3],good:[0,a.biomass_storage_capacity/3]},color:m[0]>a.biomass?"bad":null,children:["Biomass: ",m[0],"/",a.biomass,"/",a.biomass_storage_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[1],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[1]>a.sanguine_reagent?"bad":"good",children:["Sanguine: ",m[1],"/",a.sanguine_reagent,"/",a.max_reagent_capacity]})}),(0,r.jsx)(i.BJ.Item,{width:"30%",children:(0,r.jsxs)(i.z2,{value:m[2],maxValue:a.max_reagent_capacity,ranges:{bad:[2*a.max_reagent_capacity/3,a.max_reagent_capacity],average:[a.max_reagent_capacity/3,2*a.max_reagent_capacity/3],good:[0,a.max_reagent_capacity/3]},color:m[2]>a.osseous_reagent?"bad":"good",children:["Osseous: ",m[2],"/",a.osseous_reagent,"/",a.max_reagent_capacity]})})]}),(0,r.jsx)(f,{}),(0,r.jsx)(h,{})]})]})})]})]})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_limb_data,c=o.limb_list,s=o.desired_limb_data;return(0,r.jsx)(i.Nt,{title:"Limbs",children:c.map(function(e,n){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"15%",height:"20px",children:[a[e][4],":"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1}),0===a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{value:s[e][0]+s[e][1],maxValue:a[e][5],ranges:{good:[0,a[e][5]/3],average:[a[e][5]/3,2*a[e][5]/3],bad:[2*a[e][5]/3,a[e][5]]},children:["Post-Cloning Damage: ",(0,r.jsx)(i.In,{name:"bone"})," "+s[e][0]+" / ",(0,r.jsx)(i.In,{name:"fire"})," "+s[e][1]]})}),0!==a[e][3]&&(0,r.jsx)(i.BJ.Item,{width:"60%",children:(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][4]," is missing!"]})})]}),(0,r.jsxs)(i.BJ,{children:[!!a[e][3]&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][3],onClick:function(){return t("toggle_limb_repair",{limb:e,type:"replace"})},children:"Replace Limb"})}),!a[e][3]&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n.Checkbox,{disabled:!(a[e][0]||a[e][1]),checked:!(s[e][0]||s[e][1]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"damage"})},children:"Repair Damages"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(1&a[e][2]),checked:!(1&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"bone"})},children:"Mend Bone"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(32&a[e][2]),checked:!(32&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"ib"})},children:"Mend IB"}),(0,r.jsx)(i.$n.Checkbox,{disabled:!(128&a[e][2]),checked:!(128&s[e][2]),onClick:function(){return t("toggle_limb_repair",{limb:e,type:"critburn"})},children:"Mend Critical Burn"})]})]})]},e)})})},h=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.patient_organ_data,c=o.organ_list,s=o.desired_organ_data;return(0,r.jsx)(i.Nt,{title:"Organs",children:c.map(function(e,n){return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ,{align:"baseline",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"20%",height:"20px",children:[a[e][3],":"," "]}),"heart"!==a[e][5]&&(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.BJ.Item,{children:[!!a[e][2]&&(0,r.jsx)(i.$n.Checkbox,{checked:!s[e][2]&&!s[e][1],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"replace"})},children:"Replace Organ"}),!a[e][2]&&(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n.Checkbox,{disabled:!a[e][0],checked:!s[e][0],onClick:function(){return t("toggle_organ_repair",{organ:e,type:"damage"})},children:"Repair Damages"})})]})}),"heart"===a[e][5]&&(0,r.jsx)(i.az,{color:"average",children:"Heart replacement is required for cloning."}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsxs)(i.BJ.Item,{width:"35%",children:[!!a[e][2]&&(0,r.jsxs)(i.z2,{color:"bad",value:0,children:["The patient's ",a[e][3]," is missing!"]}),!a[e][2]&&(0,r.jsx)(i.z2,{value:s[e][0],maxValue:a[e][4],ranges:{good:[0,a[e][4]/3],average:[a[e][4]/3,2*a[e][4]/3],bad:[2*a[e][4]/3,a[e][4]]},children:"Post-Cloning Damage: "+s[e][0]})]})]})},e)})})}},1558:function(e,n,t){"use strict";t.r(n),t.d(n,{CloningPod:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.biomass,s=a.biomass_storage_capacity,u=a.sanguine_reagent,d=a.osseous_reagent,f=a.organs,h=a.currently_cloning;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Liquid Storage",children:[(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,r.jsx)(i.BJ.Item,{grow:1,children:(0,r.jsx)(i.z2,{value:c,ranges:{good:[2*s/3,s],average:[s/3,2*s/3],bad:[0,s/3]},minValue:0,maxValue:s})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:u+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"sanguine_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"sanguine_reagent"})}})})]}),(0,r.jsxs)(i.BJ,{height:"25px",align:"center",children:[(0,r.jsxs)(i.BJ.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,r.jsx)(i.BJ.Item,{children:d+" units"}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Q7,{value:0,minValue:0,maxValue:d,step:1,unit:"units",onChange:function(e){return t("remove_reagent",{reagent:"osseous_reagent",amount:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove All",onClick:function(){return t("purge_reagent",{reagent:"osseous_reagent"})}})})]})]}),(0,r.jsxs)(i.wn,{title:"Organ Storage",children:[!h&&(0,r.jsxs)(i.az,{children:[!f&&(0,r.jsx)(i.az,{color:"average",children:"Notice: No organs loaded."}),!!f&&f.map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:e.name}),(0,r.jsx)(i.BJ.Item,{grow:1}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Eject",onClick:function(){return t("eject_organ",{organ_ref:e.ref})}})})]},e)})]}),!!h&&(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:"5",mb:3}),(0,r.jsx)("br",{}),"Unable to access organ storage while cloning."]})})]})]})})}},1276:function(e,n,t){"use strict";t.r(n),t.d(n,{CoinMint:()=>c});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.materials,u=c.moneyBag,d=c.moneyBagContent,f=c.moneyBagMaxContent,h=(u?210:138)+64*Math.ceil(s.length/4);return(0,r.jsx)(a.p8,{width:210,height:h,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.IC,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Coin Type",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:c.active&&"bad",tooltip:!u&&"Need a money bag",disabled:!u,onClick:function(){return t("activate")}}),children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.z2,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eject",tooltip:"Eject selected material",onClick:function(){return t("ejectMat")}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:s.map(function(e){return(0,r.jsx)(i.$n,{bold:!0,inline:!0,m:.2,textAlign:"center",selected:e.id===c.chosenMaterial,tooltip:e.name,content:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",e.id])}),(0,r.jsx)(i.BJ.Item,{children:e.amount})]}),onClick:function(){return t("selectMaterial",{material:e.id})}},e.id)})})]})})}),!!u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Money Bag",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){return t("ejectBag")}}),children:(0,r.jsxs)(i.z2,{width:"100%",minValue:0,maxValue:f,value:d,children:[d," / ",f]})})})]})})})}},1572:function(e,n,t){"use strict";t.r(n),t.d(n,{HexColorInput:()=>E,ColorSelector:()=>A,ColorPickerModal:()=>O,ColorInput:()=>z});var r=t(8138),i=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,n);return Math.round(t*e)/t},o=function(e){return h(l(e))},l=function(e){return("#"===e[0]&&(e=e.substring(1)),e.length<6)?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?i(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?i(parseInt(e.substring(6,8),16)/255,2):1}},a=function(e){return f(u(e))},c=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=(200-t)*r/100;return{h:i(n),s:i(l>0&&l<200?t*r/100/(l<=100?l:200-l)*100:0),l:i(l/2),a:i(o,2)}},s=function(e){var n=c(e),t=n.h,r=n.s,i=n.l;return"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)")},u=function(e){var n=e.h,t=e.s,r=e.v,o=e.a,l=Math.floor(n=n/360*6),a=(r/=100)*(1-(t/=100)),c=r*(1-(n-l)*t),s=r*(1-(1-n+l)*t),u=l%6;return{r:255*[r,c,a,a,s,r][u],g:255*[s,r,r,c,a,a][u],b:255*[a,a,s,r,r,c][u],a:i(o,2)}},d=function(e){var n=e.toString(16);return n.length<2?"0"+n:n},f=function(e){var n=e.r,t=e.g,r=e.b,o=e.a,l=o<1?d(i(255*o)):"";return"#"+d(i(n))+d(i(t))+d(i(r))+l},h=function(e){var n=e.r,t=e.g,r=e.b,i=e.a,o=Math.max(n,t,r),l=o-Math.min(n,t,r),a=l?o===n?(t-r)/l:o===t?2+(r-n)/l:4+(n-t)/l:0;return{h:60*(a<0?a+6:a),s:o?l/o*100:0,v:o/255*100,a:i}},m=/^#?([0-9A-F]{3,8})$/i,p=function(e,n){var t=m.exec(e),r=t?t[1].length:0;return 3===r||6===r||!!n&&4===r||!!n&&8===r},x=t(4530),g=t(7790),j=t(6859),b=t(5490),y=t(2864),v=t(7946),w=t(8095),k=t(3384),_=t(1942),C=t(9472);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["prefixed","alpha","color","fluid","onChange"]);return(0,r.jsx)(z,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.colour_data;return(0,r.jsx)(l.p8,{width:360,height:190,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,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,r.jsx)(i.BJ,{textAlign:"center",textColor:"label",children:e.map(function(e){return(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:1,children:[e.name,":\xa0",(0,r.jsx)(i.Q7,{width:4,value:a[e.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(n){return t("setvalue",{idx:e.idx+1,value:n})}})]},e.name)})},e)})})})})})}},5325:function(e,n,t){"use strict";t.r(n),t.d(n,{CommunicationsComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(x+=" ("+a+"s)");var g=c?"Message [UNKNOWN]":"Message CentComm",b="Request Authentication Codes";return s>0&&(g+=" ("+s+"s)",b+=" ("+s+"s)"),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Captain-Only Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Alert",color:u,children:d}),(0,r.jsx)(o.Ki.Item,{label:"Change Alert",children:(0,r.jsx)(j,{levels:f,required_access:h})}),(0,r.jsx)(o.Ki.Item,{label:"Announcement",children:(0,r.jsx)(o.$n,{icon:"bullhorn",content:x,disabled:!h||a>0,onClick:function(){return t("announce")}})}),!!c&&(0,r.jsxs)(o.Ki.Item,{label:"Transmit",children:[(0,r.jsx)(o.$n,{icon:"broadcast-tower",color:"red",content:g,disabled:!h||s>0,onClick:function(){return t("MessageSyndicate")}}),(0,r.jsx)(o.$n,{icon:"sync-alt",content:"Reset Relays",disabled:!h,onClick:function(){return t("RestoreBackup")}})]})||(0,r.jsx)(o.Ki.Item,{label:"Transmit",children:(0,r.jsx)(o.$n,{icon:"broadcast-tower",content:g,disabled:!h||s>0,onClick:function(){return t("MessageCentcomm")}})}),(0,r.jsx)(o.Ki.Item,{label:"Nuclear Device",children:(0,r.jsx)(o.$n,{icon:"bomb",content:b,disabled:!h||s>0,onClick:function(){return t("nukerequest")}})})]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{fill:!0,title:"Command Staff Actions",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Displays",children:(0,r.jsx)(o.$n,{icon:"tv",content:"Change Status Displays",disabled:!m,onClick:function(){return t("status")}})}),(0,r.jsx)(o.Ki.Item,{label:"Incoming Messages",children:(0,r.jsx)(o.$n,{icon:"folder-open",content:"View ("+p.length+")",disabled:!m,onClick:function(){return t("messagelist")}})})]})})})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.stat_display,c=i.authhead;i.current_message_title;var s=a.presets.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.name===a.type,disabled:!c,onClick:function(){return t("setstat",{statdisp:e.name})}},e.name)}),u=a.alerts.map(function(e){return(0,r.jsx)(o.$n,{content:e.label,selected:e.alert===a.icon,disabled:!c,onClick:function(){return t("setstat",{statdisp:3,alert:e.alert})}},e.alert)});return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Modify Status Screens",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Presets",children:s}),(0,r.jsx)(o.Ki.Item,{label:"Alerts",children:u}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 1",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_1,disabled:!c,onClick:function(){return t("setmsg1")}})}),(0,r.jsx)(o.Ki.Item,{label:"Message Line 2",children:(0,r.jsx)(o.$n,{icon:"pencil-alt",content:a.line_2,disabled:!c,onClick:function(){return t("setmsg2")}})})]})})})},g=function(e){var n,t=(0,l.Oc)(),i=t.act,a=t.data,c=a.authhead,s=a.current_message_title,u=a.current_message,d=a.messages;if(a.security_level,s)n=(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:s,buttons:(0,r.jsx)(o.$n,{icon:"times",content:"Return To Message List",disabled:!c,onClick:function(){return i("messagelist")}}),children:(0,r.jsx)(o.az,{children:u})})});else{var f=d.map(function(e){return(0,r.jsxs)(o.Ki.Item,{label:e.title,children:[(0,r.jsx)(o.$n,{icon:"eye",content:"View",disabled:!c||s===e.title,onClick:function(){return i("messagelist",{msgid:e.id})}}),(0,r.jsx)(o.$n.Confirm,{icon:"times",content:"Delete",disabled:!c,onClick:function(){return i("delmessage",{msgid:e.id})}})]},e.id)});n=(0,r.jsx)(o.wn,{title:"Messages Received",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return i("main")}}),children:(0,r.jsx)(o.Ki,{children:f})})}return(0,r.jsx)(o.az,{children:n})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.levels,c=e.required_access,s=e.use_confirm,u=i.security_level;return s?a.map(function(e){return(0,r.jsx)(o.$n.Confirm,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)}):a.map(function(e){return(0,r.jsx)(o.$n,{icon:e.icon,content:e.name,disabled:!c||e.id===u,tooltip:e.tooltip,onClick:function(){return t("newalertlevel",{level:e.id})}},e.name)})},b=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.is_admin,u=a.possible_cc_sounds;if(!c)return t("main");var d=s((0,i.useState)(""),2),f=d[0],h=d[1],m=s((0,i.useState)(""),2),p=m[0],x=m[1],g=s((0,i.useState)(0),2),j=g[0],b=g[1],y=s((0,i.useState)("Beep"),2),v=y[0],w=y[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,title:"Central Command Report",buttons:(0,r.jsx)(o.$n,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return t("main")}}),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Enter Subtitle here.",value:f,onChange:function(e){return h(e)}}),(0,r.jsx)(o.fs,{fluid:!0,height:"100%",rows:10,placeholder:"Enter Announcement here. Multiline input is accepted.",value:p,onChange:x}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"paper-plane",textAlign:"center",onClick:function(){t("make_cc_announcement",{subtitle:f,text:p,classified:j,beepsound:v}),x(""),h("")},children:"Send Announcement"}),(0,r.jsxs)(o.BJ,{align:"center",children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.ms,{options:u,selected:v,onSelected:function(e){return w(e)},disabled:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"volume-up",disabled:j,tooltip:"Test sound",onClick:function(){return t("test_sound",{sound:v})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n.Checkbox,{fluid:!0,checked:j,tooltip:j?"Sent to station communications consoles":"Publically announced",onClick:function(){return b(!j)},children:"Classified"})})]})]})})})}},6185:function(e,n,t){"use strict";t.r(n),t.d(n,{CompostBin:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(7946),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0,p=e.setViewingPhoto,g=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["setViewingPhoto"]);return(0,r.jsx)(o.wn,h(f({title:"Available Contracts",overflow:"auto",buttons:(0,r.jsxs)(o.$n,{disabled:!u||m,icon:"parachute-box",onClick:function(){return t("extract")},children:["Call Extraction"," ",m&&(0,r.jsx)(c.Gi,{timeEnd:d.time_left,format:function(e,n){return n.substr(3)}})]})},g),{children:l.slice().sort(function(e,n){return 1===e.status?-1:1===n.status?1:e.status-n.status}).map(function(e){var n;return(0,r.jsx)(o.wn,{title:(0,r.jsxs)(o.so,{children:[(0,r.jsx)(o.so.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,r.jsx)(o.so.Item,{basis:"content",children:e.has_photo&&(0,r.jsx)(o.$n,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return p("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,r.jsxs)(o.az,{width:"100%",children:[!!x[e.status]&&(0,r.jsx)(o.az,{color:x[e.status][1],inline:!0,mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:x[e.status][0]}),1===e.status&&(0,r.jsx)(o.$n.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return t("abort")}})]}),children:(0,r.jsxs)(o.so,{children:[(0,r.jsxs)(o.so.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,r.jsxs)(o.az,{color:"good",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,r.jsxs)(o.az,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,r.jsxs)(o.az,{color:"bad",children:[(0,r.jsx)("br",{}),(0,r.jsx)(o.In,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,r.jsxs)(o.so.Item,{flexBasis:"100%",children:[(0,r.jsxs)(o.so,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",w(e)]}),null==(n=e.difficulties)?void 0:n.map(function(n,i){return(0,r.jsx)(o.$n.Confirm,{disabled:!!s,content:n.name+" ("+n.reward+" TC)",onClick:function(){return t("activate",{uid:e.uid,difficulty:i+1})}},i)}),!!e.objective&&(0,r.jsxs)(o.az,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,r.jsx)("br",{}),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)})}))},w=function(e){if(e.objective&&!(e.status>1)){var n=e.objective.locs.user_area_id,t=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,a=e.objective.locs.target_coords,c=n===i;return(0,r.jsx)(o.so.Item,{children:(0,r.jsx)(o.In,{name:c?"dot-circle-o":"arrow-alt-circle-right-o",color:c?"green":"yellow",rotation:c?null:-(0,l.KJ)(Math.atan2(a[1]-t[1],a[0]-t[0])),lineHeight:c?null:"0.85",size:"1.5"})})}},k=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.rep,c=i.buyables;return(0,r.jsx)(o.wn,h(f({title:"Available Purchases",overflow:"auto"},e),{children:c.map(function(e){return(0,r.jsxs)(o.wn,{title:e.name,children:[e.description,(0,r.jsx)("br",{}),(0,r.jsx)(o.$n.Confirm,{disabled:l-1&&(0,r.jsxs)(o.az,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)})}))},_=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(e){var n,r,i;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return r=t,i=[e],r=d(r),(n=function(e,n){var t;if(n&&("object"==((t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,p()?Reflect.construct(r,i||[],d(this).constructor):r.apply(this,i))).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e),n=[{key:"tick",value:function(){var e=this.props,n=this.state;n.currentIndex<=e.allMessages.length?(this.setState(function(e){return{currentIndex:e.currentIndex+1}}),n.currentDisplay.push(e.allMessages[n.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))}},{key:"componentDidMount",value:function(){var e=this,n=this.props.linesPerSecond;this.timer=setInterval(function(){return e.tick()},1e3/(void 0===n?2.5:n))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){return(0,r.jsx)(o.az,{m:1,children:this.state.currentDisplay.map(function(e){return(0,r.jsxs)(i.Fragment,{children:[e,(0,r.jsx)("br",{})]},e)})})}}],function(e,n){for(var t=0;ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.slowFactor,s=a.oneWay,u=a.position;return(0,r.jsx)(l.p8,{width:350,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,r.jsx)(i.Ki.Item,{label:"Allow reverse",children:(0,r.jsx)(i.$n.Checkbox,{checked:!s,onClick:function(){return t("toggleOneWay")}})}),(0,r.jsx)(i.Ki.Item,{label:"Slowdown factor",children:(0,r.jsxs)(i.so,{children:[(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-left",onClick:function(){return t("slowFactor",{value:c-5})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-left",onClick:function(){return t("slowFactor",{value:c-1})}})," "]}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.Ap,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,n){return t("slowFactor",{value:n})}})}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-right",onClick:function(){return t("slowFactor",{value:c+1})}})," "]}),(0,r.jsxs)(i.so.Item,{mx:"1px",children:[" ",(0,r.jsx)(i.$n,{icon:"angle-double-right",onClick:function(){return t("slowFactor",{value:c+5})}})," "]})]})})]})})})})}},6714:function(e,n,t){"use strict";t.r(n),t.d(n,{CrewMonitor:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(7946),u=t(421),d=t(3384);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=2||s.ignoreSensors?(0,r.jsxs)(l.az,{inline:!0,ml:1,children:["(",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.oxy,children:e.oxy}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.toxin,children:e.tox}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.burn,children:e.fire}),"|",(0,r.jsx)(l.az,{inline:!0,color:u.lm.damageType.brute,children:e.brute}),")"]}):null]}),(0,r.jsx)(l.XI.Cell,{children:3===e.sensor_type||s.ignoreSensors?s.isAI||s.isObserver?(0,r.jsx)(l.$n,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return t("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":(0,r.jsx)(l.az,{inline:!0,color:"grey",children:"Not Available"})})]},n)})]})]})},g=function(e){var n,t,i=e.color,o=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["color"]);return(0,r.jsx)(s.tx.Marker,(n=function(e){for(var n=1;ns});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],c=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=function(e){return(0,r.jsx)(l.p8,{width:520,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(u,{})})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,s=l.isOperating,u=l.hasOccupant,f=l.occupant,h=void 0===f?[]:f,m=l.cellTemperature,p=l.cellTemperatureStatus,x=l.isBeakerLoaded,g=l.cooldownProgress,j=l.auto_eject_healthy,b=l.auto_eject_dead;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,r.jsx)(i.$n,{icon:"user-slash",onClick:function(){return t("ejectOccupant")},disabled:!u,children:"Eject"}),children:u?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,r.jsx)(i.zv,{value:Math.round(h.health)})})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[h.stat][0],children:c[h.stat][1]}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:Math.round(h.bodyTemperature)})," K"]}),(0,r.jsx)(i.Ki.Divider,{}),a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.label,children:(0,r.jsx)(i.z2,{value:h[e.type]/100,ranges:{bad:[.01,1/0]},children:(0,r.jsx)(i.zv,{value:Math.round(h[e.type])})})},e.id)})]}):(0,r.jsx)(i.BJ,{fill:!0,textAlign:"center",children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Cell",buttons:(0,r.jsx)(i.$n,{icon:"eject",onClick:function(){return t("ejectBeaker")},disabled:!x,children:"Eject Beaker"}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:"power-off",onClick:function(){return t(s?"switchOff":"switchOn")},selected:s,children:s?"On":"Off"})}),(0,r.jsxs)(i.Ki.Item,{label:"Temperature",color:p,children:[(0,r.jsx)(i.zv,{value:m})," K"]}),(0,r.jsx)(i.Ki.Item,{label:"Beaker",children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.Ki.Item,{label:"Dosage interval",children:(0,r.jsx)(i.z2,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!x&&"average",value:g,minValue:0,maxValue:100})}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject healthy occupants",children:(0,r.jsx)(i.$n,{icon:j?"toggle-on":"toggle-off",selected:j,onClick:function(){return t(j?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:j?"On":"Off"})}),(0,r.jsx)(i.Ki.Item,{label:"Auto-eject dead occupants",children:(0,r.jsx)(i.$n,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return t(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"On":"Off"})})]})})})]})},d=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.isBeakerLoaded,a=t.beakerLabel,c=t.beakerVolume;return l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{inline:!0,color:!a&&"average",children:[a||"No label",":"]}),(0,r.jsx)(i.az,{inline:!0,color:!c&&"bad",ml:1,children:c?(0,r.jsx)(i.zv,{value:c,format:function(e){return Math.round(e)+" units remaining"}}):"Beaker is empty"})]}):(0,r.jsx)(i.az,{inline:!0,color:"bad",children:"No beaker loaded"})}},2394:function(e,n,t){"use strict";t.r(n),t.d(n,{CryopodConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.account_name,o=n.allow_items;return(0,r.jsx)(a.p8,{title:"Cryopod Console",width:400,height:480,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Hello, ".concat(t||"[REDACTED]","!"),children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,r.jsx)(s,{}),!!o&&(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)().data.frozen_crew;return(0,r.jsx)(i.Nt,{title:"Stored Crew",children:n.length?(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:n.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.name,children:e.rank},n)})})}):(0,r.jsx)(i.IC,{children:"No stored crew!"})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.frozen_items,c=function(e){var n=e.toString();return n.startsWith("the ")&&(n=n.slice(4,n.length)),(0,o.Sn)(n)};return(0,r.jsx)(i.Nt,{title:"Stored Items",children:a.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:a.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:c(e.name),buttons:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return t("one_item",{item:e.uid})}})},e)})})}),(0,r.jsx)(i.$n,{content:"Drop All Items",color:"red",onClick:function(){return t("all_items")}})]}):(0,r.jsx)(i.IC,{children:"No stored items!"})})}},3372:function(e,n,t){"use strict";t.r(n),t.d(n,{DNAModifier:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],u=[5,10,20,30,50],d=function(){var e,n=(0,o.Oc)(),t=(n.act,n.data),c=t.irradiating,s=t.dnaBlockSize,u=t.occupant,d=!u.isViableSubject||!u.uniqueIdentity||!u.structuralEnzymes;return c&&(e=(0,r.jsx)(v,{duration:c})),(0,r.jsxs)(l.p8,{width:660,height:800,children:[(0,r.jsx)(a.ComplexModal,{}),e,(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(f,{isDNAInvalid:d})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(h,{dnaBlockSize:s,isDNAInvalid:d})})]})})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,s=l.hasOccupant,u=l.occupant,d=e.isDNAInvalid;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,r.jsx)(i.$n,{disabled:!s,selected:a,icon:a?"toggle-on":"toggle-off",content:a?"Engaged":"Disengaged",onClick:function(){return t("toggleLock")}}),(0,r.jsx)(i.$n,{disabled:!s||a,icon:"user-slash",content:"Eject",onClick:function(){return t("ejectOccupant")}})]}),children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:u.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:u.minHealth,maxValue:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[u.stat][0],children:c[u.stat][1]}),(0,r.jsx)(i.Ki.Divider,{})]})}),d?(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Radiation",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:u.radiationLevel/100,color:"average"})}),(0,r.jsx)(i.Ki.Item,{label:"Unique Enzymes",children:l.occupant.uniqueEnzymes?l.occupant.uniqueEnzymes:(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})]}):(0,r.jsx)(i.az,{color:"label",children:"Cell unoccupied."})})},h=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.selectedMenuKey,u=a.hasOccupant,d=e.dnaBlockSize,f=e.isDNAInvalid;return u?f?(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No operation possible on this subject."]})})}):("ui"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"se"===c?n=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p,{dnaBlockSize:d}),(0,r.jsx)(x,{})]}):"buffer"===c?n=(0,r.jsx)(g,{}):"rejuvenators"===c&&(n=(0,r.jsx)(y,{})),(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.tU,{children:s.map(function(e,n){return(0,r.jsx)(i.tU.Tab,{icon:e[2],selected:c===e[0],onClick:function(){return l("selectMenuKey",{key:e[0]})},children:e[1]},n)})}),n]})):(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant in DNA modifier."]})})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedUIBlock,c=l.selectedUISubBlock,s=l.selectedUITarget,u=l.occupant,d=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Unique Identifier",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:u.uniqueIdentity,selectedBlock:a,selectedSubblock:c,blockSize:d,action:"selectUIBlock"})})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Target",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:15,stepPixelSize:20,value:s,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,n){return t("changeUITarget",{value:n})}})})}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return t("pulseUIRadiation")}})]})]})})},p=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.selectedSEBlock,c=l.selectedSESubBlock,s=l.occupant,u=e.dnaBlockSize;return(0,r.jsx)(i.wn,{title:"Modify Structural Enzymes",children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(w,{dnaString:s.structuralEnzymes,selectedBlock:a,selectedSubblock:c,blockSize:u,action:"selectSEBlock"})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"radiation",content:"Irradiate Block",onClick:function(){return t("pulseSERadiation")}})})]})})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.radiationIntensity,a=t.radiationDuration;return(0,r.jsxs)(i.wn,{title:"Radiation Emitter",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Intensity",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:10,stepPixelSize:20,value:l,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationIntensity",{value:t})}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.N6,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:a,popupPosition:"right",ml:"0",onChange:function(e,t){return n("radiationDuration",{value:t})}})})]}),(0,r.jsx)(i.$n,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){return n("pulseRadiation")}})]})},g=function(){var e=(0,o.Oc)().data.buffers.map(function(e,n){return(0,r.jsx)(j,{id:n+1,name:"Buffer "+(n+1),buffer:e},n)});return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:"75%",mt:1,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Buffers",children:e})}),(0,r.jsx)(i.BJ.Item,{height:"25%",children:(0,r.jsx)(b,{})})]})},j=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.id,c=e.name,s=e.buffer,u=l.isInjectorReady,d=c+(s.data?" - "+s.label:"");return(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsxs)(i.wn,{title:d,mx:"0",lineHeight:"18px",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!s.data,icon:"trash",content:"Clear",onClick:function(){return t("bufferOption",{option:"clear",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data,icon:"pen",content:"Rename",onClick:function(){return t("bufferOption",{option:"changeLabel",id:a})}}),(0,r.jsx)(i.$n,{disabled:!s.data||!l.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){return t("bufferOption",{option:"saveDisk",id:a})}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Write",children:[(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUI",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveUIAndUE",id:a})}}),(0,r.jsx)(i.$n,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return t("bufferOption",{option:"saveSE",id:a})}}),(0,r.jsx)(i.$n,{disabled:!l.hasDisk||!l.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return t("bufferOption",{option:"loadDisk",id:a})}})]}),!!s.data&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Subject",children:s.owner||(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]}),(0,r.jsxs)(i.Ki.Item,{label:"Transfer to",children:[(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a})}}),(0,r.jsx)(i.$n,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return t("bufferOption",{option:"createInjector",id:a,block:1})}}),(0,r.jsx)(i.$n,{icon:"user",content:"Subject",mb:"0",onClick:function(){return t("bufferOption",{option:"transfer",id:a})}})]})]})]}),!s.data&&(0,r.jsx)(i.az,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},b=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.hasDisk,a=t.disk;return(0,r.jsx)(i.wn,{title:"Data Disk",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Confirm,{disabled:!l||!a.data,icon:"trash",content:"Wipe",onClick:function(){return n("wipeDisk")}}),(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectDisk")}})]}),children:l?a.data?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Label",children:a.label?a.label:"No label"}),(0,r.jsx)(i.Ki.Item,{label:"Subject",children:a.owner?a.owner:(0,r.jsx)(i.az,{color:"average",children:"Unknown"})}),(0,r.jsxs)(i.Ki.Item,{label:"Data Type",children:["ui"===a.type?"Unique Identifiers":"Structural Enzymes",!!a.ue&&" and Unique Enzymes"]})]}):(0,r.jsx)(i.az,{color:"label",children:"Disk is blank."}):(0,r.jsxs)(i.az,{color:"label",textAlign:"center",my:"1rem",children:[(0,r.jsx)(i.In,{name:"save-o",size:4}),(0,r.jsx)("br",{}),"No disk inserted."]})})},y=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.isBeakerLoaded,a=t.beakerVolume,c=t.beakerLabel;return(0,r.jsx)(i.wn,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,r.jsx)(i.$n,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return n("ejectBeaker")}}),children:l?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Inject",children:[u.map(function(e,t){return(0,r.jsx)(i.$n,{disabled:e>a,icon:"syringe",content:e,onClick:function(){return n("injectRejuvenators",{amount:e})}},t)}),(0,r.jsx)(i.$n,{disabled:a<=0,icon:"syringe",content:"All",onClick:function(){return n("injectRejuvenators",{amount:a})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Beaker",children:[(0,r.jsx)(i.az,{mb:"0.5rem",children:c||"No label"}),a?(0,r.jsxs)(i.az,{color:"good",children:[a," unit",1===a?"":"s"," remaining"]}):(0,r.jsx)(i.az,{color:"bad",children:"Empty"})]})]}):(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,align:"center",justify:"center",children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"flask",size:5,color:"silver"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]})}),(0,r.jsx)(i.BJ.Item,{bold:!0,color:"label",mb:"2rem",children:(0,r.jsx)("h3",{children:"No Beaker Loaded"})})]})})},v=function(e){var n=e.duration;return(0,r.jsxs)(i.Rr,{textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",size:5,spin:!0}),(0,r.jsx)("br",{}),(0,r.jsx)(i.az,{color:"average",children:(0,r.jsxs)("h1",{children:[(0,r.jsx)(i.In,{name:"radiation"}),"\xa0Irradiating occupant\xa0",(0,r.jsx)(i.In,{name:"radiation"})]})}),(0,r.jsx)(i.az,{color:"label",children:(0,r.jsxs)("h3",{children:["For ",n," second",1===n?"":"s"]})})]})},w=function(e){for(var n=function(e){for(var n=e/s+1,o=[],l=0;ls});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tm});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(5490),c=t(4530),s=(0,c.createContext)({categoryStyles:[],removalMode:null}),u=function(e){var n=e.decal_typepath,t=e.direction,o=e.isSelected,l=e.onSelect,c="".concat(n.replace(/\//g,"_"),"_").concat(t);return(0,r.jsx)(i.az,{m:"2px",className:(0,a.Ly)(["decal_painter32x32",c]),onClick:l,style:{outlineStyle:o&&"solid"||"none",outlineWidth:"2px",outlineColor:"orange"}})},d=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedCategory,a=t.categories;return(0,r.jsx)(i.BJ,{vertical:!0,children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{selected:e==l,onClick:function(){return n("set_category",{category:e})},children:e})})})})})},f=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.removalMode,d=(0,c.useContext)(s).categoryStyles;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.so,{wrap:"wrap",children:d.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(u,{decal_typepath:e.typepath,direction:2,isSelected:l===e.typepath&&!a,onSelect:function(){return n("set_decal_type",{decal_type:e.typepath})}})},e.typepath)})})})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.selectedDecalType,a=t.selectedDir,c=t.removalMode;return(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,0,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:0===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(u,{decal_typepath:l,direction:e,isSelected:e===a&&!c,onSelect:function(){return n("set_direction",{direction:e})}})},e)})},e)})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,a=t.availableStyles,c=t.removalMode,u=a[t.selectedCategory];return(0,r.jsx)(l.p8,{width:650,height:565,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(s.Provider,{value:{categoryStyles:u,removalMode:c},children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Preview",children:[(0,r.jsx)(h,{}),(0,r.jsx)(i.$n,{icon:"eraser",color:c?"green":"transparent",onClick:function(){return n("toggle_removal_mode")},children:"Remove decals"})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{title:"Decals",children:[(0,r.jsx)(d,{}),(0,r.jsx)(f,{})]})})]})})})})}},3883:function(e,n,t){"use strict";t.r(n),t.d(n,{DestinationTagger:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.destinations,u=c.selected_destination_id,d=s[u-1];return(0,r.jsx)(l.p8,{width:355,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,textAlign:"center",title:"TagMaster 3.1",children:[(0,r.jsxs)(i.az,{width:"100%",textAlign:"center",children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Selected:"})," ",null!=(n=d.name)?n:"None"]}),(0,r.jsx)(i.az,{mt:1.5,children:(0,r.jsx)(i.BJ,{overflowY:"auto",wrap:"wrap",align:"center",justify:"space-evenly",direction:"row",children:s.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{m:"2px",children:(0,r.jsx)(i.$n,{color:"transparent",width:"105px",textAlign:"center",content:e.name,selected:e.id===u,onClick:function(){return a("select_destination",{destination:e.id})}})},n)})})})]})})})})}},6381:function(e,n,t){"use strict";t.r(n),t.d(n,{DisposalBin:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t,a=(0,o.Oc)(),c=a.act,s=a.data;return 2===s.mode?(n="good",t="Ready"):s.mode<=0?(n="bad",t="N/A"):1===s.mode?(n="average",t="Pressurizing"):(n="average",t="Idle"),(0,r.jsx)(l.p8,{width:300,height:260,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"State",color:n,children:t}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{ranges:{bad:[-1/0,0],average:[0,99],good:[99,1/0]},value:s.pressure,minValue:0,maxValue:100})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Handle",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:s.isAI||s.panel_open,content:"Disengaged",selected:!s.flushing,onClick:function(){return c("disengageHandle")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:s.isAI||s.panel_open,content:"Engaged",selected:s.flushing,onClick:function(){return c("engageHandle")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[(0,r.jsx)(i.$n,{icon:"toggle-off",disabled:-1===s.mode,content:"Off",selected:!s.mode,onClick:function(){return c("pumpOff")}}),(0,r.jsx)(i.$n,{icon:"toggle-on",disabled:-1===s.mode,content:"On",selected:s.mode,onClick:function(){return c("pumpOn")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Eject",children:(0,r.jsx)(i.$n,{icon:"sign-out-alt",disabled:s.isAI,content:"Eject Contents",onClick:function(){return c("eject")}})})]})})]})})}},2908:function(e,n,t){"use strict";t.r(n),t.d(n,{DnaVault:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).completed;return(0,r.jsx)(a.p8,{width:350,height:270,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),!!t&&(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=t.dna,a=t.dna_max,c=t.plants,s=t.plants_max,u=t.animals,d=t.animals_max;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"DNA Vault Database",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Human DNA",children:(0,r.jsx)(i.z2,{value:l/a,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:l+" / "+a+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Plant DNA",children:(0,r.jsx)(i.z2,{value:c/s,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:c+" / "+s+" Samples"})}),(0,r.jsx)(i.Ki.Item,{label:"Animal DNA",children:(0,r.jsx)(i.z2,{value:u/d,ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},children:u+" / "+d+" Samples"})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.choiceA,s=a.choiceB,u=a.used;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{fill:!0,title:"Personal Gene Therapy",children:[(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Applicable Gene Therapy Treatments"}),!u&&(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:c,textAlign:"center",onClick:function(){return t("gene",{choice:c})}})}),(0,r.jsx)(l.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,bold:!0,content:s,textAlign:"center",onClick:function(){return t("gene",{choice:s})}})})]})||(0,r.jsx)(i.az,{bold:!0,textAlign:"center",mb:1,children:"Users DNA deemed unstable. Unable to provide more upgrades."})]})})}},2480:function(e,n,t){"use strict";t.r(n),t.d(n,{DroneConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){return(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.drone_fab,c=o.fab_power,s=o.drone_prod,u=o.drone_progress;return(0,r.jsx)(i.wn,{title:"Drone Fabricator",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"Online":"Offline",color:s?"green":"red",onClick:function(){return t("toggle_fab")}}),children:a?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"External Power",children:(0,r.jsxs)(i.az,{color:c?"good":"bad",children:["[ ",c?"Online":"Offline"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Drone Production",children:(0,r.jsx)(i.z2,{value:u/100,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})})]}):(0,r.jsx)(i.IC,{textAlign:"center",danger:1,children:(0,r.jsxs)(i.so,{inline:1,direction:"column",children:[(0,r.jsx)(i.so.Item,{children:"FABRICATOR NOT DETECTED."}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{icon:"search",content:"Search",onClick:function(){return t("find_fab")}})})]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.drones,s=a.area_list,u=a.selected_area,d=a.ping_cd,f=function(e,n){var t,o;return 2===e?(t="bad",o="Disabled"):1!==e&&n?(t="good",o="Active"):(t="average",o="Inactive"),(0,r.jsx)(i.az,{color:t,children:o})};return(0,r.jsxs)(i.wn,{title:"Maintenance Units",children:[(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{children:"Request Drone presence in area:\xa0"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"125px",onSelected:function(e){return t("set_area",{area:e})}})})]}),(0,r.jsx)(i.$n,{content:"Send Ping",icon:"broadcast-tower",disabled:d||!c.length,title:c.length?null:"No active drones!",fluid:!0,textAlign:"center",py:.4,mt:.6,onClick:function(){return t("ping")}}),(0,r.jsx)(function(){if(c.length)return(0,r.jsx)(i.az,{py:.2,children:(0,r.jsx)(i.cG,{})})},{}),c.map(function(e){return(0,r.jsx)(i.wn,{title:(0,o.Sn)(e.name),buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sync",content:"Resync",disabled:2===e.stat||e.sync_cd,onClick:function(){return t("resync",{uid:e.uid})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n.Confirm,{icon:"power-off",content:"Recall",disabled:2===e.stat||e.pathfinding,tooltip:e.pathfinding?"This drone is currently pathfinding, please wait.":null,tooltipPosition:"left",color:"bad",onClick:function(){return t("recall",{uid:e.uid})}})})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:f(e.stat,e.client)}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:e.health,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Charge",children:(0,r.jsx)(i.z2,{value:e.charge,ranges:{good:[.7,1/0],average:[.4,.7],bad:[-1/0,.4]}})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location})]})},e.name)})]})}},1654:function(e,n,t){"use strict";t.r(n),t.d(n,{EFTPOS:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf,ERTOverview:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tj?"red":"green",children:[g," total, versus ",j," spawnpoints"]})}),(0,r.jsx)(o.Ki.Item,{label:"Dispatch",children:(0,r.jsx)(o.$n,{width:10.5,textAlign:"center",icon:"ambulance",onClick:function(){return n("dispatch_ert",{silent:v})},children:"Send ERT"})})]})})})},p=function(){var e=(0,a.Oc)(),n=e.act,t=e.data.ert_request_messages;return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:t&&t.length?t.map(function(e){return(0,r.jsx)(o.wn,{title:e.time,buttons:(0,r.jsx)(o.$n,{onClick:function(){return n("view_player_panel",{uid:e.sender_uid})},tooltip:"View player panel",children:e.sender_real_name}),children:e.message},(0,l.jT)(e.time))}):(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsxs)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(o.In.Stack,{children:[(0,r.jsx)(o.In,{name:"broadcast-tower",size:5,color:"gray"}),(0,r.jsx)(o.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No ERT requests."]})})})})},x=function(){var e=(0,a.Oc)().act,n=u((0,i.useState)(""),2),t=n[0],l=n[1];return(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.fs,{placeholder:"Enter ERT denial reason here. Shift-Enter to add a new line.",fluid:!0,height:24,value:t,onChange:function(e){return l(e)}}),(0,r.jsx)(o.$n.Confirm,{fluid:!0,icon:"times",mt:2,textAlign:"center",onClick:function(){return e("deny_ert",{reason:t})},children:"Deny ERT"})]})})}},9644:function(e,n,t){"use strict";t.r(n),t.d(n,{EconomyManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:325,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.next_payroll_time;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{label:"Pay Bonuses and Deductions",children:[(0,r.jsx)(i.Ki.Item,{label:"Global",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"global"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Department Members",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"department_members"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Single Accounts",children:(0,r.jsx)(i.$n,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){return t("payroll_modification",{mod_type:"crew_member"})}})})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(i.az,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,r.jsx)(i.$n,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){return t("delay_payroll")}}),(0,r.jsx)(i.$n,{width:"auto",content:"Set Payroll Time",onClick:function(){return t("set_payroll")}}),(0,r.jsx)(i.$n,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){return t("accelerate_payroll")}})]}),(0,r.jsxs)(i.IC,{children:[(0,r.jsx)("b",{children:"WARNING:"})," You take full responsibility for unbalancing the economy with these buttons!"]})]})}},6426:function(e,n,t){"use strict";t.r(n),t.d(n,{Electropack:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.power,u=c.code,d=c.frequency,f=c.minFrequency,h=c.maxFrequency;return(0,r.jsx)(a.p8,{width:360,height:135,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:s?"power-off":"times",content:s?"On":"Off",selected:s,onClick:function(){return t("power")}})}),(0,r.jsx)(i.Ki.Item,{label:"Frequency",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"freq"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:f/10,maxValue:h/10,value:d/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Reset",onClick:function(){return t("reset",{reset:"code"})}}),children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e){return t("code",{code:e})}})})]})})})})}},9480:function(e,n,t){"use strict";t.r(n),t.d(n,{Emojipedia:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";return e&&0!==e.length?(e=(0,i.pb)(e,function(e){return!!(null==e?void 0:e.name)}),n&&(e=(0,i.pb)(e,(0,a.XZ)(n,function(e){return e.name+"|"+e.description}))),(0,i.Ul)(e,function(e){return null==e?void 0:e.name})):[]},C=function(e){if(y(e),""===e)return k(x.abilities);k(_(f.map(function(e){return e.abilities}).flat(),e))},I=function(e){g(e),k(e.abilities),y("")};return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.pd,{width:"200px",placeholder:"Search Abilities",onChange:function(e){C(e)},value:b}),(0,r.jsx)(l.$n,{icon:m?"square-o":"check-square-o",selected:!m,content:"Compact",onClick:function(){return t("set_view_mode",{mode:0})}}),(0,r.jsx)(l.$n,{icon:m?"check-square-o":"square-o",selected:m,content:"Expanded",onClick:function(){return t("set_view_mode",{mode:1})}})]}),children:[(0,r.jsx)(l.tU,{children:f.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===b&&x===e,onClick:function(){I(e)},children:e.category},e)})}),w.map(function(e,n){return(0,r.jsxs)(l.az,{p:.5,mx:-1,className:"candystripe",children:[(0,r.jsxs)(l.BJ,{align:"center",children:[(0,r.jsx)(l.BJ.Item,{ml:.5,color:"#dedede",children:e.name}),h.includes(e.power_path)&&(0,r.jsx)(l.BJ.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,r.jsxs)(l.BJ.Item,{mr:3,textAlign:"right",grow:1,children:[(0,r.jsxs)(l.az,{as:"span",color:"label",children:["Cost:"," "]}),(0,r.jsx)(l.az,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,r.jsx)(l.BJ.Item,{textAlign:"right",children:(0,r.jsx)(l.$n,{mr:.5,disabled:e.cost>u||h.includes(e.power_path),content:"Evolve",onClick:function(){return t("purchase",{power_path:e.power_path})}})})]}),!!m&&(0,r.jsx)(l.BJ,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},n)})]})})}},6251:function(e,n,t){"use strict";t.r(n),t.d(n,{ExosuitFabricator:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(7946),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&(0,r.jsx)(o.$n,{icon:"arrow-up",onClick:function(){return t("queueswap",{from:n+1,to:n})}}),n0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--time",children:[(0,r.jsx)(o.cG,{}),"Processing time:",(0,r.jsx)(o.In,{name:"clock",mx:"0.5rem"}),(0,r.jsx)(o.az,{inline:!0,bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(s).length>0&&(0,r.jsxs)(o.BJ.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,r.jsx)(o.cG,{}),"Lacking materials to complete:",s.map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])})]})]})})})},j=function(e){var n,t,i=(0,c.Oc)(),a=(i.act,i.data),s=e.id,u=e.amount,d=e.lineDisplay,f=e.onClick,h=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["id","amount","lineDisplay","onClick"]),m=a.materials[s]||0,p=u||m;if(!(p<=0)||"metal"===s||"glass"===s)return(0,r.jsx)(o.BJ,(n=function(e){for(var n=1;nm&&"bad",ml:0,mr:1,children:p.toLocaleString("en-US")})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.BJ.Item,{basis:"content",children:(0,r.jsx)(o.$n,{width:"85%",color:"transparent",onClick:f,children:(0,r.jsx)(o.az,{mt:1,className:(0,l.Ly)(["materials32x32",s])})})}),(0,r.jsxs)(o.BJ.Item,{grow:"1",children:[(0,r.jsx)(o.az,{className:"Exofab__material--name",children:s}),(0,r.jsxs)(o.az,{className:"Exofab__material--amount",children:[p.toLocaleString("en-US")," cm\xb3 (",Math.round(p/2e3*10)/10," ","sheets)"]})]})]})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,l=e.design;return(0,r.jsxs)(o.az,{className:"Exofab__design",children:[(0,r.jsx)(o.$n,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return t("build",{id:l.id})}}),(0,r.jsx)(o.$n,{icon:"plus-circle",onClick:function(){return t("queue",{id:l.id})}}),(0,r.jsx)(o.az,{className:"Exofab__design--cost",children:Object.entries(l.cost).map(function(e){return(0,r.jsx)(o.az,{children:(0,r.jsx)(j,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])})}),(0,r.jsx)(o.BJ,{className:"Exofab__design--time",children:(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.In,{name:"clock"}),l.time>0?(0,r.jsxs)(r.Fragment,{children:[l.time/10," seconds"]}):"Instant"]})})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data.controllers;return(0,r.jsx)(u.p8,{children:(0,r.jsx)(u.p8.Content,{children:(0,r.jsx)(o.wn,{title:"Setup Linkage",children:(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Network Address"}),(0,r.jsx)(o.XI.Cell,{children:"Network ID"}),(0,r.jsx)(o.XI.Cell,{children:"Link"})]}),i.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.addr}),(0,r.jsx)(o.XI.Cell,{children:e.net_id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})},v=function(e){var n=(0,c.Oc)(),t=(n.act,n.data).tech_levels,i=e.showLevelsModal,l=e.setShowLevelsModal;return i?(0,r.jsx)(o.aF,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:(0,r.jsx)(o.wn,{title:"Current tech levels",buttons:(0,r.jsx)(o.$n,{content:"Close",onClick:function(){l(!1)}}),children:(0,r.jsx)(o.Ki,{children:t.map(function(e){var n=e.name,t=e.level;return(0,r.jsx)(o.Ki.Item,{label:n,children:t},n)})})})}):null}},9621:function(e,n,t){"use strict";t.r(n),t.d(n,{ExperimentConsole:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),c=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),s=function(e){var n=(0,o.Oc)(),t=n.act,s=n.data,u=s.open,d=s.feedback,f=s.occupant,h=s.occupant_name,m=s.occupant_status,p=function(){if(!f)return(0,r.jsx)(i.IC,{children:"No specimen detected."});var e=a.get(m);return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:h}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:e.color,children:e.text}),(0,r.jsx)(i.Ki.Item,{label:"Experiments",children:[0,1,2].map(function(e){return(0,r.jsx)(i.$n,{icon:c.get(e).icon,content:c.get(e).label,onClick:function(){return t("experiment",{experiment_type:e})}},e)})})]})}();return(0,r.jsx)(l.p8,{theme:"abductor",width:350,height:200,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Status",children:d})})}),(0,r.jsx)(i.wn,{title:"Scanner",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!u,onClick:function(){return t("door")}}),children:p})]})})}},5091:function(e,n,t){"use strict";t.r(n),t.d(n,{ExternalAirlockController:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n="good";return e<80?n="bad":e<95||e>110?n="average":e>120&&(n="bad"),n},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.chamber_pressure,u=(c.exterior_status,c.interior_status),d=c.processing;return(0,r.jsx)(l.p8,{width:330,height:205,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Information",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Chamber Pressure",children:(0,r.jsxs)(i.z2,{color:a(s),value:s,minValue:0,maxValue:1013,children:[s," kPa"]})})})}),(0,r.jsxs)(i.wn,{title:"Actions",buttons:(0,r.jsx)(i.$n,{content:"Abort",icon:"ban",color:"red",disabled:!d,onClick:function(){return t("abort")}}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:d,onClick:function(){return t("cycle_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:d,onClick:function(){return t("cycle_int")}})]}),(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_ext")}}),(0,r.jsx)(i.$n,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===u?"red":d?"yellow":null,onClick:function(){return t("force_int")}})]})]})]})})}},6325:function(e,n,t){"use strict";t.r(n),t.d(n,{FaxMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:540,height:295,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:a.scan_name?"eject":"id-card",selected:a.scan_name,content:a.scan_name?a.scan_name:"-----",tooltip:a.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})}),(0,r.jsx)(i.Ki.Item,{label:"Authorize",children:(0,r.jsx)(i.$n,{icon:a.authenticated?"sign-out-alt":"id-card",selected:a.authenticated,disabled:a.nologin,content:a.realauth?"Log Out":"Log In",onClick:function(){return t("auth")}})})]})}),(0,r.jsx)(i.wn,{title:"Fax Menu",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Network",children:a.network}),(0,r.jsxs)(i.Ki.Item,{label:"Document",children:[(0,r.jsx)(i.$n,{icon:a.paper?"eject":"paperclip",disabled:!a.authenticated&&!a.paper,content:a.paper?a.paper:"-----",onClick:function(){return t("paper")}}),!!a.paper&&(0,r.jsx)(i.$n,{icon:"pencil-alt",content:"Rename",onClick:function(){return t("rename")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Sending To",children:(0,r.jsx)(i.$n,{icon:"print",content:a.destination?a.destination:"-----",disabled:!a.authenticated,onClick:function(){return t("dept")}})}),(0,r.jsx)(i.Ki.Item,{label:"Action",children:(0,r.jsx)(i.$n,{icon:"envelope",content:a.sendError?a.sendError:"Send",disabled:!a.paper||!a.destination||!a.authenticated||a.sendError,onClick:function(){return t("send")}})})]})})]})})}},9788:function(e,n,t){"use strict";t.r(n),t.d(n,{FilingCabinet:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=n.config,s=a.contents,u=c.title;return(0,r.jsx)(l.p8,{width:400,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Contents",children:[!s&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"folder-open",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"The ",u," is empty."]})}),!!s&&s.slice().map(function(e){return(0,r.jsxs)(i.BJ,{mt:.5,className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"80%",children:e.display_name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"arrow-down",content:"Retrieve",onClick:function(){return t("retrieve",{index:e.index})}})})]},e)})]})})})})}},2920:function(e,n,t){"use strict";t.r(n),t.d(n,{FlockPanel:()=>m});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&"Bandwidth Provided: "+e.compute,e.compute<0&&"Bandwidth Cost: "+-e.compute]})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{height:"100%",children:(0,r.jsxs)(o.BJ,{children:["Construction Tealprint"===e.name&&(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{onClick:function(){return n("cancel_tealprint",{origin:e.ref})},children:"Cancel"})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{onClick:function(){return n("jump_to",{origin:e.ref})},children:"Jump"})})]})})})]})},e.ref)})})},j=function(e){var n=e.act,t=e.enemies;return(0,r.jsx)(o.BJ,{vertical:!0,children:t.map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{width:"30%",children:(0,r.jsx)(o.wn,{height:"100%",children:e.name})}),(0,r.jsx)(o.BJ.Item,{grow:1,children:(0,r.jsx)(o.wn,{height:"100%",children:(0,r.jsx)(o.BJ,{children:(0,r.jsx)(o.BJ.Item,{grow:1,children:(0,r.jsx)("b",{children:e.area})})})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{height:"100%",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"times",onClick:function(){return n("remove_enemy",{origin:e.ref})},children:"Remove"})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{onClick:function(){return n("jump_to",{origin:e.ref})},children:"Jump"})})]})})})]})},e.ref)})})},b=function(e){var n=e.stats;return(0,r.jsx)(o.BJ,{vertical:!0,children:n.map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.BJ,{children:(0,r.jsx)(o.BJ.Item,{width:"100%",children:(0,r.jsx)(o.wn,{height:"100%",children:(0,r.jsx)(o.BJ,{vertical:!0,align:"left",children:(0,r.jsxs)(o.BJ.Item,{children:[e.name," ",e.value]})})})})})},e.name)})})}},26:function(e,n,t){"use strict";t.r(n),t.d(n,{FloorPainter:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),l=e.icon_state,a=e.direction,c=e.isSelected,s=e.onSelect;return(0,r.jsx)(i.Hg,{icon:t.icon,icon_state:l,direction:a,onClick:s,style:{borderStyle:c&&"solid"||"none",borderWidth:"2px",borderColor:"orange",padding:c&&"0px"||"2px"}})},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.availableStyles,u=c.selectedStyle,d=c.selectedDir,f=c.wideMode;return(0,r.jsx)(l.p8,{width:405,height:475,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.wn,{title:"Floor setup",children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-left",onClick:function(){return t("cycle_style",{offset:-1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.ms,{options:s,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:!0,onSelected:function(e){return t("select_style",{style:e})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"chevron-right",onClick:function(){return t("cycle_style",{offset:1})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"eraser",color:f?"green":"transparent",onClick:function(){return t("wide_mode")},children:"Wide mode"})})]}),(0,r.jsx)(i.az,{mt:"5px",mb:"5px",children:(0,r.jsx)(i.so,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:s.map(function(e){return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(a,{icon_state:e,isSelected:u===e,onSelect:function(){return t("select_style",{style:e})}})},e)})})}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Direction",children:(0,r.jsx)(i.XI,{style:{display:"inline"},children:[1,null,2].map(function(e){return(0,r.jsx)(i.XI.Row,{children:[e+8,e,e+4].map(function(e){return(0,r.jsx)(i.XI.Cell,{style:{verticalAlign:"middle",textAlign:"center"},children:null===e?(0,r.jsx)(i.In,{name:"arrows-alt",size:3}):(0,r.jsx)(a,{icon_state:u,direction:e,isSelected:e===d,onSelect:function(){return t("select_direction",{direction:e})}})},e)})},e)})})})})]})})})}},1561:function(e,n,t){"use strict";t.r(n),t.d(n,{GPS:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(6859),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]}),void 0!==e.due&&(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.In,{name:"arrow-up",rotation:e.due}),"\xa0--"]})]}),(0,r.jsx)(o.XI.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:d(e.position)})]},n)})})},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):(function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}),n))}},1259:function(e,n,t){"use strict";t.r(n),t.d(n,{GeneModder:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){var n=(0,o.Oc)().data.has_seed;return(0,r.jsxs)(l.p8,{width:950,height:650,children:[(0,r.jsx)("div",{className:"GeneModder__left",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(x,{scrollable:!0})})}),(0,r.jsx)("div",{className:"GeneModder__right",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[(0,r.jsx)(d,{}),(0,r.jsx)(a.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),0===n?(0,r.jsx)(u,{}):(0,r.jsx)(s,{})]})})})]})},s=function(e){var n=(0,o.Oc)();return(n.act,n.data).disk,(0,r.jsxs)(i.wn,{title:"Genes",fill:!0,scrollable:!0,children:[(0,r.jsx)(f,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})},u=function(e){return(0,r.jsx)(i.wn,{fill:!0,height:"85%",children:(0,r.jsx)(i.BJ,{height:"100%",children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,r.jsx)(i.In,{name:"leaf",size:5,mb:"10px"}),(0,r.jsx)("br",{}),"The plant DNA manipulator is missing a seed."]})})})},d=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.has_seed,u=c.seed,d=c.has_disk,f=c.disk;return n=s?(0,r.jsxs)(i.BJ.Item,{mb:"-6px",mt:"-4px",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(u.image),style:{verticalAlign:"middle",width:"32px",margin:"-1px",marginLeft:"-11px"}}),(0,r.jsx)(i.$n,{content:u.name,onClick:function(){return a("eject_seed")}}),(0,r.jsx)(i.$n,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){return a("variant_name")}})]}):(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:"None",onClick:function(){return a("eject_seed")}})}),t=d?f.name:"None",(0,r.jsx)(i.wn,{title:"Storage",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Plant Sample",children:n}),(0,r.jsx)(i.Ki.Item,{label:"Data Disk",children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{ml:3.3,content:t,tooltip:"Select Empty Disk",onClick:function(){return a("select_empty_disk")}})})})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.disk,c=l.core_genes;return(0,r.jsxs)(i.Nt,{title:"Core Genes",open:!0,children:[c.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("extract",{id:e.id})}})})]},e)})," ",(0,r.jsx)(i.BJ,{children:(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract All",disabled:!(null==a?void 0:a.can_extract),icon:"save",onClick:function(){return t("bulk_extract_core")}})})})]},"Core Genes")},h=function(e){var n=(0,o.Oc)().data,t=n.reagent_genes,i=n.has_reagent;return(0,r.jsx)(p,{title:"Reagent Genes",gene_set:t,do_we_show:i})},m=function(e){var n=(0,o.Oc)().data,t=n.trait_genes,i=n.has_trait;return(0,r.jsx)(p,{title:"Trait Genes",gene_set:t,do_we_show:i})},p=function(e){var n=e.title,t=e.gene_set,l=e.do_we_show,a=(0,o.Oc)(),c=a.act,s=a.data.disk;return(0,r.jsx)(i.Nt,{title:n,open:!0,children:l?t.map(function(e){return(0,r.jsxs)(i.BJ,{py:"2px",className:"candystripe",children:[(0,r.jsx)(i.BJ.Item,{width:"100%",ml:"2px",children:e.name}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Extract",disabled:!(null==s?void 0:s.can_extract),icon:"save",onClick:function(){return c("extract",{id:e.id})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{content:"Remove",icon:"times",onClick:function(){return c("remove",{id:e.id})}})})]},e)}):(0,r.jsx)(i.BJ.Item,{children:"No Genes Detected"})},n)},x=function(e){e.title,e.gene_set,e.do_we_show;var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_seed,c=l.empty_disks,s=l.stat_disks,u=l.trait_disks,d=l.reagent_disks;return(0,r.jsxs)(i.wn,{title:"Disks",children:[(0,r.jsx)("br",{}),"Empty Disks: ",c,(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){return t("eject_empty_disk")}}),(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stats",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[s.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:["All"===e.stat?(0,r.jsx)(i.$n,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(null==e?void 0:e.ready)||!a,icon:"arrow-circle-down",onClick:function(){return t("bulk_replace_core",{index:e.index})}}):(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!e||!a,content:"Replace",onClick:function(){return t("replace",{index:e.index,stat:e.stat})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Traits",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[u.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})}),(0,r.jsx)(i.wn,{title:"Reagents",children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,scrollable:!0,children:[d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{mr:2,children:[(0,r.jsx)(i.BJ.Item,{width:"49%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:25,children:[(0,r.jsx)(i.$n,{width:6,icon:"arrow-circle-down",disabled:!e||!e.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){return t("insert",{index:e.index})}}),(0,r.jsx)(i.$n,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){return t("select",{index:e.index})}}),(0,r.jsx)(i.$n,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){return t("eject_disk",{index:e.index})}}),(0,r.jsx)(i.$n,{width:2,icon:e.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){return t("set_read_only",{index:e.index,read_only:e.read_only})}})]})]},e)}),(0,r.jsx)(i.$n,{})]})})]})]})}},6954:function(e,n,t){"use strict";t.r(n),t.d(n,{GenericCrewManifest:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(2639),a=function(e){return(0,r.jsx)(o.p8,{theme:"nologo",width:588,height:510,children:(0,r.jsx)(o.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{noTopPadding:!0,children:(0,r.jsx)(l.CrewManifest,{})})})})}},9031:function(e,n,t){"use strict";t.r(n),t.d(n,{GhostHudPanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data,t=n.security,a=n.medical,s=n.diagnostic,u=n.pressure,d=n.radioactivity,f=n.ahud;return(0,r.jsx)(l.p8,{width:250,height:217,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(c,{label:"Medical",type:"medical",is_active:a}),(0,r.jsx)(c,{label:"Security",type:"security",is_active:t}),(0,r.jsx)(c,{label:"Diagnostic",type:"diagnostic",is_active:s}),(0,r.jsx)(c,{label:"Pressure",type:"pressure",is_active:u}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Radioactivity",type:"radioactivity",is_active:d,act_on:"toggle_rad",act_off:"toggle_rad"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(c,{label:"Antag HUD",is_active:f,act_on:"ahud_on",act_off:"ahud_off"})]})})})},c=function(e){var n=(0,o.Oc)().act,t=e.label,l=e.type,a=void 0===l?null:l,c=e.is_active,s=e.act_on,u=void 0===s?"hud_on":s,d=e.act_off,f=void 0===d?"hud_off":d;return(0,r.jsxs)(i.so,{pt:.3,color:"label",children:[(0,r.jsx)(i.so.Item,{pl:.5,align:"center",width:"80%",children:t}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{mr:.6,content:c?"On":"Off",icon:c?"toggle-on":"toggle-off",selected:c,onClick:function(){return n(c?f:u,{hud_type:a})}})})]})}},3396:function(e,n,t){"use strict";t.r(n),t.d(n,{GlandDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.glands;return(0,r.jsx)(l.p8,{width:300,height:338,theme:"abductor",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(void 0===a?[]:a).map(function(e){return(0,r.jsx)(i.$n,{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 t("dispense",{gland_id:e.id})}},e.id)})})})})}},1009:function(e,n,t){"use strict";t.r(n),t.d(n,{GravityGen:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.charging_state,s=a.charge_count,u=a.breaker,d=a.ext_power;return(0,r.jsx)(l.p8,{width:350,height:170,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[function(e){if(e>0)return(0,r.jsxs)(i.IC,{danger:!0,p:1.5,children:[(0,r.jsx)("b",{children:"WARNING:"})," Radiation Detected!"]})}(c),(0,r.jsx)(i.wn,{fill:!0,title:"Generator Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"Online":"Offline",color:u?"green":"red",px:1.5,onClick:function(){return t("breaker")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power Status",color:d?"good":"bad",children:c>0?(0,r.jsxs)(i.az,{inline:!0,color:"average",children:["[ ",1===c?"Charging":"Discharging"," ]"]}):(0,r.jsxs)(i.az,{inline:!0,color:d?"good":"bad",children:["[ ",d?"Powered":"Unpowered"," ]"]})}),(0,r.jsx)(i.Ki.Item,{label:"Gravity Charge",children:(0,r.jsx)(i.z2,{value:s/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}},6294:function(e,n,t){"use strict";t.r(n),t.d(n,{GuestPass:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(l.p8,{width:500,height:690,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){return t("mode",{mode:0})},children:"Issue Pass"}),(0,r.jsxs)(i.tU.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){return t("mode",{mode:1})},children:["Records (",c.issue_log.length,")"]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"ID Card",children:(0,r.jsx)(i.$n,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){return t("scan")}})})})})}),(0,r.jsx)(i.BJ.Item,{children:!c.showlogs&&(0,r.jsx)(i.wn,{title:"Issue Guest Pass",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Issue To",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){return t("giv_name")}})}),(0,r.jsx)(i.Ki.Item,{label:"Reason",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){return t("reason")}})}),(0,r.jsx)(i.Ki.Item,{label:"Duration",children:(0,r.jsx)(i.$n,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){return t("duration")}})})]})})}),!c.showlogs&&(c.scan_name?(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){return t("issue")}}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(e){return t("access",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})}):(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"id-card",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,r.jsx)(i.BJ.Item,{grow:!0,m:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){return t("print")}}),children:!!c.issue_log.length&&(0,r.jsx)(i.Ki,{children:c.issue_log.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{children:e},n)})})||(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"scroll",size:5,color:"gray"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No logs"]})})})})]})})})}},9511:function(e,n,t){"use strict";t.r(n),t.d(n,{HandheldChemDispenser:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[1,5,10,20,30,50],c=function(e){return(0,r.jsx)(l.p8,{width:390,height:430,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.amount,s=l.energy,u=l.maxEnergy,d=l.mode;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsxs)(i.z2,{value:s,minValue:0,maxValue:u,ranges:{good:[.5*u,1/0],average:[.25*u,.5*u],bad:[-1/0,.25*u]},children:[s," / ",u," Units"]})}),(0,r.jsx)(i.Ki.Item,{label:"Amount",verticalAlign:"middle",children:(0,r.jsx)(i.BJ,{children:a.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:!0,width:"15%",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",selected:c===e,content:e,onClick:function(){return t("amount",{amount:e})}})},n)})})}),(0,r.jsx)(i.Ki.Item,{label:"Mode",verticalAlign:"middle",children:(0,r.jsxs)(i.BJ,{justify:"space-between",children:[(0,r.jsx)(i.$n,{icon:"cog",selected:"dispense"===d,content:"Dispense",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"dispense"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"remove"===d,content:"Remove",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"remove"})}}),(0,r.jsx)(i.$n,{icon:"cog",selected:"isolate"===d,content:"Isolate",m:"0",width:"32%",onClick:function(){return t("mode",{mode:"isolate"})}})]})})]})})})},u=function(e){for(var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.chemicals,c=void 0===a?[]:a,s=l.current_reagent,u=[],d=0;d<(c.length+1)%3;d++)u.push(!0);return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"18%",children:(0,r.jsxs)(i.wn,{fill:!0,title:l.glass?"Drink Selector":"Chemical Selector",children:[c.map(function(e,n){return(0,r.jsx)(i.$n,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:s===e.id,content:e.title,style:{marginLeft:"2px"},onClick:function(){return t("dispense",{reagent:e.id})}},n)}),u.map(function(e,n){return(0,r.jsx)(i.BJ.Item,{grow:"1",basis:"25%"},n)})]})})}},3365:function(e,n,t){"use strict";t.r(n),t.d(n,{HealthSensor:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,u=c.on,d=c.user_health,f=c.minHealth,h=c.maxHealth,m=c.alarm_health;return(0,r.jsx)(a.p8,{width:300,height:125,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scanning",children:(0,r.jsx)(i.$n,{icon:"power-off",content:u?"On":"Off",color:u?null:"red",selected:u,onClick:function(){return t("scan_toggle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health activation",children:(0,r.jsx)(i.Q7,{animate:!0,step:2,stepPixelSize:6,minValue:f,maxValue:h,value:m,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return t("alarm_health",{alarm_health:e})}})}),null!==d&&(0,r.jsx)(i.Ki.Item,{label:"User health",children:(0,r.jsx)(i.az,{color:s(d),bold:d>=100,children:(0,r.jsx)(i.zv,{value:d})})})]})})})})},s=function(e){return e>50?"green":e>0?"orange":"red"}},5880:function(e,n,t){"use strict";t.r(n),t.d(n,{Holodeck:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(7790),o=t(3384),l=t(2864),a=t(7542),c=t(2723),s=function(){var e=(0,l.Oc)(),n=e.act,t=e.data,s=t.card,u=t.card_skins,d=t.all_centcom_skins,f=t.regions;return(0,r.jsx)(o.p8,{width:600,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsxs)(i.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Basic Information",children:[(0,r.jsx)(a.CardInformation,{card:s}),(0,r.jsx)(i.Ki.Item,{label:"Job Name",children:(0,r.jsx)(i.$n,{icon:s&&"Unknown"!==s.rank?"pencil-alt":"exclamation-triangle",selected:!!s,onClick:function(){return n("set_job_name")},children:null==s?void 0:s.rank})})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(a.DropdownCardSkins,{is_centcom:!0,card:s,card_skins:u,all_centcom_skins:d})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(c.AccessList,{accesses:f,selectedList:s.access,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})}})})]})})})}},6126:function(e,n,t){"use strict";t.r(n),t.d(n,{Instrument:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)();return n.act,n.data,(0,r.jsxs)(l.p8,{width:600,height:505,children:[(0,r.jsx)(c,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(s,{}),(0,r.jsx)(d,{})]})})]})},c=function(e){var n=(0,o.Oc)(),t=n.act;if(n.data.help)return(0,r.jsx)(i.aF,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,r.jsx)(i.wn,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,r.jsxs)(i.az,{px:"0.5rem",mt:"-0.5rem",children:[(0,r.jsx)("h1",{children:"Making a Song"}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsxs)("p",{children:["Lines are a series of chords, separated by commas\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(,)"}),", each with notes separated by hyphens\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"(-)"}),".",(0,r.jsx)("br",{}),"Every note in a chord will play together, with the chord timed by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo"})," ","as defined above."]}),(0,r.jsxs)("p",{children:["Notes are played by the\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"names of the note"}),", and optionally, the\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"}),", and/or the"," ",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave number"}),".",(0,r.jsx)("br",{}),"By default, every note is\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"natural"})," ","and in\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave 3"}),". Defining a different state for either is remembered for each"," ",(0,r.jsx)(i.az,{as:"span",color:"good",children:"note"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Example:"}),"\xa0",(0,r.jsx)("i",{children:"C,D,E,F,G,A,B"})," will play a\xa0",(0,r.jsx)(i.az,{as:"span",color:"good",children:"C"}),"\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"major"})," ","scale."]}),(0,r.jsxs)("li",{children:["After a note has an\xa0",(0,r.jsx)(i.az,{as:"span",color:"average",children:"accidental"})," ","or\xa0",(0,r.jsx)(i.az,{as:"span",color:"bad",children:"octave"})," ","placed, it will be remembered:\xa0",(0,r.jsx)("i",{children:"C,C4,C#,C3"})," is ",(0,r.jsx)("i",{children:"C3,C4,C4#,C3#"})]})]})]}),(0,r.jsxs)("p",{children:[(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"Chords"}),"\xa0can be played simply by seperating each note with a hyphen: ",(0,r.jsx)("i",{children:"A-C#,Cn-E,E-G#,Gn-B"}),".",(0,r.jsx)("br",{}),"A"," ",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"pause"}),"\xa0may be denoted by an empty chord: ",(0,r.jsx)("i",{children:"C,E,,C,G"}),".",(0,r.jsx)("br",{}),"To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"tempo / x"}),",\xa0",(0,r.jsx)(i.az,{as:"span",color:"highlight",children:"eg:"})," ",(0,r.jsx)("i",{children:"C,G/2,E/4"}),"."]}),(0,r.jsxs)("p",{children:["Combined, an example line is: ",(0,r.jsx)("i",{children:"E-E4/4,F#/2,G#/8,B/8,E3-E4/4"}),".",(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Lines may be up to 300 characters."}),(0,r.jsx)("li",{children:"A song may only contain up to 1,000 lines."})]})]}),(0,r.jsx)("h1",{children:"Instrument Advanced Settings"}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Type:"}),"\xa0Whether the instrument is legacy or synthesized.",(0,r.jsx)("br",{}),"Legacy instruments have a collection of sounds that are selectively used depending on the note to play.",(0,r.jsx)("br",{}),"Synthesized instruments use a base sound and change its pitch to match the note to play."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Current:"}),"\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),"\xa0The pitch to apply to all notes of the song."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain Mode:"}),"\xa0How a played note fades out.",(0,r.jsx)("br",{}),"Linear sustain means a note will fade out at a constant rate.",(0,r.jsx)("br",{}),"Exponential sustain means a note will fade out at an exponential rate, sounding smoother."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),"\xa0The volume threshold at which a note is fully stopped."]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(i.az,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),"\xa0Whether the last note should be sustained indefinitely."]})]}),(0,r.jsx)(i.$n,{color:"grey",content:"Close",onClick:function(){return t("help")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.lines,c=l.playing,s=l.repeat,d=l.maxRepeats,f=l.tempo,h=l.minTempo,m=l.maxTempo,p=l.tickLag,x=l.volume,g=l.minVolume,j=l.maxVolume,b=l.ready;return(0,r.jsxs)(i.wn,{m:0,title:"Instrument",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"info",content:"Help",onClick:function(){return t("help")}}),(0,r.jsx)(i.$n,{icon:"file",content:"New",onClick:function(){return t("newsong")}}),(0,r.jsx)(i.$n,{icon:"upload",content:"Import",onClick:function(){return t("import")}})]}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Playback",children:[(0,r.jsx)(i.$n,{selected:c,disabled:0===a.length||s<0,icon:"play",content:"Play",onClick:function(){return t("play")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"stop",content:"Stop",onClick:function(){return t("stop")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Repeat",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:0,maxValue:d,value:s,stepPixelSize:59,onChange:function(e,n){return t("repeat",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Tempo",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{disabled:f>=m,content:"-",as:"span",mr:"0.5rem",onClick:function(){return t("tempo",{new:f+p})}}),Math.round(600/f)," BPM",(0,r.jsx)(i.$n,{disabled:f<=h,content:"+",as:"span",ml:"0.5rem",onClick:function(){return t("tempo",{new:f-p})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Volume",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:g,maxValue:j,value:x,stepPixelSize:6,tickWhileDragging:!0,onChange:function(e,n){return t("setvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:b?(0,r.jsx)(i.az,{color:"good",children:"Ready"}):(0,r.jsx)(i.az,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,r.jsx)(u,{})]})},u=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,s=c.allowedInstrumentNames,u=c.instrumentLoaded,d=c.instrument,f=c.canNoteShift,h=c.noteShift,m=c.noteShiftMin,p=c.noteShiftMax,x=c.sustainMode,g=c.sustainLinearDuration,j=c.sustainExponentialDropoff,b=c.legacy,y=c.sustainDropoffVolume,v=c.sustainHeldNote;return 1===x?(n="Linear",t=(0,r.jsx)(i.Ap,{minValue:.1,maxValue:5,value:g,step:.5,stepPixelSize:85,format:function(e){return Math.round(100*e)/100+" seconds"},onChange:function(e,n){return a("setlinearfalloff",{new:n/10})}})):2===x&&(n="Exponential",t=(0,r.jsx)(i.Ap,{minValue:1.025,maxValue:10,value:j,step:.01,format:function(e){return Math.round(1e3*e)/1e3+"% per decisecond"},onChange:function(e,n){return a("setexpfalloff",{new:n})}})),s.sort(),(0,r.jsx)(i.az,{my:-1,children:(0,r.jsx)(i.Nt,{mt:"1rem",mb:"0",title:"Advanced",children:(0,r.jsxs)(i.wn,{mt:-1,children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:b?"Legacy":"Synthesized"}),(0,r.jsx)(i.Ki.Item,{label:"Current",children:u?(0,r.jsx)(i.ms,{options:s,selected:d,width:"50%",onSelected:function(e){return a("switchinstrument",{name:e})}}):(0,r.jsx)(i.az,{color:"bad",children:"None!"})}),!!(!b&&f)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Note Shift/Note Transpose",children:(0,r.jsx)(i.Ap,{minValue:m,maxValue:p,value:h,stepPixelSize:2,format:function(e){return e+" keys / "+Math.round(e/12*100)/100+" octaves"},onChange:function(e,n){return a("setnoteshift",{new:n})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Sustain Mode",children:[(0,r.jsx)(i.ms,{options:["Linear","Exponential"],selected:n,mb:"0.4rem",onSelected:function(e){return a("setsustainmode",{new:e})}}),t]}),(0,r.jsx)(i.Ki.Item,{label:"Volume Dropoff Threshold",children:(0,r.jsx)(i.Ap,{animated:!0,minValue:.01,maxValue:100,value:y,stepPixelSize:6,onChange:function(e,n){return a("setdropoffvolume",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Sustain indefinitely last held note",children:(0,r.jsx)(i.$n,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"Yes":"No",onClick:function(){return a("togglesustainhold")}})})]})]}),(0,r.jsx)(i.$n,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return a("reset")}})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.playing,c=l.lines,s=l.editing;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!s||a,icon:"plus",content:"Add Line",onClick:function(){return t("newline",{line:c.length+1})}}),(0,r.jsx)(i.$n,{selected:!s,icon:s?"chevron-up":"chevron-down",onClick:function(){return t("edit")}})]}),children:!!s&&(c.length>0?(0,r.jsx)(i.Ki,{children:c.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:n+1,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:a,icon:"pen",onClick:function(){return t("modifyline",{line:n+1})}}),(0,r.jsx)(i.$n,{disabled:a,icon:"trash",onClick:function(){return t("deleteline",{line:n+1})}})]}),children:e},n)})}):(0,r.jsx)(i.az,{color:"label",children:"Song is empty."}))})}},1783:function(e,n,t){"use strict";t.r(n),t.d(n,{KeyComboModal:()=>x});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=48&&e.keyCode<=57)&&(n+="Shift"),3===e.location&&(n+="Numpad"),h(e))if(e.shiftKey&&e.keyCode>=48&&e.keyCode<=57)n+="Shift"+(e.keyCode-48);else{var t=e.key.toUpperCase();n+=m[t]||t}return n},x=function(e){var n=(0,a.Oc)(),t=n.act,d=n.data,m=d.init_value,x=d.large_buttons,g=d.message,j=void 0===g?"":g,b=d.title,y=d.timeout,v=f((0,i.useState)(m),2),w=v[0],k=v[1],_=f((0,i.useState)(!0),2),C=_[0],I=_[1],S=function(e){if(!C){e.key===l._.Enter&&t("submit",{entry:w}),(0,l.KL)(e.key)&&t("cancel");return}if(e.preventDefault(),h(e)){O(p(e)),I(!1);return}if(e.key===l._.Escape){O(m),I(!1);return}},O=function(e){e!==w&&k(e)},A=130+(j.length>30?Math.ceil(j.length/3):0)+(j.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:b,width:240,height:A,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){S(e)},children:(0,r.jsxs)(o.wn,{fill:!0,children:[(0,r.jsx)(o.y5,{}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:C,content:C&&null!==C?"Awaiting input...":""+w,width:"100%",textAlign:"center",onClick:function(){O(m),I(!0)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})]})})]})}},3928:function(e,n,t){"use strict";t.r(n),t.d(n,{KeycardAuth:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=(0,r.jsx)(i.wn,{title:"Keycard Authentication Device",children:(0,r.jsx)(i.az,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!a.swiping&&!a.busy)return(0,r.jsx)(l.p8,{width:540,height:280,children:(0,r.jsxs)(l.p8.Content,{children:[c,(0,r.jsx)(i.wn,{title:"Choose Action",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Red Alert",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",disabled:!a.redAvailable,onClick:function(){return t("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,r.jsx)(i.Ki.Item,{label:"ERT",children:(0,r.jsx)(i.$n,{icon:"broadcast-tower",onClick:function(){return t("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Maint Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,r.jsxs)(i.Ki.Item,{label:"Emergency Station-Wide Access",children:[(0,r.jsx)(i.$n,{icon:"door-open",onClick:function(){return t("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,r.jsx)(i.$n,{icon:"door-closed",onClick:function(){return t("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})});var s=(0,r.jsx)(i.az,{color:"red",children:"Waiting for YOU to swipe your ID..."});return a.hasSwiped||a.ertreason||"Emergency Response Team"!==a.event?a.hasConfirm?s=(0,r.jsx)(i.az,{color:"green",children:"Request Confirmed!"}):a.isRemote?s=(0,r.jsx)(i.az,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):a.hasSwiped&&(s=(0,r.jsx)(i.az,{color:"orange",children:"Waiting for second person to confirm..."})):s=(0,r.jsx)(i.az,{color:"red",children:"Fill out the reason for your ERT request."}),(0,r.jsx)(l.p8,{width:540,height:265,children:(0,r.jsxs)(l.p8.Content,{children:[c,"Emergency Response Team"===a.event&&(0,r.jsx)(i.wn,{title:"Reason for ERT Call",children:(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{color:a.ertreason?"":"red",icon:a.ertreason?"check":"pencil-alt",content:a.ertreason?a.ertreason:"-----",disabled:a.busy,onClick:function(){return t("ert")}})})}),(0,r.jsx)(i.wn,{title:a.event,buttons:(0,r.jsx)(i.$n,{icon:"arrow-circle-left",content:"Back",disabled:a.busy||a.hasConfirm,onClick:function(){return t("reset")}}),children:s})]})})}},6706:function(e,n,t){"use strict";t.r(n),t.d(n,{KitchenMachine:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(6696),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.config,u=t.ingredients,d=t.operating,f=c.title;return(0,r.jsx)(l.p8,{width:400,height:320,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(a.Operating,{operating:d,name:f}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(s,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:u.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.inactive,c=l.tooltip;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"power-off",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){return t("cook")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",disabled:a,tooltip:a?c:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){return t("eject")}})})]})})}},9846:function(e,n,t){"use strict";t.r(n),t.d(n,{LawManager:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.isAdmin,d=a.isSlaved,f=a.isMalf,h=a.isAIMalf,m=a.view;return(0,r.jsx)(l.p8,{width:800,height:f?620:365,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!(u&&d)&&(0,r.jsxs)(i.IC,{children:["This unit is slaved to ",d,"."]}),!!(f||h)&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:"Law Management",selected:0===m,onClick:function(){return t("set_view",{set_view:0})}}),(0,r.jsx)(i.$n,{content:"Lawsets",selected:1===m,onClick:function(){return t("set_view",{set_view:1})}})]}),0===m&&(0,r.jsx)(c,{}),1===m&&(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.has_zeroth_laws,c=l.zeroth_laws,s=l.has_ion_laws,d=l.ion_laws,f=l.ion_law_nr,h=l.has_inherent_laws,m=l.inherent_laws,p=l.has_supplied_laws,x=l.supplied_laws,g=l.channels,j=l.channel,b=l.isMalf,y=l.isAdmin,v=l.zeroth_law,w=l.ion_law,k=l.inherent_law,_=l.supplied_law,C=l.supplied_law_position;return(0,r.jsxs)(r.Fragment,{children:[!!a&&(0,r.jsx)(u,{title:"ERR_NULL_VALUE",laws:c,isMalf:b}),!!s&&(0,r.jsx)(u,{title:"".concat(f),laws:d,isMalf:b}),!!h&&(0,r.jsx)(u,{title:"Inherent",laws:m,isMalf:b}),!!p&&(0,r.jsx)(u,{title:"Supplied",laws:x,isMalf:b}),(0,r.jsx)(i.wn,{title:"Statement Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Statement Channel",children:g.map(function(e){return(0,r.jsx)(i.$n,{content:e.channel,selected:e.channel===j,onClick:function(){return t("law_channel",{law_channel:e.channel})}},e.channel)})}),(0,r.jsx)(i.Ki.Item,{label:"State Laws",children:(0,r.jsx)(i.$n,{content:"State Laws",onClick:function(){return t("state_laws")}})}),(0,r.jsx)(i.Ki.Item,{label:"Law Notification",children:(0,r.jsx)(i.$n,{content:"Notify",onClick:function(){return t("notify_laws")}})})]})}),!!b&&(0,r.jsx)(i.wn,{title:"Add Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Type"}),(0,r.jsx)(i.XI.Cell,{width:"60%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"20%",children:"Actions"})]}),!!(y&&!a)&&(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Zero"}),(0,r.jsx)(i.XI.Cell,{children:v}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_zeroth_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_zeroth_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Ion"}),(0,r.jsx)(i.XI.Cell,{children:w}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_ion_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_ion_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Inherent"}),(0,r.jsx)(i.XI.Cell,{children:k}),(0,r.jsx)(i.XI.Cell,{children:"N/A"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_inherent_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_inherent_law")}})]})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Supplied"}),(0,r.jsx)(i.XI.Cell,{children:_}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:C,onClick:function(){return t("change_supplied_law_position")}})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("change_supplied_law")}}),(0,r.jsx)(i.$n,{content:"Add",icon:"plus",onClick:function(){return t("add_supplied_law")}})]})]})]})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.law_sets;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsx)(i.wn,{title:e.name+" - "+e.header,buttons:(0,r.jsx)(i.$n,{content:"Load Laws",icon:"download",onClick:function(){return t("transfer_laws",{transfer_laws:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)}),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e.index,children:e.law},e.index)})]})},e.name)})})},u=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.isMalf,a=e.laws,c=e.title;return(0,r.jsx)(i.wn,{title:c+" Laws",children:(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{width:"10%",children:"Index"}),(0,r.jsx)(i.XI.Cell,{width:"69%",children:"Law"}),(0,r.jsx)(i.XI.Cell,{width:"21%",children:"State?"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.index}),(0,r.jsx)(i.XI.Cell,{children:e.law}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return t("state_law",{ref:e.ref,state_law:+!e.state})}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Edit",icon:"pencil-alt",onClick:function(){return t("edit_law",{edit_law:e.ref})}}),(0,r.jsx)(i.$n,{content:"Delete",icon:"trash",color:"red",onClick:function(){return t("delete_law",{delete_law:e.ref})}})]})]})]},e.law)})]})})}},3788:function(e,n,t){"use strict";t.r(n),t.d(n,{LawyerSim:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.crim_name,u=a.crim_job,d=a.crimes_list,f=a.total_sent,h=a.off_name,m=a.station_loc,p=a.arrest_desc,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Magistrate Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the station's Magistrate and review Security's arrest records!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must review ",(0,r.jsx)("b",{children:g})," arrest records, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a Magistrate working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like listed crimes, station name, job, and the circumstances around their arrest!"}),(0,r.jsx)(i.Ki.Item,{label:"5#",color:"silver",children:"Be sure to verify that the arresting officer had just cause. If the suspect should never have been in handcuffs, it's invalid!"}),(0,r.jsx)(i.Ki.Item,{label:"6#",color:"silver",children:"The sentencing should match the crimes committed. Review Space Law for the exact times!"}),(0,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad records!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are reviewing the arrest records of people working on a Nanotrasen station, so don't approve ",(0,r.jsx)("b",{children:"crimes"})," that ",(0,r.jsx)("b",{children:"aren't in Space Law"}),"!"]}),(0,r.jsx)(i.Ki.Item,{label:"9#",color:"silver",children:"Keep your eyes open for nonexistant jobs. If it isn't a valid job, it's possible something went wrong, and the record should be denied!"}),(0,r.jsx)(i.Ki.Item,{label:"10#",color:"silver",children:"Don't let the Clown fool you, they're subject to Space Law the same as anyone else!"})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Arrest Records",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Record Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Job",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Crimes",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Sentencing",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Arresting Officer's Name",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Station",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Manner of Arrest",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the record!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Invalid",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("deny")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Valid",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("approve")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},3023:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryComputer:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e?"caution":"default",onClick:function(){return i("set_rating",{rating_value:e})}})},n)}),(0,r.jsxs)(o.BJ.Item,{bold:!0,ml:2,fontSize:"150%",children:[a+"/10",(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},h=function(e){var n=(0,l.Oc)().data,t=e.tabIndex,i=e.setTabIndex,a=n.login_state;return(0,r.jsx)(o.BJ.Item,{mb:1,children:(0,r.jsxs)(o.tU,{fluid:!0,textAlign:"center",children:[(0,r.jsx)(o.tU.Tab,{selected:0===t,onClick:function(){return i(0)},children:"Book Archives"}),(0,r.jsx)(o.tU.Tab,{selected:1===t,onClick:function(){return i(1)},children:"Corporate Literature"}),(0,r.jsx)(o.tU.Tab,{selected:2===t,onClick:function(){return i(2)},children:"Upload Book"}),1===a&&(0,r.jsx)(o.tU.Tab,{selected:3===t,onClick:function(){return i(3)},children:"Patron Manager"}),(0,r.jsx)(o.tU.Tab,{selected:4===t,onClick:function(){return i(4)},children:"Inventory"})]})})},m=function(e){switch(e.tabIndex){case 0:return(0,r.jsx)(x,{});case 1:return(0,r.jsx)(g,{});case 2:return(0,r.jsx)(j,{});case 3:return(0,r.jsx)(b,{});case 4:return(0,r.jsx)(y,{});default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},p=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.searchcontent,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{width:"35%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.title||"Input Title",onClick:function(){return(0,c.modalOpen)("edit_search_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{textAlign:"left",icon:"pen",width:20,content:a.author||"Input Author",onClick:function(){return(0,c.modalOpen)("edit_search_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Ratings",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{mr:1,width:"min-content",content:a.ratingmin,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmin")}})}),(0,r.jsx)(o.BJ.Item,{children:"To"}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{ml:1,width:"min-content",content:a.ratingmax,onClick:function(){return(0,c.modalOpen)("edit_search_ratingmax")}})})]})})]})]}),(0,r.jsxs)(o.BJ.Item,{width:"40%",children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,r.jsx)(o.Ki,{children:(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{mt:2,children:(0,r.jsx)(o.ms,{mt:.6,width:"190px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_search_category",{category_id:d[e]})}})})})}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,selected:!0,icon:"unlink",onClick:function(){return t("toggle_search_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.az,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,r.jsx)(o.$n,{content:"Clear Search",icon:"eraser",onClick:function(){return t("clear_search")}}),a.ckey?(0,r.jsx)(o.$n,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){return t("clear_ckey_search")}}):(0,r.jsx)(o.$n,{content:"Find My Books",icon:"search",onClick:function(){return t("find_users_books",{user_ckey:u})}})]})]})},x=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.external_booklist,s=i.archive_pagenumber,u=i.num_pages,d=i.login_state;return(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,r.jsxs)("div",{children:[(0,r.jsx)(o.$n,{icon:"angle-double-left",disabled:1===s,onClick:function(){return t("deincrementpagemax")}}),(0,r.jsx)(o.$n,{icon:"chevron-left",disabled:1===s,onClick:function(){return t("deincrementpage")}}),(0,r.jsx)(o.$n,{bold:!0,content:s,onClick:function(){return(0,c.modalOpen)("setpagenumber")}}),(0,r.jsx)(o.$n,{icon:"chevron-right",disabled:s===u,onClick:function(){return t("incrementpage")}}),(0,r.jsx)(o.$n,{icon:"angle-double-right",disabled:s===u,onClick:function(){return t("incrementpagemax")}})]}),children:[(0,r.jsx)(p,{}),(0,r.jsx)("hr",{}),(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Ratings"}),(0,r.jsx)(o.XI.Cell,{children:"Category"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:.5}),e.title.length>45?e.title.substr(0,45)+"...":e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author.length>30?e.author.substr(0,30)+"...":e.author}),(0,r.jsxs)(o.XI.Cell,{children:[e.rating,(0,r.jsx)(o.In,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,r.jsx)(o.XI.Cell,{children:e.categories.join(", ").substr(0,45)}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===d&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_external_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},e.id)})]})]})},g=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.programmatic_booklist,s=i.login_state;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"SSID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{textAlign:"middle",children:"Actions"})]}),a.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book",mr:2}),e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(o.XI.Cell,{textAlign:"right",children:[1===s&&(0,r.jsx)(o.$n,{content:"Order",icon:"print",onClick:function(){return t("order_programmatic_book",{bookid:e.id})}}),(0,r.jsx)(o.$n,{content:"More...",onClick:function(){return(0,c.modalOpen)("expand_info",{bookid:e.id})}})]})]},n)})]})})},j=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.selectedbook,s=i.book_categories,u=i.user_ckey,d=[];return s.map(function(e){return d[e.description]=e.category_id}),(0,r.jsxs)(o.wn,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,r.jsx)(o.$n.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:a.copyright,content:"Upload Book",onClick:function(){return t("uploadbook",{user_ckey:u})}}),children:[a.copyright?(0,r.jsx)(o.IC,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,r.jsx)("br",{}),(0,r.jsxs)(o.az,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(o.In,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,r.jsxs)(o.BJ,{children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.title,onClick:function(){return(0,c.modalOpen)("edit_selected_title")}})}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.$n,{width:20,textAlign:"left",icon:"pen",disabled:a.copyright,content:a.author,onClick:function(){return(0,c.modalOpen)("edit_selected_author")}})}),(0,r.jsx)(o.Ki.Item,{label:"Select Categories",children:(0,r.jsx)(o.az,{children:(0,r.jsx)(o.ms,{width:"240px",options:s.map(function(e){return e.description}),onSelected:function(e){return t("toggle_upload_category",{category_id:d[e]})}})})})]}),(0,r.jsx)("br",{}),s.filter(function(e){return a.categories.includes(e.category_id)}).map(function(e){return(0,r.jsx)(o.$n,{content:e.description,disabled:a.copyright,selected:!0,icon:"unlink",onClick:function(){return t("toggle_upload_category",{category_id:e.category_id})}},e.category_id)})]}),(0,r.jsx)(o.BJ.Item,{mr:75,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Summary",children:(0,r.jsx)(o.$n,{icon:"pen",width:"auto",disabled:a.copyright,content:"Edit Summary",onClick:function(){return(0,c.modalOpen)("edit_selected_summary")}})}),(0,r.jsx)(o.Ki.Item,{children:a.summary})]})})]})]})},b=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data.checkout_data;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Patron"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Time Left"}),(0,r.jsx)(o.XI.Cell,{children:"Actions"})]}),i.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.In,{name:"user-tag"}),e.patron_name]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.title}),(0,r.jsx)(o.XI.Cell,{children:e.timeleft>=0?e.timeleft:"LATE"}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:(0,r.jsx)(o.$n,{content:"Mark Lost",icon:"flag",color:"bad",disabled:e.timeleft>=0,onClick:function(){return t("reportlost",{libraryid:e.libraryid})}})})]},n)})]})})},y=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).inventory_list;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,r.jsxs)(o.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"LIB ID"}),(0,r.jsx)(o.XI.Cell,{children:"Title"}),(0,r.jsx)(o.XI.Cell,{children:"Author"}),(0,r.jsx)(o.XI.Cell,{children:"Status"})]}),t.map(function(e,n){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.libraryid}),(0,r.jsxs)(o.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(o.In,{name:"book"})," ",e.title]}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(o.XI.Cell,{textAlign:"left",children:e.checked_out?"Checked Out":"Available"})]},n)})]})})};(0,c.modalRegisterBodyOverride)("expand_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,s=i.user_ckey;return(0,r.jsxs)(o.wn,{children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsx)(o.Ki.Item,{label:"Summary",children:a.summary}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.rating,(0,r.jsx)(o.In,{name:"star",color:"yellow",verticalAlign:"top"})]}),!a.isProgrammatic&&(0,r.jsx)(o.Ki.Item,{label:"Categories",children:a.categories.join(", ")})]}),(0,r.jsx)("br",{}),s===a.ckey&&(0,r.jsx)(o.$n,{content:"Delete Book",icon:"trash",color:"red",disabled:a.isProgrammatic,onClick:function(){return t("delete_book",{bookid:a.id,user_ckey:s})}}),(0,r.jsx)(o.$n,{content:"Report Book",icon:"flag",color:"red",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("report_book",{bookid:a.id})}}),(0,r.jsx)(o.$n,{content:"Rate Book",icon:"star",color:"caution",disabled:a.isProgrammatic,onClick:function(){return(0,c.modalOpen)("rate_info",{bookid:a.id})}})]})}),(0,c.modalRegisterBodyOverride)("report_book",function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=e.args,s=a.selected_report,u=a.report_categories,d=a.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:c.title}),(0,r.jsx)(o.Ki.Item,{label:"Reasons",children:(0,r.jsx)(o.az,{children:u.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.$n,{content:e.description,selected:e.category_id===s,onClick:function(){return t("set_report",{report_type:e.category_id})}}),(0,r.jsx)("br",{})]},n)})})})]}),(0,r.jsx)(o.$n.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){return t("submit_report",{bookid:c.id,user_ckey:d})}})]})}),(0,c.modalRegisterBodyOverride)("rate_info",function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.args,c=i.user_ckey;return(0,r.jsxs)(o.wn,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Title",children:a.title}),(0,r.jsx)(o.Ki.Item,{label:"Author",children:a.author}),(0,r.jsxs)(o.Ki.Item,{label:"Rating",children:[a.current_rating?a.current_rating:0,(0,r.jsx)(o.In,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,r.jsx)(o.Ki.Item,{label:"Total Ratings",children:a.total_ratings?a.total_ratings:0})]}),(0,r.jsx)(f,{}),(0,r.jsx)(o.$n.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){return t("rate_book",{bookid:a.id,user_ckey:c})}})]})})},183:function(e,n,t){"use strict";t.r(n),t.d(n,{LibraryManager:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=function(e){return(0,r.jsxs)(l.p8,{width:600,height:600,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,r.jsx)(s,{})})]})},s=function(e){var n=(0,o.Oc)();switch((n.act,n.data).pagestate){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(f,{});case 3:return(0,r.jsx)(d,{});default:return"WE SHOULDN'T BE HERE!"}},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data,(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.az,{fontSize:"1.4rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){return(0,a.modalOpen)("specify_ssid_delete")}}),(0,r.jsx)(i.$n,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_delete")}}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){return(0,a.modalOpen)("specify_ckey_search")}}),(0,r.jsx)(i.$n,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){return t("view_reported_books")}})]})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.reports;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"All Reported Books",(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Uploader CKEY"}),(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{children:"Report Type"}),(0,r.jsx)(i.XI.Cell,{children:"Reporter Ckey"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.uploader_ckey}),(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.report_description}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.reporter_ckey}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){return t("unflag_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.ckey,c=l.booklist;return(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{className:"Library__Booklist",children:[(0,r.jsxs)(i.az,{fontSize:"1.2rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,r.jsx)("br",{}),"Books uploaded by ",a,(0,r.jsx)("br",{})]}),(0,r.jsx)(i.$n,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){return t("return")}}),(0,r.jsxs)(i.XI.Row,{bold:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"SSID"}),(0,r.jsx)(i.XI.Cell,{children:"Title"}),(0,r.jsx)(i.XI.Cell,{children:"Author"}),(0,r.jsx)(i.XI.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),c.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.id}),(0,r.jsxs)(i.XI.Cell,{textAlign:"left",children:[(0,r.jsx)(i.In,{name:"book"}),e.title]}),(0,r.jsx)(i.XI.Cell,{textAlign:"left",children:e.author}),(0,r.jsxs)(i.XI.Cell,{textAlign:"right",children:[(0,r.jsx)(i.$n.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){return t("delete_book",{bookid:e.id})}}),(0,r.jsx)(i.$n,{content:"View",onClick:function(){return t("view_book",{bookid:e.id})}})]})]},e.id)})]})})}},1536:function(e,n,t){"use strict";t.r(n),t.d(n,{ListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t10),2),I=C[0],S=C[1],O=f((0,i.useState)(""),2),A=O[0],P=O[1],B=function(e){var n,t,r,i,o=T.length-1;e===l.R?null===k||k===o?(_(0),null==(n=document.getElementById("0"))||n.scrollIntoView()):(_(k+1),null==(t=document.getElementById((k+1).toString()))||t.scrollIntoView()):e===l.gf&&(null===k||0===k?(_(o),null==(r=document.getElementById(o.toString()))||r.scrollIntoView()):(_(k-1),null==(i=document.getElementById((k-1).toString()))||i.scrollIntoView()))},E=function(e){var n=String.fromCharCode(e),t=x.find(function(e){return null==e?void 0:e.toLowerCase().startsWith(null==n?void 0:n.toLowerCase())});if(t){var r,i=x.indexOf(t);_(i),null==(r=document.getElementById(i.toString()))||r.scrollIntoView()}},z=function(){S(!I),P("")},T=x.filter(function(e){return null==e?void 0:e.toLowerCase().includes(A.toLowerCase())}),N=350+Math.ceil(j.length/3);return I||setTimeout(function(){var e;return null==(e=document.getElementById(k.toString()))?void 0:e.focus()},1),(0,r.jsxs)(c.p8,{title:v,width:325,height:N,children:[y&&(0,r.jsx)(u.Loader,{value:y}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;(n===l.R||n===l.gf)&&(e.preventDefault(),B(n)),n===l.Ri&&(e.preventDefault(),t("submit",{entry:T[k]})),!I&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),E(n)),n===l.s6&&(e.preventDefault(),t("cancel"))},children:(0,r.jsx)(o.wn,{buttons:(0,r.jsx)(o.$n,{compact:!0,icon:I?"search":"font",selected:!0,tooltip:I?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){return z()}}),className:"ListInput__Section",fill:!0,title:j,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(m,{filteredItems:T,onClick:function(e){e!==k&&_(e)},onFocusSearch:function(){S(!1),S(!0)},searchBarVisible:I,selected:k})}),(0,r.jsx)(o.BJ.Item,{m:0,children:I&&(0,r.jsx)(p,{filteredItems:T,onSearch:function(e){var n;e!==A&&(P(e),_(0),null==(n=document.getElementById("0"))||n.scrollIntoView())},searchQuery:A,selected:k})}),(0,r.jsx)(o.BJ.Item,{mt:.5,children:(0,r.jsx)(s.InputButtons,{input:T[k]})})]})})})]})},m=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onClick,c=e.onFocusSearch,s=e.searchBarVisible,u=e.selected;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:t.map(function(e,a){return(0,r.jsx)(o.$n,{fluid:!0,color:"transparent",id:a,onClick:function(){return i(a)},onMouseDown:function(e){2===e.detail&&(e.preventDefault(),n("submit",{entry:t[u]}))},onKeyDown:function(e){var n=window.event?e.which:e.keyCode;s&&n>=l.W8&&n<=l.bh&&(e.preventDefault(),c())},selected:a===u,style:{animation:"none",transition:"none"},children:e.replace(/^\w/,function(e){return e.toUpperCase()})},a)})})},p=function(e){var n=(0,a.Oc)().act,t=e.filteredItems,i=e.onSearch,l=e.searchQuery,c=e.selected;return(0,r.jsx)(o.pd,{width:"100%",autoFocus:!0,autoSelect:!0,placeholder:"Search...",value:l,onChange:function(e){return i(e)},onEnter:function(){n("submit",{entry:t[c]})}})}},7239:function(e,n,t){"use strict";t.r(n),t.d(n,{Loadout:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?Object.entries(s.gears).reduce(function(e,n){var t=u(n,2),r=(t[0],t[1]);return e.concat(Object.entries(r).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}}))},[]).filter(function(e){return I(e.gear)}):Object.entries(s.gears[p]).map(function(e){var n=u(e,2);return{key:n[0],gear:n[1]}})).sort(d[v]),_&&(n=n.reverse()),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:p,buttons:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.ms,{height:1.66,selected:v,options:Object.keys(d),onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:_?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:_?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){return C(!_)}})}),x&&(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.pd,{width:20,placeholder:"Search...",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:"magnifying-glass",selected:x,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){g(!x),b("")}})})]}),children:n.map(function(e){var n=e.key,t=e.gear,i=Object.keys(s.selected_gears).includes(n),l=1===t.cost?"".concat(t.cost," Point"):"".concat(t.cost," Points"),a=(0,r.jsxs)(o.az,{children:[t.name.length>12&&(0,r.jsx)(o.az,{children:t.name}),t.gear_tier>f&&(0,r.jsx)(o.az,{mt:t.name.length>12&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),d=(0,r.jsxs)(r.Fragment,{children:[t.allowed_roles&&(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"user",tooltip:(0,r.jsx)(o.wn,{m:-1,title:"Allowed Roles",children:t.allowed_roles.map(function(e){return(0,r.jsx)(o.az,{children:e},e)})}),tooltipPosition:"left"}),Object.entries(t.tweaks).map(function(e){var n=u(e,2),t=n[0];return n[1].map(function(e){return(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:e.icon,tooltip:e.tooltip,tooltipPosition:"top"},t)})}),(0,r.jsx)(o.$n,{width:"22px",color:"transparent",icon:"info",tooltip:t.desc,tooltipPosition:"top"})]}),p=(0,r.jsxs)(o.az,{className:"Loadout-InfoBox",children:[(0,r.jsx)(o.az,{style:{flexGrow:1},fontSize:1,color:"gold",opacity:.75,children:t.gear_tier>0&&"Tier ".concat(t.gear_tier)}),(0,r.jsx)(o.az,{fontSize:.75,opacity:.66,children:l})]});return(0,r.jsx)(o.c_,{m:.5,imageSize:84,dmIcon:t.icon,dmIconState:t.icon_state,tooltip:(t.name.length>12||t.gear_tier>0)&&a,tooltipPosition:"bottom",selected:i,disabled:t.gear_tier>f||h+t.cost>m&&!i,buttons:d,buttonsAlt:p,onClick:function(){return c("toggle_gear",{gear:n})},children:t.name},n)})})},p=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.setTweakedGear,c=Object.entries(i.gears).reduce(function(e,n){var t=u(n,2),r=Object.entries((t[0],t[1])).filter(function(e){var n=u(e,1)[0];return Object.keys(i.selected_gears).includes(n)}).map(function(e){var n=u(e,2);return function(e){for(var n=1;n0&&(0,r.jsx)(o.$n,{icon:"gears",iconColor:"gray",width:"33px",onClick:function(){return l(e)}}),(0,r.jsx)(o.$n,{icon:"times",iconColor:"red",width:"32px",onClick:function(){return t("toggle_gear",{gear:e.key})}})]}),children:e.name},e.key)})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{children:(0,r.jsx)(o.z2,{value:i.gear_slots,maxValue:i.max_gear_slots,ranges:{bad:[i.max_gear_slots,1/0],average:[.66*i.max_gear_slots,i.max_gear_slots],good:[0,.66*i.max_gear_slots]},children:(0,r.jsxs)(o.az,{textAlign:"center",children:["Used points ",i.gear_slots,"/",i.max_gear_slots]})})})})]})},x=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=e.tweakedGear,c=e.setTweakedGear;return(0,r.jsx)(o.Rr,{children:(0,r.jsx)(o.az,{className:"Loadout-Modal__background",children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,width:20,height:20,title:l.name,buttons:(0,r.jsx)(o.$n,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){return c("")}}),children:(0,r.jsx)(o.Ki,{children:Object.entries(l.tweaks).map(function(e){var n=u(e,2),a=n[0];return n[1].map(function(e){var n=i.selected_gears[l.key][a];return(0,r.jsxs)(o.Ki.Item,{label:e.name,color:n?"":"gray",buttons:(0,r.jsx)(o.$n,{color:"transparent",icon:"pen",onClick:function(){return t("set_tweak",{gear:l.key,tweak:a})}}),children:[n||"Default",(0,r.jsx)(o.az,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{backgroundColor:"".concat(n)}})]},a)})})})})})})}},1387:function(e,n,t){"use strict";t.r(n),t.d(n,{LoreConsole:()=>no});var r,i=t(8138),o=t(2864),l=t(4530),a=t(7790),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t"']/,b=RegExp(j.source,"g"),y=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,v=RegExp(y.source,"g"),w={"&":"&","<":"<",">":">",'"':""","'":"'"},k=function(e){return w[e]};function _(e,n){if(n){if(j.test(e))return e.replace(b,k)}else if(y.test(e))return e.replace(v,k);return e}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function I(e){return e.replace(C,function(e,n){return"colon"===(n=n.toLowerCase())?":":"#"===n.charAt(0)?"x"===n.charAt(1)?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""})}var S=/(^|[^\[])\^/g;function O(e,n){e="string"==typeof e?e:e.source,n=n||"";var t={replace:function(n,r){return r=(r=r.source||r).replace(S,"$1"),e=e.replace(n,r),t},getRegex:function(){return new RegExp(e,n)}};return t}var A=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(e,n,t){var r,i,o,l;if(e){try{r=decodeURIComponent(I(t)).replace(A,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}n&&!P.test(t)&&(i=n,o=t,E[" "+i]||(z.test(i)?E[" "+i]=i+"/":E[" "+i]=D(i,"/",!0)),l=-1===(i=E[" "+i]).indexOf(":"),t="//"===o.substring(0,2)?l?o:i.replace(T,"$1")+o:"/"!==o.charAt(0)?i+o:l?o:i.replace(N,"$1")+o);try{t=encodeURI(t).replace(/%25/g,"%")}catch(e){return null}return t}var E={},z=/^[^:]+:\/*[^/]*$/,T=/^([^:]+:)[\s\S]*$/,N=/^([^:]+:\/*[^/]*)[\s\S]*$/,R={exec:function(){}};function $(e,n){var t=e.replace(/\|/g,function(e,n,t){for(var r=!1,i=n;--i>=0&&"\\"===t[i];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),t.length>n)t.splice(n);else for(;t.length1;)1&n&&(t+=e),n>>=1,e+=e;return t+e}function L(e,n,t,r){var i=n.href,o=n.title?_(n.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;var a={type:"link",raw:t,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:o,text:_(l)}}var K=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"space",value:function(e){var n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}},{key:"code",value:function(e){var n=this.rules.block.code.exec(e);if(n){var t=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?t:D(t,"\n")}}}},{key:"fences",value:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map(function(e){var n=e.match(/^\s+/);return null===n?e:(function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),1!==o.length);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(n,1)||function(e,n){if(e){if("string"==typeof e)return s(e,1);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,1)}}(n,1)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].length>=r.length?e.slice(r.length):e}).join("\n")}(t,n[3]||"");return{type:"code",raw:t,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}},{key:"heading",value:function(e){var n=this.rules.block.heading.exec(e);if(n){var t=n[2].trim();if(/#$/.test(t)){var r=D(t,"#");this.options.pedantic?t=r.trim():(!r||/ $/.test(r))&&(t=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:t,tokens:this.lexer.inline(t)}}}},{key:"hr",value:function(e){var n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}},{key:"blockquote",value:function(e){var n=this.rules.block.blockquote.exec(e);if(n){var t=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;var i=this.lexer.blockTokens(t);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:t}}}},{key:"list",value:function(e){var n=this.rules.block.list.exec(e);if(n){var t,r,i,o,l,a,c,s,u,d,f,h,m=n[1].trim(),p=m.length>1,x={type:"list",raw:"",ordered:p,start:p?+m.slice(0,-1):"",loose:!1,items:[]};m=p?"\\d{1,9}\\".concat(m.slice(-1)):"\\".concat(m),this.options.pedantic&&(m=p?m:"[*+-]");for(var g=new RegExp("^( {0,3}".concat(m,")((?:[ ][^\\n]*)?(?:\\n|$))"));e&&(h=!1,!(!(n=g.exec(e))||this.rules.block.hr.test(e)));){if(t=n[0],e=e.substring(t.length),s=n[2].split("\n",1)[0].replace(/^\t+/,function(e){return" ".repeat(3*e.length)}),u=e.split("\n",1)[0],this.options.pedantic?(o=2,f=s.trimLeft()):(o=(o=n[2].search(/[^ ]/))>4?1:o,f=s.slice(o),o+=n[1].length),a=!1,!s&&/^ *$/.test(u)&&(t+=u+"\n",e=e.substring(u.length+1),h=!0),!h)for(var j=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))")),b=new RegExp("^ {0,".concat(Math.min(3,o-1),"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)")),y=new RegExp("^ {0,".concat(Math.min(3,o-1),"}(?:```|~~~)")),v=new RegExp("^ {0,".concat(Math.min(3,o-1),"}#"));e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(y.test(u)||v.test(u)||j.test(u)||b.test(e)));){if(u.search(/[^ ]/)>=o||!u.trim())f+="\n"+u.slice(o);else{if(a||s.search(/[^ ]/)>=4||y.test(s)||v.test(s)||b.test(s))break;f+="\n"+u}a||u.trim()||(a=!0),t+=d+"\n",e=e.substring(d.length+1),s=u.slice(o)}!x.loose&&(c?x.loose=!0:/\n *\n *$/.test(t)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(i="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),x.items.push({type:"list_item",raw:t,task:!!r,checked:i,loose:!1,text:f}),x.raw+=t}x.items[x.items.length-1].raw=t.trimRight(),x.items[x.items.length-1].text=f.trimRight(),x.raw=x.raw.trimRight();var w=x.items.length;for(l=0;l0&&k.some(function(e){return/\n.*\n/.test(e.raw)})}if(x.loose)for(l=0;l$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:t,raw:n[0],href:r,title:i}}}},{key:"table",value:function(e){var n=this.rules.block.table.exec(e);if(n){var t={type:"table",header:$(n[1]).map(function(e){return{text:e}}),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=n[0];var r,i,o,l,a=t.align.length;for(r=0;r/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):_(n[0]):n[0]}}},{key:"link",value:function(e){var n=this.rules.inline.link.exec(e);if(n){var t=n[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;var r=D(t.slice(0,-1),"\\");if((t.length-r.length)%2==0)return}else{var i=function(e,n){if(-1===e.indexOf(")"))return -1;for(var t=e.length,r=0,i=0;i-1){var o=(0===n[0].indexOf("!")?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,o).trim(),n[3]=""}}var l=n[2],a="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(l);c&&(l=c[1],a=c[3])}else a=n[3]?n[3].slice(1,-1):"";return l=l.trim(),/^$/.test(t)?l.slice(1):l.slice(1,-1)),L(n,{href:l?l.replace(this.rules.inline._escapes,"$1"):l,title:a?a.replace(this.rules.inline._escapes,"$1"):a},n[0],this.lexer)}}},{key:"reflink",value:function(e,n){var t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){var r=(t[2]||t[1]).replace(/\s+/g," ");if(!(r=n[r.toLowerCase()])){var i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return L(t,r,t[0],this.lexer)}}},{key:"emStrong",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=this.rules.inline.emStrong.lDelim.exec(e);if(r&&!(r[3]&&t.match(RegExp("[\\p{L}\\p{N}]","u")))){var i=r[1]||r[2]||"";if(!i||i&&(""===t||this.rules.inline.punctuation.exec(t))){var o,l,a=r[0].length-1,c=a,s=0,u="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,n=n.slice(-1*e.length+a);null!=(r=u.exec(n));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]){if(l=o.length,r[3]||r[4]){c+=l;continue}if((r[5]||r[6])&&a%3&&!((a+l)%3)){s+=l;continue}if(!((c-=l)>0)){l=Math.min(l,l+c+s);var d=e.slice(0,a+r.index+(r[0].length-o.length)+l);if(Math.min(a,l)%2){var f=d.slice(1,-1);return{type:"em",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}var h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}}}}},{key:"codespan",value:function(e){var n=this.rules.inline.code.exec(e);if(n){var t=n[2].replace(/\n/g," "),r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=_(t,!0),{type:"codespan",raw:n[0],text:t}}}},{key:"br",value:function(e){var n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}},{key:"del",value:function(e){var n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}},{key:"autolink",value:function(e,n){var t,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(t=_(this.options.mangle?n(i[1]):i[1])):t=_(i[1]),{type:"link",raw:i[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}},{key:"url",value:function(e,n){var t,r,i,o;if(t=this.rules.inline.url.exec(e)){if("@"===t[2])i="mailto:"+(r=_(this.options.mangle?n(t[0]):t[0]));else{do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])[0];while(o!==t[0]);r=_(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}},{key:"inlineText",value:function(e,n){var t,r=this.rules.inline.text.exec(e);if(r)return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):_(r[0]):r[0]:_(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:t}}}]),e}(),J={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:R,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};J._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,J._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,J.def=O(J.def).replace("label",J._label).replace("title",J._title).getRegex(),J.bullet=/(?:[*+-]|\d{1,9}[.)])/,J.listItemStart=O(/^( *)(bull) */).replace("bull",J.bullet).getRegex(),J.list=O(J.list).replace(/bull/g,J.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+J.def.source+")").getRegex(),J._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",J._comment=/|$)/,J.html=O(J.html,"i").replace("comment",J._comment).replace("tag",J._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),J.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.blockquote=O(J.blockquote).replace("paragraph",J.paragraph).getRegex(),J.normal=m({},J),J.gfm=p(m({},J.normal),{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),J.gfm.table=O(J.gfm.table).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.gfm.paragraph=O(J._paragraph).replace("hr",J.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",J.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",J._tag).getRegex(),J.pedantic=p(m({},J.normal),{html:O("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",J._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:O(J.normal._paragraph).replace("hr",J.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",J.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:R,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(t="x"+t.toString(16)),r+="&#"+t+";";return r}X._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",X.punctuation=O(X.punctuation).replace(/punctuation/g,X._punctuation).getRegex(),X.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,X.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,X._comment=O(J._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),X.emStrong.lDelim=O(X.emStrong.lDelim).replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimAst=O(X.emStrong.rDelimAst,"g").replace(/punct/g,X._punctuation).getRegex(),X.emStrong.rDelimUnd=O(X.emStrong.rDelimUnd,"g").replace(/punct/g,X._punctuation).getRegex(),X._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,X.autolink=O(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex(),X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,X.tag=O(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex(),X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,X.link=O(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex(),X.reflink=O(X.reflink).replace("label",X._label).replace("ref",J._label).getRegex(),X.nolink=O(X.nolink).replace("ref",J._label).getRegex(),X.reflinkSearch=O(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex(),X.normal=m({},X),X.pedantic=p(m({},X.normal),{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:O(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()}),X.gfm=p(m({},X.normal),{escape:O(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\1&&void 0!==arguments[1]?arguments[1]:[];for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,function(e,n,t){return n+" ".repeat(t.length)});e&&"break"!==(o=this,function(){if(o.options.extensions&&o.options.extensions.block&&o.options.extensions.block.some(function(t){return!!(n=t.call({lexer:l},e,a))&&(e=e.substring(n.raw.length),a.push(n),!0)}))return"continue";if(n=o.tokenizer.space(e))return e=e.substring(n.raw.length),1===n.raw.length&&a.length>0?a[a.length-1].raw+="\n":a.push(n),"continue";if(n=o.tokenizer.code(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if((n=o.tokenizer.fences(e))||(n=o.tokenizer.heading(e))||(n=o.tokenizer.hr(e))||(n=o.tokenizer.blockquote(e))||(n=o.tokenizer.list(e))||(n=o.tokenizer.html(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(n=o.tokenizer.def(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&("paragraph"===t.type||"text"===t.type)?(t.raw+="\n"+n.raw,t.text+="\n"+n.raw,o.inlineQueue[o.inlineQueue.length-1].src=t.text):o.tokens.links[n.tag]||(o.tokens.links[n.tag]={href:n.href,title:n.title}),"continue";if((n=o.tokenizer.table(e))||(n=o.tokenizer.lheading(e)))return e=e.substring(n.raw.length),a.push(n),"continue";if(r=e,o.options.extensions&&o.options.extensions.startBlock){var c=1/0,s=e.slice(1),u=void 0;o.options.extensions.startBlock.forEach(function(e){"number"==typeof(u=e.call({lexer:this},s))&&u>=0&&(c=Math.min(c,u))}),c<1/0&&c>=0&&(r=e.substring(0,c+1))}if(o.state.top&&(n=o.tokenizer.paragraph(r)))return t=a[a.length-1],i&&"paragraph"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),i=r.length!==e.length,e=e.substring(n.raw.length),"continue";if(n=o.tokenizer.text(e))return e=e.substring(n.raw.length),(t=a[a.length-1])&&"text"===t.type?(t.raw+="\n"+n.raw,t.text+="\n"+n.text,o.inlineQueue.pop(),o.inlineQueue[o.inlineQueue.length-1].src=t.text):a.push(n),"continue";if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(o.options.silent)return console.error(d),"break";throw Error(d)}}()););return this.state.top=!0,a}},{key:"inline",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return this.inlineQueue.push({src:e,tokens:n}),n}},{key:"inlineTokens",value:function(e){var n,t,r,i,o,l,a,c=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=e;if(this.tokens.links){var d=Object.keys(this.tokens.links);if(d.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(u));)d.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,i.index)+"["+M("a",i[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,i.index+i[0].length-2)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e&&"break"!==(a=this,function(){if(o||(l=""),o=!1,a.options.extensions&&a.options.extensions.inline&&a.options.extensions.inline.some(function(t){return!!(n=t.call({lexer:c},e,s))&&(e=e.substring(n.raw.length),s.push(n),!0)}))return"continue";if(n=a.tokenizer.escape(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.tag(e))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(n=a.tokenizer.link(e))return e=e.substring(n.raw.length),s.push(n),"continue";if(n=a.tokenizer.reflink(e,a.tokens.links))return e=e.substring(n.raw.length),(t=s[s.length-1])&&"text"===n.type&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if((n=a.tokenizer.emStrong(e,u,l))||(n=a.tokenizer.codespan(e))||(n=a.tokenizer.br(e))||(n=a.tokenizer.del(e))||(n=a.tokenizer.autolink(e,F))||!a.state.inLink&&(n=a.tokenizer.url(e,F)))return e=e.substring(n.raw.length),s.push(n),"continue";if(r=e,a.options.extensions&&a.options.extensions.startInline){var i=1/0,d=e.slice(1),f=void 0;a.options.extensions.startInline.forEach(function(e){"number"==typeof(f=e.call({lexer:this},d))&&f>=0&&(i=Math.min(i,f))}),i<1/0&&i>=0&&(r=e.substring(0,i+1))}if(n=a.tokenizer.inlineText(r,U))return e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),o=!0,(t=s[s.length-1])&&"text"===t.type?(t.raw+=n.raw,t.text+=n.text):s.push(n),"continue";if(e){var h="Infinite loop on byte: "+e.charCodeAt(0);if(a.options.silent)return console.error(h),"break";throw Error(h)}}()););return s}}],[{key:"rules",get:function(){return{block:J,inline:X}}},{key:"lex",value:function(n,t){return new e(t).lex(n)}},{key:"lexInline",value:function(n,t){return new e(t).inlineTokens(n)}}]),e}(),H=function(){function e(n){u(this,e),this.options=n||g}return f(e,[{key:"code",value:function(e,n,t){var r=(n||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(t=!0,e=i)}return(e=e.replace(/\n$/,"")+"\n",r)?'
    '+(t?e:_(e,!0))+"
    \n":"
    "+(t?e:_(e,!0))+"
    \n"}},{key:"blockquote",value:function(e){return"
    \n".concat(e,"
    \n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,n,t,r){if(this.options.headerIds){var i=this.options.headerPrefix+r.slug(t);return"').concat(e,"\n")}return"").concat(e,"\n")}},{key:"hr",value:function(){return this.options.xhtml?"
    \n":"
    \n"}},{key:"list",value:function(e,n,t){var r=n?"ol":"ul";return"<"+r+(n&&1!==t?' start="'+t+'"':"")+">\n"+e+"\n"}},{key:"listitem",value:function(e){return"
  • ".concat(e,"
  • \n")}},{key:"checkbox",value:function(e){return" "}},{key:"paragraph",value:function(e){return"

    ".concat(e,"

    \n")}},{key:"table",value:function(e,n){return n&&(n="".concat(n,"")),"\n\n"+e+"\n"+n+"
    \n"}},{key:"tablerow",value:function(e){return"\n".concat(e,"\n")}},{key:"tablecell",value:function(e,n){var t=n.header?"th":"td";return(n.align?"<".concat(t,' align="').concat(n.align,'">'):"<".concat(t,">"))+e+"\n")}},{key:"strong",value:function(e){return"".concat(e,"")}},{key:"em",value:function(e){return"".concat(e,"")}},{key:"codespan",value:function(e){return"".concat(e,"")}},{key:"br",value:function(){return this.options.xhtml?"
    ":"
    "}},{key:"del",value:function(e){return"".concat(e,"")}},{key:"link",value:function(e,n,t){if(null===(e=B(this.options.sanitize,this.options.baseUrl,e)))return t;var r='
    "}},{key:"image",value:function(e,n,t){if(null===(e=B(this.options.sanitize,this.options.baseUrl,e)))return t;var r='').concat(t,'":">"}},{key:"text",value:function(e){return e}}]),e}(),W=function(){function e(){u(this,e)}return f(e,[{key:"strong",value:function(e){return e}},{key:"em",value:function(e){return e}},{key:"codespan",value:function(e){return e}},{key:"del",value:function(e){return e}},{key:"html",value:function(e){return e}},{key:"text",value:function(e){return e}},{key:"link",value:function(e,n,t){return""+t}},{key:"image",value:function(e,n,t){return""+t}},{key:"br",value:function(){return""}}]),e}(),q=function(){function e(){u(this,e),this.seen={}}return f(e,[{key:"serialize",value:function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}},{key:"getNextSafeSlug",value:function(e,n){var t=e,r=0;if(this.seen.hasOwnProperty(t)){r=this.seen[e];do t=e+"-"+ ++r;while(this.seen.hasOwnProperty(t))}return n||(this.seen[e]=r,this.seen[t]=0),t}},{key:"slug",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.serialize(e);return this.getNextSafeSlug(t,n.dryrun)}}]),e}(),G=function(){function e(n){u(this,e),this.options=n||g,this.options.renderer=this.options.renderer||new H,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new W,this.slugger=new q}return f(e,[{key:"parse",value:function(e){var n,t,r,i,o,l,a,c,s,u,d,f,h,m,p,x,g,j,b,y=!(arguments.length>1)||void 0===arguments[1]||arguments[1],v="",w=e.length;for(n=0;n0&&"paragraph"===p.tokens[0].type?(p.tokens[0].text=j+" "+p.tokens[0].text,p.tokens[0].tokens&&p.tokens[0].tokens.length>0&&"text"===p.tokens[0].tokens[0].type&&(p.tokens[0].tokens[0].text=j+" "+p.tokens[0].tokens[0].text)):p.tokens.unshift({type:"text",text:j}):m+=j),m+=this.parse(p.tokens,h),s+=this.renderer.listitem(m,g,x);v+=this.renderer.list(s,d,f);continue;case"html":v+=this.renderer.html(u.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(s=u.tokens?this.parseInline(u.tokens):u.text;n+1";return c?Promise.resolve(n):s?void s(null,n):n}if(c)return Promise.reject(e);if(s)return void s(e);throw e});if(null==t)return l(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return l(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if((u=r)&&u.sanitize&&!u.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),r.hooks&&(r.hooks.options=r),i){var a,c,s,u,d,f=r.highlight;try{r.hooks&&(t=r.hooks.preprocess(t)),d=e(t,r)}catch(e){return l(e)}var h=function(e){var t;if(!e)try{r.walkTokens&&Z.walkTokens(d,r.walkTokens),t=n(d,r),r.hooks&&(t=r.hooks.postprocess(t))}catch(n){e=n}return r.highlight=f,e?l(e):i(null,t)};if(!f||f.length<3||(delete r.highlight,!d.length))return h();var p=0;return Z.walkTokens(d,function(e){"code"===e.type&&(p++,setTimeout(function(){f(e.text,e.lang,function(n,t){if(n)return h(n);null!=t&&t!==e.text&&(e.text=t,e.escaped=!0),0==--p&&h()})},0))}),void(0===p&&h())}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(function(n){return e(n,r)}).then(function(e){return r.walkTokens?Promise.all(Z.walkTokens(e,r.walkTokens)).then(function(){return e}):e}).then(function(e){return n(e,r)}).then(function(e){return r.hooks?r.hooks.postprocess(e):e}).catch(l);try{r.hooks&&(t=r.hooks.preprocess(t));var x=e(t,r);r.walkTokens&&Z.walkTokens(x,r.walkTokens);var g=n(x,r);return r.hooks&&(g=r.hooks.postprocess(g)),g}catch(e){return l(e)}}}function Z(e,n,t){return Q(V.lex,G.parse)(e,n,t)}function ee(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t2?t-2:0),i=2;i1?n-1:0),r=1;r1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:ej;if(et&&et(e,null),!eg(n))return e;let r=n.length;for(;r--;){let i=n[r];if("string"==typeof i){let e=t(i);e!==i&&(er(n)||(n[r]=e),i=e)}e[i]=!0}return e}function eT(e){let n=ec(null);for(let r of en(e)){var t=function(e){if(Array.isArray(e))return e}(r)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o,l,a=[],c=!0,s=!1;try{o=(t=t.call(e)).next,!1;for(;!(c=(r=o.call(t)).done)&&(a.push(r.value),2!==a.length);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(s)throw i}}return a}}(r,2)||function(e,n){if(e){if("string"==typeof e)return ee(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ee(e,2):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let i=t[0],o=t[1];eO(e,i)&&(eg(o)?n[i]=function(e){for(let n=0;n/g),eq=ea(/\${[\w\W]*/g),eG=ea(/^data-[\-\w.\u00B7-\uFFFF]+$/),eY=ea(/^aria-[\-\w]+$/),eQ=ea(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eZ=ea(/^(?:\w+script|data):/i),e0=ea(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e1=ea(/^html$/i),e2=ea(/^[a-z][.\w]*(-[.\w]+)+$/i),e8=ea(/<[/\w!]/g),e3=ea(/<[/\w]/g),e5=ea(/<\/no(script|embed|frames)/i),e4=ea(/\/>/i),e6=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(t=n.getAttribute(r));let i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},e7=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},e9=function(e,n,t,r){return eO(e,n)&&eg(e[n])?ez(r.base?eT(r.base):{},e[n],r.transform):t};var ne=function e(){let n,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=n=>e(n);if(i.version="3.4.11",i.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return i.isSupported=!1,i;let o=r.document,l=o,a=l.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,s=r.Node,u=r.Element,d=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let f=r.DOMParser,h=r.trustedTypes,m=u.prototype,p=eN(m,"cloneNode"),x=eN(m,"remove"),g=eN(m,"nextSibling"),j=eN(m,"childNodes"),b=eN(m,"parentNode"),y=eN(m,"shadowRoot"),v=eN(m,"attributes"),w=s&&s.prototype?eN(s.prototype,"nodeType"):null,k=s&&s.prototype?eN(s.prototype,"nodeName"):null;if("function"==typeof c){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let _="",C=!1,I=0,S=function(){if(I>0)throw eB('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},O=function(e){S(),I++;try{return n.createHTML(e)}finally{I--}},A=function(e){S(),I++;try{return n.createScriptURL(e)}finally{I--}},P=o,B=P.implementation,E=P.createNodeIterator,z=P.createDocumentFragment,T=P.getElementsByTagName,N=l.importNode,R=e7();i.isSupported="function"==typeof en&&"function"==typeof b&&B&&void 0!==B.createHTMLDocument;let $=eQ,D=null,M=ez({},[...eR,...e$,...eD,...eL,...eJ]),L=null,K=ez({},[...eX,...eU,...eF,...eV]),J=Object.seal(ec(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,U=null,F=Object.seal(ec(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),V=!0,H=!0,W=!1,q=!0,G=!1,Y=!0,Q=!1,Z=!1,ee=null,et=null,er=!1,ei=!1,eo=!1,es=!1,eu=!0,ed=!1,eE="user-content-",ne=!0,nn=!1,nt={},nr=null,ni=ez({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),no=null,nl=ez({},["audio","video","img","source","image","track"]),na=null,nc=ez({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ns="http://www.w3.org/1998/Math/MathML",nu="http://www.w3.org/2000/svg",nd="http://www.w3.org/1999/xhtml",nf=nd,nh=!1,nm=null,np=ez({},[ns,nu,nd],eb),nx=el(["mi","mo","mn","ms","mtext"]),ng=ez({},nx),nj=el(["annotation-xml"]),nb=ez({},nj),ny=ez({},["title","style","font","a","script"]),nv=null,nw=["application/xhtml+xml","text/html"],nk=null,n_=null,nC=o.createElement("form"),nI=function(e){return e instanceof RegExp||e instanceof Function},nS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n_&&n_===e)return;e&&"object"==typeof e||(e={}),e=eT(e),nk="application/xhtml+xml"===(nv=-1===nw.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?eb:ej,D=e9(e,"ALLOWED_TAGS",M,{transform:nk}),L=e9(e,"ALLOWED_ATTR",K,{transform:nk}),nm=e9(e,"ALLOWED_NAMESPACES",np,{transform:eb}),na=e9(e,"ADD_URI_SAFE_ATTR",nc,{transform:nk,base:nc}),no=e9(e,"ADD_DATA_URI_TAGS",nl,{transform:nk,base:nl}),nr=e9(e,"FORBID_CONTENTS",ni,{transform:nk}),X=e9(e,"FORBID_TAGS",eT({}),{transform:nk}),U=e9(e,"FORBID_ATTR",eT({}),{transform:nk}),nt=!!eO(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?eT(e.USE_PROFILES):e.USE_PROFILES),V=!1!==e.ALLOW_ARIA_ATTR,H=!1!==e.ALLOW_DATA_ATTR,W=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,G=e.SAFE_FOR_TEMPLATES||!1,Y=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ei=e.RETURN_DOM||!1,eo=e.RETURN_DOM_FRAGMENT||!1,es=e.RETURN_TRUSTED_TYPE||!1,er=e.FORCE_BODY||!1,eu=!1!==e.SANITIZE_DOM,ed=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,nn=e.IN_PLACE||!1,$=!function(e){try{return eP(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?eQ:e.ALLOWED_URI_REGEXP,nf="string"==typeof e.NAMESPACE?e.NAMESPACE:nd,ng=eO(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?eT(e.MATHML_TEXT_INTEGRATION_POINTS):ez({},nx),nb=eO(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?eT(e.HTML_INTEGRATION_POINTS):ez({},nj);let r=eO(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?eT(e.CUSTOM_ELEMENT_HANDLING):ec(null);if(J=ec(null),eO(r,"tagNameCheck")&&nI(r.tagNameCheck)&&(J.tagNameCheck=r.tagNameCheck),eO(r,"attributeNameCheck")&&nI(r.attributeNameCheck)&&(J.attributeNameCheck=r.attributeNameCheck),eO(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(J.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),ea(J),G&&(H=!1),eo&&(ei=!0),nt&&(D=ez({},eJ),L=ec(null),!0===nt.html&&(ez(D,eR),ez(L,eX)),!0===nt.svg&&(ez(D,e$),ez(L,eU),ez(L,eV)),!0===nt.svgFilters&&(ez(D,eD),ez(L,eU),ez(L,eV)),!0===nt.mathMl&&(ez(D,eL),ez(L,eF),ez(L,eV))),F.tagCheck=null,F.attributeCheck=null,eO(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?F.tagCheck=e.ADD_TAGS:eg(e.ADD_TAGS)&&(D===M&&(D=eT(D)),ez(D,e.ADD_TAGS,nk))),eO(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?F.attributeCheck=e.ADD_ATTR:eg(e.ADD_ATTR)&&(L===K&&(L=eT(L)),ez(L,e.ADD_ATTR,nk))),eO(e,"ADD_URI_SAFE_ATTR")&&eg(e.ADD_URI_SAFE_ATTR)&&ez(na,e.ADD_URI_SAFE_ATTR,nk),eO(e,"FORBID_CONTENTS")&&eg(e.FORBID_CONTENTS)&&(nr===ni&&(nr=eT(nr)),ez(nr,e.FORBID_CONTENTS,nk)),eO(e,"ADD_FORBID_CONTENTS")&&eg(e.ADD_FORBID_CONTENTS)&&(nr===ni&&(nr=eT(nr)),ez(nr,e.ADD_FORBID_CONTENTS,nk)),ne&&(D["#text"]=!0),Q&&ez(D,["html","head","body"]),D.table&&(ez(D,["tbody"]),delete X.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw eB('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw eB('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let t=n;n=e.TRUSTED_TYPES_POLICY;try{_=O("")}catch(e){throw n=t,e}}else null===e.TRUSTED_TYPES_POLICY?(n=void 0,_=""):(void 0===n&&(C||(t=e6(h,a),C=!0),n=t),n&&"string"==typeof _&&(_=O("")));el&&el(e),n_=e},nO=ez({},[...e$,...eD,...eM]),nA=ez({},[...eL,...eK]),nP=function(e){var n,t,r;let i=b(e);i&&i.tagName||(i={namespaceURI:nf,tagName:"template"});let o=ej(e.tagName),l=ej(i.tagName);return!!nm[e.namespaceURI]&&(e.namespaceURI===nu?(n=i).namespaceURI===nd?"svg"===o:n.namespaceURI===ns?"svg"===o&&("annotation-xml"===l||ng[l]):!!nO[o]:e.namespaceURI===ns?(t=i).namespaceURI===nd?"math"===o:t.namespaceURI===nu?"math"===o&&nb[l]:!!nA[o]:e.namespaceURI===nd?((r=i).namespaceURI!==nu||!!nb[l])&&(r.namespaceURI!==ns||!!ng[l])&&!nA[o]&&(ny[o]||!nO[o]):"application/xhtml+xml"===nv&&!!nm[e.namespaceURI])},nB=function(e){ep(i.removed,{element:e});try{b(e).removeChild(e)}catch(n){if(x(e),!b(e))throw eB("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nE=function(e){let n=j(e);if(n){let e=[];ef(n,n=>{ep(e,n)}),ef(e,e=>{try{x(e)}catch(e){}})}let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(e){}}},nz=function(e,n){try{ep(i.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){ep(i.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e)if(ei||eo)try{nB(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},nT=function(e){let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if("string"==typeof i&&!L[nk(i)])try{e.removeAttribute(i)}catch(e){}}},nN=function(e){let n=[e];for(;n.length>0;){let e=n.pop();(w?w(e):e.nodeType)===1&&nT(e);let t=j(e);if(t)for(let e=t.length-1;e>=0;--e)n.push(t[e])}},nR=function(e){let t=null,r=null;if(er)e=""+e;else{let n=ey(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===nv&&nf===nd&&(e=''+e+"");let i=n?O(e):e;if(nf===nd)try{t=new f().parseFromString(i,nv)}catch(e){}if(!t||!t.documentElement){t=B.createDocument(nf,"template",null);try{t.documentElement.innerHTML=nh?_:i}catch(e){}}let l=t.body||t.documentElement;return(e&&r&&l.insertBefore(o.createTextNode(r),l.childNodes[0]||null),nf===nd)?T.call(t,Q?"html":"body")[0]:Q?t.documentElement:l},n$=function(e){return E.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},nD=function(e){return e=ev(e,eH," "),e=ev(e,eW," "),e=ev(e,eq," ")},nM=function(e){var n;e.normalize();let t=E.call(e.ownerDocument||e,e,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null),r=t.nextNode();for(;r;)r.data=nD(r.data),r=t.nextNode();let i=null==(n=e.querySelectorAll)?void 0:n.call(e,"template");i&&ef(i,e=>{nK(e.content)&&nM(e.content)})},nL=function(e){let n=k?k(e):null;return"string"==typeof n&&"form"===nk(n)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==v(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==w(e)||e.childNodes!==j(e))},nK=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return 11===w(e)}catch(e){return!1}},nJ=function(e){if(!w||"object"!=typeof e||null===e)return!1;try{return"number"==typeof w(e)}catch(e){return!1}};function nX(e,n,t){0!==e.length&&ef(e,e=>{e.call(i,n,t,n_)})}let nU=function(e,n){if(!X[n]&&nW(n)&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,n)||J.tagNameCheck instanceof Function&&J.tagNameCheck(n)))return!1;if(ne&&!nr[n]){let n=b(e),t=j(e);if(t&&n){let r=t.length;for(let i=r-1;i>=0;--i){let r=nn?t[i]:p(t[i],!0);n.insertBefore(r,g(e))}}}return nB(e),!0},nF=function(e){if(nX(R.beforeSanitizeElements,e,null),nL(e))return nB(e),!0;let n=nk(k?k(e):e.nodeName);if(nX(R.uponSanitizeElement,e,{tagName:n,allowedTags:D}),Y&&e.hasChildNodes()&&!nJ(e.firstElementChild)&&eP(e8,e.textContent)&&eP(e8,e.innerHTML)||Y&&e.namespaceURI===nd&&"style"===n&&nJ(e.firstElementChild)||7===e.nodeType||Y&&8===e.nodeType&&eP(e3,e.data)||0)return nB(e),!0;if(X[n]||!(F.tagCheck instanceof Function&&F.tagCheck(n))&&!D[n])return nU(e,n);if((w?w(e):e.nodeType)===1&&!nP(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&eP(e5,e.innerHTML))return nB(e),!0;if(G&&3===e.nodeType){let n=nD(e.textContent);e.textContent!==n&&(ep(i.removed,{element:e.cloneNode()}),e.textContent=n)}return nX(R.afterSanitizeElements,e,null),!1},nV=function(e,n,t){if(U[n]||eu&&("id"===n||"name"===n)&&(t in o||t in nC))return!1;let r=L[n]||F.attributeCheck instanceof Function&&F.attributeCheck(n,e);if(H&&eP(eG,n));else if(V&&eP(eY,n));else if(r){if(na[n]);else if(eP($,ev(t,e0,"")));else if(("src"===n||"xlink:href"===n||"href"===n)&&"script"!==e&&0===ew(t,"data:")&&no[e]);else if(W&&!eP(eZ,ev(t,e0,"")));else if(t)return!1}else if(!(nW(e)&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,e)||J.tagNameCheck instanceof Function&&J.tagNameCheck(e))&&(J.attributeNameCheck instanceof RegExp&&eP(J.attributeNameCheck,n)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(n,e))||"is"===n&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&eP(J.tagNameCheck,t)||J.tagNameCheck instanceof Function&&J.tagNameCheck(t))))return!1;return!0},nH=ez({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),nW=function(e){return!nH[ej(e)]&&eP(e2,e)},nq=function(e,t,r,i){if(n&&"object"==typeof h&&"function"==typeof h.getAttributeType&&!r)switch(h.getAttributeType(e,t)){case"TrustedHTML":return O(i);case"TrustedScriptURL":return A(i)}return i},nG=function(e,n,t,r){try{t?e.setAttributeNS(t,n,r):e.setAttribute(n,r),nL(e)?nB(e):em(i.removed)}catch(t){nz(n,e)}},nY=function(e){nX(R.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||nL(e))return;let t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0},r=n.length,i=nk(e.nodeName);for(;r--;){let o=n[r],l=o.name,a=o.namespaceURI,c=o.value,s=nk(l),u="value"===l?c:ek(c);if(t.attrName=s,t.attrValue=u,t.keepAttr=!0,t.forceKeepAttr=void 0,nX(R.uponSanitizeAttribute,e,t),u=t.attrValue,ed&&("id"===s||"name"===s)&&0!==ew(u,eE)&&(nz(l,e),u=eE+u),Y&&eP(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)||"attributename"===s&&ey(u,"href")){nz(l,e);continue}if(!t.forceKeepAttr){if(!t.keepAttr||!q&&eP(e4,u)||(G&&(u=nD(u)),!nV(i,s,u))){nz(l,e);continue}(u=nq(i,s,a,u))!==c&&nG(e,l,a,u)}}nX(R.afterSanitizeAttributes,e,null)},nQ=function(e){let n=null,t=n$(e);for(nX(R.beforeSanitizeShadowDOM,e,null);n=t.nextNode();)if(nX(R.uponSanitizeShadowNode,n,null),nF(n),nY(n),nK(n.content)&&nQ(n.content),(w?w(n):n.nodeType)===1){let e=y(n);nK(e)&&(nZ(e),nQ(e))}nX(R.afterSanitizeShadowDOM,e,null)},nZ=function(e){let n=[{node:e,shadow:null}];for(;n.length>0;){let e=n.pop();if(e.shadow){nQ(e.shadow);continue}let t=e.node,r=(w?w(t):t.nodeType)===1,i=j(t);if(i)for(let e=i.length-1;e>=0;--e)n.push({node:i[e],shadow:null});if(r){let e=k?k(t):null;if("string"==typeof e&&"template"===nk(e)){let e=t.content;nK(e)&&n.push({node:e,shadow:null})}}if(r){let e=y(t);nK(e)&&n.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,a=null,c=null;if((nh=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nJ(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return e_(e);case"boolean":return eC(e);case"bigint":return eI?eI(e):"0";case"symbol":return eS?eS(e):"Symbol()";case"undefined":default:return eA(e);case"function":case"object":{if(null===e)return eA(e);let n=eN(e,"toString");if("function"==typeof n){let t=n(e);return"string"==typeof t?t:eA(t)}return eA(e)}}}(e)))throw eB("dirty is not a string, aborting");if(!i.isSupported)return e;Z?(D=ee,L=et):nS(t),(R.uponSanitizeElement.length>0||R.uponSanitizeAttribute.length>0)&&(D=eT(D)),R.uponSanitizeAttribute.length>0&&(L=eT(L)),i.removed=[];let s=nn&&"string"!=typeof e&&nJ(e);if(s){let n=k?k(e):e.nodeName;if("string"==typeof n){let e=nk(n);if(!D[e]||X[e])throw eB("root node is forbidden and cannot be sanitized in-place")}if(nL(e))throw eB("root node is clobbered and cannot be sanitized in-place");try{nZ(e)}catch(n){throw nE(e),n}}else if(nJ(e))1===(o=(r=nR("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o),nZ(o);else{if(!ei&&!G&&!Q&&-1===e.indexOf("<"))return n&&es?O(e):e;if(!(r=nR(e)))return ei?null:es?_:""}r&&er&&nB(r.firstChild);let u=n$(s?e:r);try{for(;a=u.nextNode();)nF(a),nY(a),nK(a.content)&&nQ(a.content)}catch(n){throw s&&nE(e),n}if(s)return ef(i.removed,e=>{e.element&&nN(e.element)}),G&&nM(e),e;if(ei){if(G&&nM(r),eo)for(c=z.call(r.ownerDocument);r.firstChild;)c.appendChild(r.firstChild);else c=r;return(L.shadowroot||L.shadowrootmode)&&(c=N.call(l,c,!0)),c}let d=Q?r.outerHTML:r.innerHTML;return Q&&D["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&eP(e1,r.ownerDocument.doctype.name)&&(d="\n"+d),G&&(d=nD(d)),n&&es?O(d):d},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nS(e),Z=!0,ee=D,et=L},i.clearConfig=function(){n_=null,Z=!1,ee=null,et=null,n=t,_=""},i.isValidAttribute=function(e,n,t){return n_||nS({}),nV(nk(e),nk(n),t)},i.addHook=function(e,n){"function"!=typeof n||eO(R,e)&&ep(R[e],n)},i.removeHook=function(e,n){if(eO(R,e)){if(void 0!==n){let t=eh(R[e],n);return -1===t?void 0:ex(R[e],t,1)[0]}return em(R[e])}},i.removeHooks=function(e){eO(R,e)&&(R[e]=[])},i.removeAllHooks=function(){R=e7()},i}(),nn=["b","blockquote","br","center","code","dd","del","div","dl","dt","em","font","h1","h2","h3","h4","h5","h6","hr","i","ins","li","menu","ol","p","pre","span","strong","table","tbody","td","th","thead","tfoot","tr","u","ul"],nt=["img"],nr=["class","style","background"];function ni(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&(0,i.jsx)(a.BJ.Item,{children:(0,i.jsx)(a.wn,{fill:!0,title:"Page ".concat(s+1,"/").concat(t.length),textAlign:"center",children:(0,i.jsxs)(a.BJ,{children:[(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Previous",fontSize:"150%",icon:"arrow-left",lineHeight:2,disabled:s<=0,onClick:function(){return u(s-1)}})}),(0,i.jsx)(a.BJ.Item,{grow:!0,basis:0,children:(0,i.jsx)(a.$n,{fluid:!0,content:"Next",fontSize:"150%",icon:"arrow-right",lineHeight:2,disabled:s>=t.length-1,onClick:function(){return u(s+1)}})})]})})}),(0,i.jsxs)(a.BJ.Item,{children:[(0,i.jsx)("h1",{children:d.title&&d.title}),(0,i.jsx)("div",{className:"LoreConsole__entryText",dangerouslySetInnerHTML:{__html:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nn,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nr,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:nt;return n&&(t=t.concat(i)),ne.sanitize(e,{ALLOWED_TAGS:t,FORBID_ATTR:r})}(Z(d.body,{breaks:!0,smartypants:!0,smartLists:!0,baseUrl:"thisshouldbreakhttp"}))}})]})]})})}},5531:function(e,n,t){"use strict";t.r(n),t.d(n,{MODsuit:()=>_,MODsuitContent:()=>k});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&e.cooldown/10||"0","/",e.cooldown_time/10,"s"]}),(0,r.jsxs)(o.XI.Cell,{textAlign:"center",children:[(0,r.jsx)(o.$n,{onClick:function(){return t("select",{ref:e.ref})},icon:"bullseye",selected:e.module_active,tooltip:j(e.module_type),tooltipPosition:"left",disabled:!e.module_type}),(0,r.jsx)(o.$n,{onClick:function(){return h(e.ref)},icon:"cog",selected:f===e.ref,tooltip:"Configure",tooltipPosition:"left",disabled:0===Object.keys(e.configuration_data).length}),(0,r.jsx)(o.$n,{onClick:function(){return t("pin",{ref:e.ref})},icon:"thumbtack",selected:e.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!e.module_type})]})]})]}),(0,r.jsx)(o.az,{children:e.description})]})})},e.ref)})||(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{textAlign:"center",children:"No Modules Detected"})})})})},k=function(){var e=(0,l.Oc)().data.interface_break;return(0,r.jsx)(o.wn,{fill:!0,scrollable:!e,children:!!e&&(0,r.jsx)(p,{})||(0,r.jsxs)(o.BJ,{vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(b,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(y,{})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(v,{})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(w,{})})]})})},_=function(){var e=(0,l.Oc)().data.ui_theme;return(0,r.jsx)(a.p8,{theme:e,width:400,height:620,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(k,{})})})})}},5247:function(e,n,t){"use strict";t.r(n),t.d(n,{MagnetController:()=>d});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=new Set(["metal","glass"]),c=function(){return(0,r.jsx)(l.p8,{width:300,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s,{})})})},s=function(){return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metals",children:(0,r.jsxs)(i.XI,{className:"materials-table",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{header:!0,pl:"0.5rem",py:"0.5rem",children:"Material"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Sheets"}),(0,r.jsx)(u,{})]}),(0,r.jsx)(d,{})]})})},u=function(){if((0,o.Oc)().data.showPoints)return(0,r.jsx)(i.XI.Cell,{header:!0,children:"Points"})},d=function(){return(0,o.Oc)().data.materials.filter(function(e){return e.amount>=1||a.has(e.id)}).map(function(e){return(0,r.jsx)(f,{material:e},e.id)})},f=function(e){var n=e.material,t=n.id,l=n.amount,a=(0,o.Oc)().data,c=a.icon,s=a.showPoints,u=a.staticMaterials[t],d=u.iconState,f=u.name,h=u.points;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsxs)(i.XI.Cell,{children:[d?(0,r.jsx)(i.Hg,{icon:c,icon_state:d,verticalAlign:"middle"}):(0,r.jsx)(i.In,{name:"sheet-plastic",verticalAlign:"middle"}),null!=f?f:t]}),(0,r.jsx)(i.XI.Cell,{color:l>=1?"good":"gray",children:l}),!!s&&h&&(0,r.jsx)(i.XI.Cell,{children:h})]})}},2433:function(e,n,t){"use strict";t.r(n),t.d(n,{MechBayConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.recharge_port,c=a&&a.mech,s=c&&c.cell,u=c&&c.name;return(0,r.jsx)(l.p8,{width:400,height:155,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Sync",onClick:function(){return t("reconnect")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||(0,r.jsx)(i.z2,{value:c.health/c.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:!a&&(0,r.jsx)(i.IC,{children:"No power port detected. Please re-sync."})||!c&&(0,r.jsx)(i.IC,{children:"No mech detected."})||!s&&(0,r.jsx)(i.IC,{children:"No cell is installed."})||(0,r.jsxs)(i.z2,{value:s.charge/s.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,r.jsx)(i.zv,{value:s.charge})," / "+s.maxcharge]})})]})})})})}},3763:function(e,n,t){"use strict";t.r(n),t.d(n,{MechaControlConsole:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.beacons,u=c.stored_data;return u.length?(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Log",buttons:(0,r.jsx)(i.$n,{icon:"window-close",onClick:function(){return t("clear_log")}}),children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{color:"label",children:["(",e.time,")"]}),(0,r.jsx)(i.az,{children:(0,o.jT)(e.message)})]},e.time)})})})}):(0,r.jsx)(a.p8,{width:420,height:500,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:s.length&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"comment",onClick:function(){return t("send_message",{mt:e.uid})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"eye",onClick:function(){return t("get_log",{mt:e.uid})},children:"View Log"}),(0,r.jsx)(i.$n.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){return t("shock",{mt:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{ranges:{good:[.75*e.maxHealth,1/0],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-1/0,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:e.cell&&(0,r.jsx)(i.z2,{ranges:{good:[.75*e.cellMaxCharge,1/0],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-1/0,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,r.jsx)(i.IC,{children:"No Cell Installed"})}),(0,r.jsxs)(i.Ki.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,r.jsx)(i.Ki.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,o.Sn)(e.location)||"Unknown"}),(0,r.jsx)(i.Ki.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,r.jsx)(i.Ki.Item,{label:"Cargo Space",children:(0,r.jsx)(i.z2,{ranges:{bad:[.75*e.cargoMax,1/0],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-1/0,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)})||(0,r.jsx)(i.IC,{children:"No mecha beacons found."})})})}},9548:function(e,n,t){"use strict";t.r(n),t.d(n,{MedicalRecords:()=>b});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4900),s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=e.product,c=e.productImage,s=e.productCategory,u=i.user_money;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"32px",margin:"0px"}})}),(0,r.jsx)(o.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(o.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(o.$n,{disabled:a.price>u,icon:"shopping-cart",content:a.price,textAlign:"left",onClick:function(){return t("purchase",{name:a.name,category:s})}})})]})},u=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default).tabIndex,a=n.products,u=n.imagelist,d=["apparel","toy","decoration"];return(0,r.jsx)(o.XI,{children:a[d[t]].map(function(e){return(0,r.jsx)(s,{product:e,productImage:u[e.path],productCategory:d[t]},e.name)})})},d=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,s=i.user_cash,d=i.inserted_cash;return(0,r.jsx)(a.p8,{title:"Merch Computer",width:450,height:600,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.wn,{title:"User",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,r.jsx)("b",{children:d})," credits inserted."]}),(0,r.jsx)(o.$n,{disabled:!d,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){return t("change")}})]}),children:(0,r.jsxs)(o.BJ.Item,{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!==s&&(0,r.jsxs)(o.az,{mt:"0.5rem",children:["Your balance is ",(0,r.jsxs)("b",{children:[s||0," credits"]}),"."]})]})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsxs)(c.default.Default,{tabIndex:1,children:[(0,r.jsx)(f,{}),(0,r.jsx)(u,{})]})})})]})})})},f=function(e){var n=(0,l.Oc)().data,t=(0,i.useContext)(c.default),a=t.tabIndex,s=t.setTabIndex;return n.login_state,(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{icon:"dice",selected:1===a,onClick:function(){return s(1)},children:"Toys"}),(0,r.jsx)(o.tU.Tab,{icon:"flag",selected:2===a,onClick:function(){return s(2)},children:"Decorations"})]})}},6231:function(e,n,t){"use strict";t.r(n),t.d(n,{MiningVendor:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e[1].price,e[1]}).sort(d[h]);if(0!==t.length)return m&&(t=t.reverse()),g=!0,(0,r.jsx)(x,{title:e[0],items:t,gridLayout:u},e[0])});return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:g?j:(0,r.jsx)(o.az,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e){var n=e.gridLayout,t=e.setGridLayout,i=e.setSearchText,l=e.sortOrder,a=e.setSortOrder,c=e.descending,s=e.setDescending;return(0,r.jsx)(o.az,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{fluid:!0,mt:.2,placeholder:"Search by item name..",onChange:function(e){return i(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:n?"list":"table-cells-large",height:1.75,tooltip:n?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){return t(!n)}})}),(0,r.jsx)(o.BJ.Item,{basis:"30%",children:(0,r.jsx)(o.ms,{selected:l,options:Object.keys(d),width:"100%",onSelected:function(e){return a(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{icon:c?"arrow-down":"arrow-up",height:1.75,tooltip:c?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){return s(!c)}})})]})})},x=function(e){var n,t,i=(0,a.Oc)(),l=i.act,c=i.data,s=e.title,u=e.items,d=e.gridLayout,f=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["title","items","gridLayout"]);return(0,r.jsx)(o.Nt,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.gamestatus,s=a.cand_name,u=a.cand_birth,d=a.cand_age,f=a.cand_species,h=a.cand_planet,m=a.cand_job,p=a.cand_records,x=a.cand_curriculum,g=a.total_curriculums,j=a.reason;return 0===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{pt:"45%",fontSize:"31px",color:"white",textAlign:"center",bold:!0,children:"Nanotrasen Recruiter Simulator"}),(0,r.jsx)(i.BJ.Item,{pt:"1%",fontSize:"16px",textAlign:"center",color:"label",children:"Work as the Nanotrasen recruiter and avoid hiring incompetent employees!"})]})}),(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"play",color:"green",content:"Begin Shift",onClick:function(){return t("start_game")}}),(0,r.jsx)(i.$n,{textAlign:"center",lineHeight:2,fluid:!0,icon:"info",color:"blue",content:"Guide",onClick:function(){return t("instructions")}})]})]})})}):1===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.wn,{fill:!0,color:"grey",title:"Guide",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"1#",color:"silver",children:["To win this game you must hire/dismiss ",(0,r.jsx)("b",{children:g})," candidates, one wrongly made choice leads to a game over."]}),(0,r.jsx)(i.Ki.Item,{label:"2#",color:"silver",children:"Make the right choice by truly putting yourself into the skin of a recruiter working for Nanotrasen!"}),(0,r.jsxs)(i.Ki.Item,{label:"3#",color:"silver",children:[(0,r.jsx)("b",{children:"Unique"})," characters may appear, pay attention to them!"]}),(0,r.jsx)(i.Ki.Item,{label:"4#",color:"silver",children:"Make sure to pay attention to details like age, planet names, the requested job and even the species of the candidate!"}),(0,r.jsxs)(i.Ki.Item,{label:"5#",color:"silver",children:["Not every employment record is good, remember to make your choice based on the ",(0,r.jsx)("b",{children:"company morals"}),"!"]}),(0,r.jsx)(i.Ki.Item,{label:"6#",color:"silver",children:"The planet of origin has no restriction on the species of the candidate, don't think too much when you see humans that came from Boron!"}),(0,r.jsxs)(i.Ki.Item,{label:"7#",color:"silver",children:["Pay attention to ",(0,r.jsx)("b",{children:"typos"})," and ",(0,r.jsx)("b",{children:"missing words"}),", these do make for bad applications!"]}),(0,r.jsxs)(i.Ki.Item,{label:"8#",color:"silver",children:["Remember, you are recruiting people to work at one of the many NT stations, so no hiring for"," ",(0,r.jsx)("b",{children:"jobs"})," that they ",(0,r.jsx)("b",{children:"don't offer"}),"!"]}),(0,r.jsxs)(i.Ki.Item,{label:"9#",color:"silver",children:["Keep your eyes open for incompatible ",(0,r.jsx)("b",{children:"naming schemes"}),", no company wants a Vox named Joe!"]}),(0,r.jsxs)(i.Ki.Item,{label:"10#",color:"silver",children:["For some unknown reason ",(0,r.jsx)("b",{children:"clowns"})," are never denied by the company, no matter what."]})]})})})})}):2===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,color:"label",fontSize:"14px",title:"Employment Applications",children:[(0,r.jsxs)(i.az,{fontSize:"24px",textAlign:"center",color:"silver",bold:!0,children:["Candidate Number #",x]}),(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",color:"silver",children:(0,r.jsx)("b",{children:s})}),(0,r.jsx)(i.Ki.Item,{label:"Species",color:"silver",children:(0,r.jsx)("b",{children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Age",color:"silver",children:(0,r.jsx)("b",{children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Date of Birth",color:"silver",children:(0,r.jsx)("b",{children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Planet of Origin",color:"silver",children:(0,r.jsx)("b",{children:h})}),(0,r.jsx)(i.Ki.Item,{label:"Requested Job",color:"silver",children:(0,r.jsx)("b",{children:m})}),(0,r.jsx)(i.Ki.Item,{label:"Employment Records",color:"silver",children:(0,r.jsx)("b",{children:p})})]})]})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{fill:!0,title:"Stamp the application!",color:"grey",textAlign:"center",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"red",content:"Dismiss",fontSize:"150%",icon:"ban",lineHeight:4.5,onClick:function(){return t("dismiss")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"green",content:"Hire",fontSize:"150%",icon:"arrow-circle-up",lineHeight:4.5,onClick:function(){return t("hire")}})})]})})})]})})}):3===c?(0,r.jsx)(l.p8,{width:400,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{pt:"40%",fill:!0,children:[(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontSize:"50px",textAlign:"center",children:"Game Over"}),(0,r.jsx)(i.BJ.Item,{fontSize:"15px",color:"label",textAlign:"center",children:j}),(0,r.jsxs)(i.BJ.Item,{color:"blue",fontSize:"20px",textAlign:"center",pt:"10px",children:["FINAL SCORE: ",x-1,"/",g]})]})}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{lineHeight:4,fluid:!0,icon:"arrow-left",content:"Main Menu",onClick:function(){return t("back_to_menu")}})})]})})}):void 0}},452:function(e,n,t){"use strict";t.r(n),t.d(n,{Newscaster:()=>v});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(2864),c=t(421),s=t(3384),u=t(4744),d=t(7482);function f(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var o=[],l=!0,a=!1;try{for(i=i.call(e);!(l=(t=i.next()).done)&&(o.push(t.value),!n||o.length!==n);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==i.return||i.return()}finally{if(a)throw r}}return o}}(e,n)||g(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,n){if(e){if("string"==typeof e)return f(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,n)}}var j=["security","engineering","medical","science","service","supply"],b={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"}},y=(0,i.createContext)(null),v=function(e){var n,t=(0,a.Oc)(),c=t.act,f=t.data,h=f.is_security,m=f.is_admin,p=f.is_silent,g=f.is_printing,j=f.screen,b=f.channels,v=f.channel_idx,C=void 0===v?-1:v,I=x((0,i.useState)(!1),2),O=I[0],A=I[1],P=x((0,i.useState)(""),2),B=P[0],E=P[1],z=x((0,i.useState)(!1),2),T=z[0],N=z[1],R=x((0,i.useState)([]),2),$=R[0],D=R[1];0===j||2===j?n=(0,r.jsx)(k,{}):1===j&&(n=(0,r.jsx)(_,{}));var M=b.reduce(function(e,n){return e+n.unread},0);return(0,r.jsxs)(s.p8,{theme:h&&"security",width:800,height:600,children:[(0,r.jsx)(y.Provider,{value:{viewingPhoto:B,setViewingPhoto:E},children:B?(0,r.jsx)(S,{}):(0,r.jsx)(u.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"})}),(0,r.jsx)(s.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.wn,{fill:!0,className:(0,l.Ly)(["Newscaster__menu",O&&"Newscaster__menu--open"]),children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(w,{icon:"bars",title:"Toggle Menu",onClick:function(){return A(!O)}}),(0,r.jsx)(w,{icon:"newspaper",title:"Headlines",selected:0===j,onClick:function(){return c("headlines")},children:M>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:M>=10?"9+":M})}),(0,r.jsx)(w,{icon:"briefcase",title:"Job Openings",selected:1===j,onClick:function(){return c("jobs")}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:b.map(function(e){return(0,r.jsx)(w,{icon:e.icon,title:e.name,selected:2===j&&b[C-1]===e,onClick:function(){return c("channel",{uid:e.uid})},children:e.unread>0&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)})}),(0,r.jsxs)(o.BJ.Item,{children:[(0,r.jsx)(o.cG,{}),(!!h||!!m)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("wanted_notice")}}),(0,r.jsx)(w,{security:!0,icon:T?"minus-square":"minus-square-o",title:"Censor Mode: "+(T?"On":"Off"),mb:"0.5rem",onClick:function(){return N(!T)}}),(0,r.jsx)(o.cG,{})]}),(0,r.jsx)(w,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,u.modalOpen)("create_story")}}),(0,r.jsx)(w,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,u.modalOpen)("create_channel")}}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(w,{icon:g?"spinner":"print",iconSpin:g,title:g?"Printing...":"Print Newspaper",onClick:function(){return c("print_newspaper")}}),(0,r.jsx)(w,{icon:p?"volume-mute":"volume-up",title:"Mute: "+(p?"On":"Off"),onClick:function(){return c("toggle_mute")}})]})]})}),(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,width:"100%",children:[(0,r.jsx)(d.TemporaryNotice,{}),(0,r.jsx)(y.Provider,{value:{viewingPhoto:B,setViewingPhoto:E,censorMode:T,fullStories:$,setFullStories:D},children:n})]})]})})]})},w=function(e){(0,a.Oc)().act;var n=e.icon,t=e.iconSpin,i=e.selected,c=void 0!==i&&i,s=e.security,u=e.onClick,d=e.title,f=e.children,x=p(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,r.jsxs)(o.BJ,m(h({align:"center",className:(0,l.Ly)(["Newscaster__menuButton",c&&"Newscaster__menuButton--selected",void 0!==s&&s&&"Newscaster__menuButton--security"]),onClick:u},x),{children:[(0,r.jsxs)(o.BJ.Item,{children:[c&&(0,r.jsx)(o.az,{className:"Newscaster__menuButton--selectedBar"}),(0,r.jsx)(o.In,{name:void 0===n?"":n,spin:t,size:"2"})]}),(0,r.jsx)(o.BJ.Item,{className:"Newscaster__menuButton--title",children:d}),f]}))},k=function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.screen,s=l.is_admin,d=l.channel_idx,f=l.channel_can_manage,p=l.channels,x=l.stories,g=l.wanted,j=(0,i.useContext)(y),b=j.fullStories,v=j.censorMode,w=2===c&&d>-1?p[d-1]:null;return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!g&&(0,r.jsx)(C,{story:g,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:w?w.icon:"newspaper",mr:"0.5rem"}),w?w.name:"Headlines"]}),children:x.length>0?x.slice().reverse().map(function(e){return!b.includes(e.uid)&&e.body.length+3>128?m(h({},e),{body_short:e.body.substr(0,124)+"..."}):e}).map(function(e,n){return(0,r.jsx)(C,{story:e},n)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no stories at this time."]})}),!!w&&(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,height:"40%",title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"info-circle",mr:"0.5rem"}),"About"]}),buttons:(0,r.jsxs)(r.Fragment,{children:[v&&(0,r.jsx)(o.$n,{disabled:!!w.admin&&!s,selected:w.censored,icon:w.censored?"comment-slash":"comment",content:w.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return t("censor_channel",{uid:w.uid})}}),(0,r.jsx)(o.$n,{disabled:!f,icon:"cog",content:"Manage",onClick:function(){return(0,u.modalOpen)("manage_channel",{uid:w.uid})}})]}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:w.description||"N/A"}),(0,r.jsx)(o.Ki.Item,{label:"Owner",children:w.author||"N/A"}),!!s&&(0,r.jsx)(o.Ki.Item,{label:"Ckey",children:w.author_ckey}),(0,r.jsx)(o.Ki.Item,{label:"Public",children:w.public?"Yes":"No"}),(0,r.jsxs)(o.Ki.Item,{label:"Total Views",children:[(0,r.jsx)(o.In,{name:"eye",mr:"0.5rem"}),x.reduce(function(e,n){return e+n.view_count},0).toLocaleString()]})]})})]})},_=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),i=t.jobs,c=t.wanted,s=Object.entries(i).reduce(function(e,n){var t=x(n,2);return e+(t[0],t[1]).length},0);return(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(C,{story:c,wanted:!0}),(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,m:0,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"briefcase",mr:"0.5rem"}),"Job Openings"]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:s>0?j.map(function(e){return Object.assign({},b[e],{id:e,jobs:i[e]})}).filter(function(e){return!!e&&e.jobs.length>0}).map(function(e){return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,r.jsx)(o.az,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map(function(e){return(0,r.jsxs)(o.az,{class:(0,l.Ly)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["• ",e.title]},e.title)})},e.id)}):(0,r.jsxs)(o.az,{className:"Newscaster__emptyNotice",children:[(0,r.jsx)(o.In,{name:"times",size:"3"}),(0,r.jsx)("br",{}),"There are no openings at this time."]})}),(0,r.jsxs)(o.wn,{height:"17%",children:["Interested in serving Nanotrasen?",(0,r.jsx)("br",{}),"Sign up for any of the above position now at the ",(0,r.jsx)("b",{children:"Head of Personnel's Office!"}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{as:"small",color:"label",children:"By accepting employment at Nanotrasen or any of its installations, you additionally agree to the terms and conditions provided by the company, including Standard Operating Procedure and Space Law."})]})]})},C=function(e){var n=(0,a.Oc)(),t=n.act,s=n.data,u=e.story,d=e.wanted,h=void 0!==d&&d,m=s.is_admin,p=(0,i.useContext)(y),x=p.fullStories,j=p.setFullStories,b=p.censorMode;return(0,r.jsx)(o.wn,{className:(0,l.Ly)(["Newscaster__story",h&&"Newscaster__story--wanted"]),title:(0,r.jsxs)(r.Fragment,{children:[h&&(0,r.jsx)(o.In,{name:"exclamation-circle",mr:"0.5rem"}),2&u.censor_flags&&"[REDACTED]"||u.title||"News from "+u.author]}),buttons:(0,r.jsx)(o.az,{mt:"0.25rem",children:(0,r.jsxs)(o.az,{color:"label",children:[!h&&b&&(0,r.jsx)(o.az,{inline:!0,children:(0,r.jsx)(o.$n,{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 t("censor_story",{uid:u.uid})}})}),(0,r.jsxs)(o.az,{inline:!0,children:[(0,r.jsx)(o.In,{name:"user"})," ",u.author," |\xa0",!!m&&(0,r.jsxs)(r.Fragment,{children:["ckey: ",u.author_ckey," |\xa0"]}),!h&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.In,{name:"eye"})," ",u.view_count.toLocaleString()," |\xa0"]}),(0,r.jsx)(o.In,{name:"clock"})," ",(0,c.fF)(u.publish_time,s.world_time)]})]})}),children:(0,r.jsx)(o.az,{children:2&u.censor_flags?"[REDACTED]":(0,r.jsxs)(r.Fragment,{children:[!!u.has_photo&&(0,r.jsx)(I,{name:"story_photo_"+u.uid+".png",style:{float:"right"},ml:"0.5rem"}),(u.body_short||u.body).split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),u.body_short&&(0,r.jsx)(o.$n,{content:"Read more..",mt:"0.5rem",onClick:function(){return j(((function(e){if(Array.isArray(e))return f(e)})(x)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(x)||g(x)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([u.uid]))}}),(0,r.jsx)(o.az,{clear:"right"})]})})})},I=function(e){var n=e.name,t=p(e,["name"]),l=(0,i.useContext)(y).setViewingPhoto;return(0,r.jsx)(o.az,h({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},t))},S=function(e){var n=(0,i.useContext)(y),t=n.viewingPhoto,l=n.setViewingPhoto;return(0,r.jsxs)(o.aF,{className:"Newscaster__photoZoom",children:[(0,r.jsx)(o.az,{as:"img",src:t}),(0,r.jsx)(o.$n,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return l("")}})]})},O=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),l=!!e.args.uid&&t.channels.filter(function(n){return n.uid===e.args.uid}).pop();if("manage_channel"===e.id&&!l)return void(0,u.modalClose)();var c="manage_channel"===e.id,s=!!e.args.is_admin,d=e.args.scanned_user,f=x((0,i.useState)((null==l?void 0:l.author)||d||"Unknown"),2),h=f[0],m=f[1],p=x((0,i.useState)((null==l?void 0:l.name)||""),2),g=p[0],j=p[1],b=x((0,i.useState)((null==l?void 0:l.description)||""),2),y=b[0],v=b[1],w=x((0,i.useState)((null==l?void 0:l.icon)||"newspaper"),2),k=w[0],_=w[1],C=x((0,i.useState)(!!c&&!!(null==l?void 0:l.public)),2),I=C[0],S=C[1],O=x((0,i.useState)((null==l?void 0:l.admin)===1),2),A=O[0],P=O[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:c?"Manage "+l.name:"Create New Channel",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Owner",children:(0,r.jsx)(o.pd,{disabled:!s,width:"100%",value:h,onChange:function(e){return m(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:g,onChange:function(e){return j(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:y,onChange:function(e){return v(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Icon",children:[(0,r.jsx)(o.pd,{disabled:!s,value:k,width:"35%",mr:"0.5rem",onChange:function(e){return _(e)}}),(0,r.jsx)(o.In,{name:k,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,r.jsx)(o.Ki.Item,{label:"Accept Public Stories?",children:(0,r.jsx)(o.$n,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"Yes":"No",onClick:function(){return S(!I)}})}),s&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return P(!A)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===h.trim().length||0===g.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:h,name:g.substr(0,49),description:y.substr(0,128),icon:k,public:+!!I,admin_locked:+!!A})}})]})};(0,u.modalRegisterBodyOverride)("create_channel",O),(0,u.modalRegisterBodyOverride)("manage_channel",O),(0,u.modalRegisterBodyOverride)("create_story",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.channels,d=l.channel_idx,f=void 0===d?-1:d,h=!!e.args.is_admin,m=e.args.scanned_user,p=s.slice().sort(function(e,n){if(f<0)return 0;var t=s[f-1];return t.uid===e.uid?-1:t.uid===n.uid?1:void 0}).filter(function(e){return h||!e.frozen&&(e.author===m||!!e.public)}),g=x((0,i.useState)(m||"Unknown"),2),j=g[0],b=g[1],y=x((0,i.useState)(p.length>0?p[0].name:""),2),v=y[0],w=y[1],k=x((0,i.useState)(""),2),_=k[0],C=k[1],S=x((0,i.useState)(""),2),O=S[0],A=S[1],P=x((0,i.useState)(!1),2),B=P[0],E=P[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Author",children:(0,r.jsx)(o.pd,{disabled:!h,width:"100%",value:j,onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Channel",verticalAlign:"top",children:(0,r.jsx)(o.ms,{selected:v,options:p.map(function(e){return e.name}),mb:"0",width:"100%",onSelected:function(e){return w(e)}})}),(0,r.jsx)(o.Ki.Divider,{}),(0,r.jsx)(o.Ki.Item,{label:"Title",children:(0,r.jsx)(o.pd,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:_,onChange:function(e){return C(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Story Text",verticalAlign:"top",children:(0,r.jsx)(o.pd,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:O,onChange:function(e){return A(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return t(c?"eject_photo":"attach_photo")}})}),(0,r.jsx)(o.Ki.Item,{label:"Preview",verticalAlign:"top",children:(0,r.jsx)(o.wn,{noTopPadding:!0,title:_,maxHeight:"13.5rem",overflow:"auto",children:(0,r.jsxs)(o.az,{mt:"0.5rem",children:[!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}}),O.split("\n").map(function(e,n){return(0,r.jsx)(o.az,{children:e||(0,r.jsx)("br",{})},n)}),(0,r.jsx)(o.az,{clear:"right"})]})})}),h&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:B,icon:B?"lock":"lock-open",content:B?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return E(!B)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:0===j.trim().length||0===v.trim().length||0===_.trim().length||0===O.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)("create_story","",{author:j,channel:v,title:_.substr(0,127),body:O.substr(0,1023),admin_locked:+!!B})}})]})}),(0,u.modalRegisterBodyOverride)("wanted_notice",function(e){var n=(0,a.Oc)(),t=n.act,l=n.data,c=l.photo,s=l.wanted,d=!!e.args.is_admin,f=e.args.scanned_user,h=x((0,i.useState)((null==s?void 0:s.author)||f||"Unknown"),2),m=h[0],p=h[1],g=x((0,i.useState)((null==s?void 0:s.title.substr(8))||""),2),j=g[0],b=g[1],y=x((0,i.useState)((null==s?void 0:s.body)||""),2),v=y[0],w=y[1],k=x((0,i.useState)((null==s?void 0:s.admin_locked)===1),2),_=k[0],C=k[1];return(0,r.jsxs)(o.wn,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,r.jsx)(o.az,{mx:"0.5rem",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Authority",children:(0,r.jsx)(o.pd,{disabled:!d,width:"100%",value:m,onChange:function(e){return p(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Name",children:(0,r.jsx)(o.pd,{width:"100%",value:j,maxLength:"128",onChange:function(e){return b(e)}})}),(0,r.jsx)(o.Ki.Item,{label:"Description",verticalAlign:"top",children:(0,r.jsx)(o.pd,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onChange:function(e){return w(e)}})}),(0,r.jsxs)(o.Ki.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,r.jsx)(o.$n,{icon:"image",selected:c,content:c?"Eject: "+c.name:"Insert Photo",tooltip:!c&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return t(c?"eject_photo":"attach_photo")}}),!!c&&(0,r.jsx)(I,{name:"inserted_photo_"+c.uid+".png",style:{float:"right"}})]}),d&&(0,r.jsx)(o.Ki.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,r.jsx)(o.$n,{selected:_,icon:_?"lock":"lock-open",content:_?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return C(!_)}})})]})}),(0,r.jsx)(o.$n.Confirm,{disabled:!s,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){t("clear_wanted_notice"),(0,u.modalClose)()}}),(0,r.jsx)(o.$n.Confirm,{disabled:0===m.trim().length||0===j.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,u.modalAnswer)(e.id,"",{author:m,name:j.substr(0,127),description:v.substr(0,511),admin_locked:+!!_})}})]})})},6563:function(e,n,t){"use strict";t.r(n),t.d(n,{Noticeboard:()=>c});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.papers;return(0,r.jsx)(a.p8,{width:600,height:300,theme:"noticeboard",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,children:c.map(function(e){return(0,r.jsx)(i.BJ.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){return t("interact",{paper:e.ref})},onContextMenu:function(n){n.preventDefault(),t("showFull",{paper:e.ref})},children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,fontSize:.75,title:e.name,children:(0,o.jT)(e.contents)})},e.ref)})})})})}},5867:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearBomb:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return a.extended?(0,r.jsx)(l.p8,{width:350,height:290,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Authorization",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Auth Disk",children:(0,r.jsx)(i.$n,{icon:a.authdisk?"eject":"id-card",selected:a.authdisk,content:a.diskname?a.diskname:"-----",tooltip:a.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return t("auth")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auth Code",children:(0,r.jsx)(i.$n,{icon:"key",disabled:!a.authdisk,selected:a.authcode,content:a.codemsg,onClick:function(){return t("code")}})})]})}),(0,r.jsx)(i.wn,{title:"Arming & Disarming",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Bolted to floor",children:(0,r.jsx)(i.$n,{icon:a.anchored?"check":"times",selected:a.anchored,disabled:!a.authdisk,content:a.anchored?"YES":"NO",onClick:function(){return t("toggle_anchor")}})}),(0,r.jsx)(i.Ki.Item,{label:"Time Left",children:(0,r.jsx)(i.$n,{icon:"stopwatch",content:a.time,disabled:!a.authfull,tooltip:"Set Timer",onClick:function(){return t("set_time")}})}),(0,r.jsx)(i.Ki.Item,{label:"Safety",children:(0,r.jsx)(i.$n,{icon:a.safety?"check":"times",selected:a.safety,disabled:!a.authfull,content:a.safety?"ON":"OFF",tooltip:a.safety?"Disable Safety":"Enable Safety",onClick:function(){return t("toggle_safety")}})}),(0,r.jsx)(i.Ki.Item,{label:"Arm/Disarm",children:(0,r.jsx)(i.$n,{icon:(a.timer,"bomb"),disabled:a.safety||!a.authfull,color:"red",content:a.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return t("toggle_armed")}})})]})})]})}):(0,r.jsx)(l.p8,{width:350,height:115,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Deployment",children:(0,r.jsx)(i.$n,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return t("deploy")}})})})})}},7579:function(e,n,t){"use strict";t.r(n),t.d(n,{NuclearRodFabricator:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:p.neighbor_requirements.map(function(e,n){return(0,r.jsx)(o.az,{children:e},n)})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.az,{mt:1,bold:!0,children:"Neighbor Requirements:"}),(0,r.jsx)(o.az,{ml:2,children:"None"})]})]}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.wn,{title:"Required Materials",children:p.materials&&0!==Object.keys(p.materials).length?(0,r.jsx)(o.XI,{children:Object.entries(p.materials).map(function(e,n){var t=s(e,2),i=t[0],l=t[1],a=Object.entries(f.resources||{}).find(function(e){var n=s(e,2),t=n[0];return n[1],t===i}),c=(a?a[1].amount:0)>=l;return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,className:c?null:"color-red",children:i}),(0,r.jsx)(o.XI.Cell,{className:c?null:"color-red",children:l}),(0,r.jsxs)(o.XI.Cell,{className:c?null:"color-red",children:["(",Math.round(l/2e3)," sheets)"]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials required."})}),(0,r.jsx)(o.cG,{}),(0,r.jsx)(o.$n,{icon:"wrench",content:"Fabricate",color:"good",onClick:function(){return h("fabricate_rod",{type_path:p.type_path})}})]})]})})]}),v===d&&(0,r.jsx)(o.wn,{title:"Material Storage",fill:!0,children:f.resources&&0!==Object.keys(f.resources).length?(0,r.jsx)(o.XI,{children:Object.entries(f.resources).map(function(e,n){var t=s(e,2),i=t[0],l=t[1];return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{bold:!0,children:i}),(0,r.jsxs)(o.XI.Cell,{children:[l.amount," units"]}),(0,r.jsxs)(o.XI.Cell,{children:["(",l.sheets," sheets)"]}),(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)(o.$n,{content:"1",onClick:function(){return h("eject_material",{id:l.id,amount:"1"})}}),(0,r.jsx)(o.$n,{content:"C",onClick:function(){return h("eject_material",{id:l.id,amount:"custom"})}}),l.sheets>=5&&(0,r.jsx)(o.$n,{content:"5",onClick:function(){return h("eject_material",{id:l.id,amount:"5"})}}),(0,r.jsx)(o.$n,{content:"All",onClick:function(){return h("eject_material",{id:l.id,amount:l.sheets.toString()})}})]})]},n)})}):(0,r.jsx)(o.az,{color:"average",children:"No materials loaded."})})]})]})})})}},8007:function(e,n,t){"use strict";t.r(n),t.d(n,{NumberInputModal:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(7686),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&x?5:0);return(0,r.jsxs)(c.p8,{title:y,width:270,height:_,children:[b&&(0,r.jsx)(u.Loader,{value:b}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){var n=window.event?e.which:e.keyCode;n===l.Ri&&f("submit",{entry:w}),n===l.s6&&f("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.az,{color:"label",children:j})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(h,{input:w,onClick:function(e){e!==w&&k(e)},onChange:function(e){e!==w&&k(e)}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:w})})]})})})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data,l=i.min_value,c=i.max_value,s=i.init_value,u=i.round_value,d=e.input,f=e.onClick,h=e.onChange,m=Math.round(d!==l?Math.max(d/2,l):c/2),p=d===l&&l>0||1===d;return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===l,icon:"angle-double-left",onClick:function(){return f(l)},tooltip:d===l?"Min":"Min (".concat(l,")")})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.SM,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!u,minValue:l,maxValue:c,value:d,onChange:h,onEnter:function(e){return t("submit",{entry:e})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===c,icon:"angle-double-right",onClick:function(){return f(c)},tooltip:d===c?"Max":"Max (".concat(c,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:p,icon:"divide",onClick:function(){return f(m)},tooltip:p?"Split":"Split (".concat(m,")")})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{disabled:d===s,icon:"redo",onClick:function(){return f(s)},tooltip:s?"Reset (".concat(s,")"):"Reset"})})]})}},4965:function(e,n,t){"use strict";t.r(n),t.d(n,{ObjAccessModifier:()=>a});var r=t(8138),i=t(7790),o=t(3384),l=t(9281),a=function(){return(0,r.jsx)(o.p8,{width:500,height:565,children:(0,r.jsx)(o.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(l.ChooseAccess,{})})})})}},6499:function(e,n,t){"use strict";t.r(n),t.d(n,{OperatingComputer:()=>d});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],c=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],s={average:[.25,.5],bad:[.5,1/0]},u=["bad","average","average","good","average","average","bad"],d=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data,s=c.hasOccupant,u=c.choice;return n=u?(0,r.jsx)(m,{}):s?(0,r.jsx)(f,{}):(0,r.jsx)(h,{}),(0,r.jsx)(l.p8,{width:650,height:455,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.tU,{children:[(0,r.jsx)(i.tU.Tab,{selected:!u,icon:"user",onClick:function(){return a("choiceOff")},children:"Patient"}),(0,r.jsx)(i.tU.Tab,{selected:!!u,icon:"cog",onClick:function(){return a("choiceOn")},children:"Options"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:n})})]})})})},f=function(e){var n=(0,o.Oc)().data.occupant,t=n.activeSurgeries;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Patient",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:n.name}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:a[n.stat][0],children:a[n.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),c.map(function(e,t){return(0,r.jsx)(i.Ki.Item,{label:e[0]+" Damage",children:(0,r.jsx)(i.z2,{min:"0",max:"100",value:n[e[1]]/100,ranges:s,children:Math.round(n[e[1]])},t)},t)}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[Math.round(n.btCelsius),"\xb0C, ",Math.round(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",children:[n.pulse," BPM"]})]})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Active surgeries",level:"2",children:n.inSurgery&&t?t.map(function(e,n){return(0,r.jsx)(i.wn,{style:{textTransform:"capitalize"},title:e.name+" ("+e.location+")",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Next Step",children:e.step},n)},n)},n)}):(0,r.jsx)(i.az,{color:"label",children:"No procedure ongoing."})})})]})},h=function(){return(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,r.jsx)("br",{}),"No patient detected."]})})},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.verbose,c=l.health,s=l.healthAlarm,u=l.oxy,d=l.oxyAlarm,f=l.crit;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Loudspeaker",children:(0,r.jsx)(i.$n,{selected:a,icon:a?"toggle-on":"toggle-off",content:a?"On":"Off",onClick:function(){return t(a?"verboseOff":"verboseOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer",children:(0,r.jsx)(i.$n,{selected:c,icon:c?"toggle-on":"toggle-off",content:c?"On":"Off",onClick:function(){return t(c?"healthOff":"healthOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Health Announcer Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:s,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("health_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm",children:(0,r.jsx)(i.$n,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return t(u?"oxyOff":"oxyOn")}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Alarm Threshold",children:(0,r.jsx)(i.N6,{bipolar:!0,minValue:-100,maxValue:100,value:d,stepPixelSize:5,ml:"0",onChange:function(e,n){return t("oxy_adj",{new:n})}})}),(0,r.jsx)(i.Ki.Item,{label:"Critical Alert",children:(0,r.jsx)(i.$n,{selected:f,icon:f?"toggle-on":"toggle-off",content:f?"On":"Off",onClick:function(){return t(f?"critOff":"critOn")}})})]})}},7701:function(e,n,t){"use strict";t.r(n),t.d(n,{Orbit:()=>j});var r=t(8138),i=t(4530),o=t(7790),l=t(5490),a=t(3268),c=t(2864),s=t(3384);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tn},p=function(e,n){var t=e.name,r=n.name;if(!t||!r)return 0;var i=t.match(f),o=r.match(f);return i&&o&&t.replace(f,"")===r.replace(f,"")?parseInt(i[1],10)-parseInt(o[1],10):m(t,r)},x=function(e){var n=e.searchText,t=e.source,i=e.title,l=e.color,a=e.sorted,c=t.filter(h(n));return a&&c.sort(p),t.length>0&&(0,r.jsx)(o.wn,{title:"".concat(i," - (").concat(t.length,")"),children:c.map(function(e){return(0,r.jsx)(g,{thing:e,color:l},e.name)})})},g=function(e){var n=(0,c.Oc)().act,t=e.color,i=e.thing;return(0,r.jsxs)(o.$n,{color:t,tooltip:i.assigned_role?(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.az,{as:"img",mr:"0.5em",className:(0,l.Ly)(["job_icons16x16",i.assigned_role_sprite])})," ",i.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){return n("orbit",{ref:i.ref})},children:[i.name,i.orbiters&&(0,r.jsxs)(o.az,{inline:!0,ml:1,children:["(",i.orbiters," ",(0,r.jsx)(o.In,{name:"eye"}),")"]})]})},j=function(e){var n=(0,c.Oc)(),t=n.act,l=n.data,a=l.alive,u=l.antagonists,f=l.highlights,j=l.response_teams,b=l.tourist,y=(l.auto_observe,l.dead),v=l.ssd,w=l.ghosts,k=l.misc,_=l.npcs,C=d((0,i.useState)(""),2),I=C[0],S=C[1],O={},A=!0,P=!1,B=void 0;try{for(var E,z=u[Symbol.iterator]();!(A=(E=z.next()).done);A=!0){var T=E.value;void 0===O[T.antag]&&(O[T.antag]=[]),O[T.antag].push(T)}}catch(e){P=!0,B=e}finally{try{A||null==z.return||z.return()}finally{if(P)throw B}}var N=Object.entries(O);N.sort(function(e,n){return m(e[0],n[0])});var R=function(e){for(var n=0,r=[N.map(function(e){var n=d(e,2);return n[0],n[1]}),b,f,a,w,v,y,_,k];n0&&(0,r.jsx)(o.wn,{title:"Antagonists",children:N.map(function(e){var n=d(e,2),t=n[0],i=n[1];return(0,r.jsx)(o.wn,{title:"".concat(t," - (").concat(i.length,")"),level:2,children:i.filter(h(I)).sort(p).map(function(e){return(0,r.jsx)(g,{color:"bad",thing:e},e.name)})},t)})}),f.length>0&&(0,r.jsx)(x,{title:"Highlights",source:f,searchText:I,color:"teal"}),(0,r.jsx)(x,{title:"Response Teams",source:j,searchText:I,color:"purple"}),(0,r.jsx)(x,{title:"Tourists",source:b,searchText:I,color:"violet"}),(0,r.jsx)(x,{title:"Alive",source:a,searchText:I,color:"good"}),(0,r.jsx)(x,{title:"Ghosts",source:w,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"SSD",source:v,searchText:I,color:"grey"}),(0,r.jsx)(x,{title:"Dead",source:y,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"NPCs",source:_,searchText:I,sorted:!1}),(0,r.jsx)(x,{title:"Misc",source:k,searchText:I,sorted:!1})]})})}},5802:function(e,n,t){"use strict";t.r(n),t.d(n,{OreRedemption:()=>f});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(3384);function c(){return(c=Object.assign||function(e){for(var n=1;n0?"good":"grey",bold:a>0&&"good",children:a.toLocaleString("en-US")+" pts"})}),(0,r.jsx)(i.cG,{}),f?(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Design disk",children:[(0,r.jsx)(i.$n,{selected:!0,bold:!0,icon:"eject",content:f.name,tooltip:"Ejects the design disk.",onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{disabled:!f.design||!f.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return t("download")}})]}),(0,r.jsx)(i.Ki.Item,{label:"Stored design",children:(0,r.jsx)(i.az,{color:f.design&&(f.compatible?"good":"bad"),children:f.design||"N/A"})})]}):(0,r.jsx)(i.az,{color:"label",children:"No design disk inserted."})]}))},m=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).sheets,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,height:"20%",children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(g,{ore:e},e.id)})]}))})},p=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).alloys,o=c({},s(e));return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,d(u({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},o),{children:[(0,r.jsx)(x,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),t.map(function(e){return(0,r.jsx)(j,{ore:e},e.id)})]}))})},x=function(e){var n;return(0,r.jsx)(i.az,{className:"OreHeader",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:e.title}),null==(n=e.columns)?void 0:n.map(function(e){return(0,r.jsx)(i.BJ.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e)})]})})},g=function(e){var n=(0,l.Oc)().act,t=e.ore;if(!t.value||!(t.amount<=0)||["metal","glass"].indexOf(t.id)>-1)return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"45%",align:"middle",children:(0,r.jsxs)(i.BJ,{align:"center",children:[(0,r.jsx)(i.BJ.Item,{className:(0,o.Ly)(["materials32x32",t.id])}),(0,r.jsx)(i.BJ.Item,{children:t.name})]})}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",children:t.value}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),step:1,stepPixelSize:6,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})},j=function(e){var n=(0,l.Oc)().act,t=e.ore;return(0,r.jsx)(i.az,{className:"SheetLine",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{basis:"7%",align:"middle",children:(0,r.jsx)(i.az,{className:(0,o.Ly)(["alloys32x32",t.id])})}),(0,r.jsx)(i.BJ.Item,{basis:"30%",textAlign:"middle",align:"center",children:t.name}),(0,r.jsx)(i.BJ.Item,{basis:"35%",textAlign:"middle",color:t.amount>=1?"good":"gray",align:"center",children:t.description}),(0,r.jsx)(i.BJ.Item,{basis:"10%",textAlign:"center",color:t.amount>=1?"good":"gray",bold:t.amount>=1,align:"center",children:t.amount.toLocaleString("en-US")}),(0,r.jsx)(i.BJ.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,r.jsx)(i.Q7,{width:"40%",value:0,minValue:0,maxValue:Math.min(t.amount,50),stepPixelSize:6,step:1,onChange:function(e){return n(t.value?"sheet":"alloy",{id:t.id,amount:e})}})})]})})}},4235:function(e,n,t){"use strict";t.r(n),t.d(n,{PAI:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(222),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.app_template,u=a.app_icon,d=a.app_title,f=s(c);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{p:1,fill:!0,scrollable:!0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:u,mr:1}),d,"pai_main_menu"!==c&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){return t("Back")}}),(0,r.jsx)(i.$n,{content:"Home",icon:"arrow-up",onClick:function(){return t("MASTER_back")}})]})]}),children:(0,r.jsx)(f,{})})})})})})}},2740:function(e,n,t){"use strict";t.r(n),t.d(n,{PDA:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(483),c=t(2721),s=function(e){try{n=c("./".concat(e,".jsx"))}catch(n){if("MODULE_NOT_FOUND"===n.code)return(0,a.z)("notFound",e);throw n}var n,t=n[e];return t||(0,a.z)("missingExport",e)},u=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=t.app;if(!t.owner)return(0,r.jsx)(l.p8,{width:350,height:105,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var c=s(a.template);return(0,r.jsx)(l.p8,{width:600,height:650,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.In,{name:a.icon,mr:1}),a.name]}),children:(0,r.jsx)(c,{})})}),(0,r.jsx)(i.BJ.Item,{mt:7.5,children:(0,r.jsx)(f,{})})]})})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.idInserted,c=l.idLink,s=l.stationTime,u=l.cartridge_name;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{ml:.5,children:(0,r.jsx)(i.$n,{icon:"id-card",color:"transparent",onClick:function(){return t("Authenticate")},content:a?c:"No ID Inserted"})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"sd-card",color:"transparent",onClick:function(){return t("Eject")},content:u?["Eject "+u]:"No Cartridge Inserted"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:s})]})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app;return(0,r.jsx)(i.az,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,r.jsxs)(i.BJ,{fill:!0,children:[!!l.has_back&&(0,r.jsx)(i.BJ.Item,{basis:"33%",mr:-.5,children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return t("Back")}})}),(0,r.jsx)(i.BJ.Item,{basis:l.has_back?"33%":"100%",children:(0,r.jsx)(i.$n,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:l.is_home?"disabled":"white",icon:"home",onClick:function(){t("Home")}})})]})})}},377:function(e,n,t){"use strict";t.r(n),t.d(n,{Pacman:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,s=n.data,u=s.active,d=s.anchored,f=s.broken,h=s.emagged,m=s.fuel_type,p=s.fuel_usage,x=s.fuel_stored,g=s.fuel_cap,j=s.is_ai,b=s.tmp_current,y=s.tmp_max,v=s.tmp_overheat,w=s.output_max,k=s.power_gen,_=s.output_set,C=s.has_fuel,I=Math.round(x/p*2),S=Math.round(I/60);return(0,r.jsx)(c.p8,{width:500,height:225,children:(0,r.jsxs)(c.p8.Content,{children:[(f||!d)&&(0,r.jsxs)(i.wn,{title:"Status",children:[!!f&&(0,r.jsx)(i.az,{color:"orange",children:"The generator is malfunctioning!"}),!f&&!d&&(0,r.jsx)(i.az,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!f&&!!d&&(0,r.jsxs)("div",{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!C,selected:u,onClick:function(){return t("toggle_power")}}),children:(0,r.jsxs)(i.so,{direction:"row",children:[(0,r.jsx)(i.so.Item,{width:"50%",className:"ml-1",children:(0,r.jsx)(i.Ki,{children:(0,r.jsxs)(i.Ki.Item,{label:"Power setting",children:[(0,r.jsx)(i.Q7,{value:_,minValue:1,maxValue:w*(h?2.5:1),step:1,className:"mt-1",onChange:function(e){return t("change_power",{change_power:e})}}),"(",(0,o.d5)(_*k),")"]})})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{value:b/y,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[b," ℃"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Status",children:[v>50&&(0,r.jsx)(i.az,{color:"red",children:"CRITICAL OVERHEAT!"}),v>20&&v<=50&&(0,r.jsx)(i.az,{color:"orange",children:"WARNING: Overheating!"}),v>1&&v<=20&&(0,r.jsx)(i.az,{color:"orange",children:"Temperature High"}),0===v&&(0,r.jsx)(i.az,{color:"green",children:"Optimal"})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Fuel",buttons:(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:u||j||!C,onClick:function(){return t("eject_fuel")}}),children:(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Type",children:m}),(0,r.jsx)(i.Ki.Item,{label:"Fuel level",children:(0,r.jsxs)(i.z2,{value:x/g,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(x/1e3)," dm\xb3"]})})]})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fuel usage",children:[p/1e3," dm\xb3/s"]}),(0,r.jsxs)(i.Ki.Item,{label:"Fuel depletion",children:[!!C&&(p?I>120?"".concat(S," minutes"):"".concat(I," seconds"):"N/A"),!C&&(0,r.jsx)(i.az,{color:"red",children:"Out of fuel"})]})]})})]})})]})]})})}},9454:function(e,n,t){"use strict";t.r(n),t.d(n,{PanDEMIC:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)().data,a=t.reporting,u=t.analyzing,d=t.beakerLoaded,h=t.beakerContainsBlood,m=t.beakerContainsVirus,p=t.resistances,g=void 0===p?[]:p;return d?h?h&&!m&&(n=(0,r.jsx)(r.Fragment,{children:"No disease detected in provided blood sample."})):n=(0,r.jsx)(r.Fragment,{children:"No blood sample found in the loaded container."}):n=(0,r.jsx)(r.Fragment,{children:"No container loaded."}),(0,r.jsx)(l.p8,{width:700,height:640,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{operating:u||a,name:"PanD.E.M.I.C"}),n&&!m?(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{fill:!0,vertical:!0}),children:(0,r.jsx)(i.IC,{children:n})}):(0,r.jsx)(f,{}),(null==g?void 0:g.length)>0&&(0,r.jsx)(x,{align:"bottom"})]})})})},c=function(e){var n=e.operating,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.analyzing,s=a.analysisTime,u=a.analysisDuration,d=a.analysisDifficulty,f=a.totalContribution,h=a.analysisContributions,m=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(d)}),h.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:Math.floor(e.amount)},n)}),(0,r.jsx)(i.Ki.Item,{label:"Total",children:Math.floor(f)}),(0,r.jsx)(i.Ki.Item,{label:"Analysis Result",children:d-f<0?"Disease Analyzed Successfully":"Analysis Failed"})]});if(n)return c?(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"Analyzing ",Math.floor(100-100*s/u),"%"]})})}):(0,r.jsx)(i.aF,{backgroundColor:"rgba(0, 0, 0, 1)",children:(0,r.jsx)(i.wn,{title:"Analysis Results",backgroundColor:"rgba(0, 0, 0, 1)",bold:!0,children:(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsx)(i.Ki,{children:m}),(0,r.jsx)(i.$n,{textAlign:"center",onClick:function(){return l("close_report")},children:"Close"})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.beakerLoaded;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){return t("eject_beaker")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!l,onClick:function(){return t("destroy_eject_beaker")}})]})},u=function(e){var n,t,l,a=(0,o.Oc)(),c=a.act,s=a.data,u=s.analysisDifficulty,d=s.analysisContributions,f=s.beakerContainsVirus,h=s.analyzing,m=s.canAnalyze,p=e.strain,x=p.commonName,g=p.description,j=p.strainID,b=p.sample_stage,y=p.known,v=p.diseaseAgent,w=p.bloodDNA,k=p.bloodType,_=p.possibleCures,C=p.transmissionRoute,I=p.isAdvanced,S=p.RequiredCures,O=p.Stabilized,A=p.StrainTracker,P=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood DNA",children:w?(0,r.jsx)("span",{style:{fontFamily:"'Courier New', monospace"},children:w}):"Undetectable"}),(0,r.jsx)(i.Ki.Item,{label:"Blood Type",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:null!=k?k:"Undetectable"}})})]});if(!f)return(0,r.jsx)(i.Ki,{children:P});var B=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Analysis Difficulty",children:Math.ceil(u)}),d.map(function(e,n){return(0,r.jsx)(i.Ki.Item,{label:e.factor,children:(0,r.jsx)(i.z2,{maxValue:Math.min(e.maxAmount,u),minValue:0,value:e.amount,ranges:{good:[.66*Math.min(e.maxAmount,u),1/0],average:[.33*Math.min(e.maxAmount,u),.66*Math.min(e.maxAmount,u)],bad:[-1/0,.33*Math.min(e.maxAmount,u)]},children:e.amount})},n)})]});if(I)return n=null!=x&&"Unknown"!==x?(0,r.jsx)(i.$n,{icon:"print",content:"Print Release Forms",disabled:!y,onClick:function(){return c("print_release_forms",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}):(0,r.jsx)(i.$n,{icon:"pen",content:null!=x&&"Unknown"!==x?"Rename Disease":"Name Disease",disabled:!y,onClick:function(){return c("name_strain",{strain_index:e.strainIndex})},style:{marginLeft:"auto"}}),I&&(t=(0,r.jsx)(i.$n,{content:"Analyze",disabled:!m||h,onClick:function(){return c("analyze_strain",{strain_index:e.strainIndex})}}),l=(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Delete Data",confirmContent:"Delete Data",disabled:!e.strain.known,onClick:function(){return c("remove_from_database",{strain_id:e.strain.strainFullID})}})),(0,r.jsxs)(i.BJ,{vertical:!0,children:[(0,r.jsxs)(i.BJ,{align:"left",children:[n,t,l]}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Common Name",className:"common-name-label",children:null!=x?x:"Unknown"}),g&&(0,r.jsx)(i.Ki.Item,{label:"Description",children:g}),(0,r.jsx)(i.Ki.Item,{label:"Strain ID",children:j}),m?B:"",(0,r.jsx)(i.Ki.Item,{label:"Sample Stage",children:b}),(0,r.jsx)(i.Ki.Item,{label:"Disease Agent",children:v}),P,(0,r.jsx)(i.Ki.Item,{label:"Spread Vector",children:null!=C?C:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Possible Cures",children:null!=_?_:"None"}),(0,r.jsx)(i.Ki.Item,{label:"Required Cures",children:null!=S?S:"None"}),I?(0,r.jsx)(i.Ki.Item,{label:"Stabilized",children:1===O?"Yes":"No"}):"",I?(0,r.jsx)(i.Ki.Item,{label:"Tracked Strain",children:A&&""!==A?A:"None"}):""]})]})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=!!t.data.synthesisCooldown,c=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:a?"spinner":"clone",iconSpin:a,content:"Clone",disabled:a,onClick:function(){return l("clone_strain",{strain_index:e.strainIndex})}}),e.sectionButtons]});return(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.wn,{title:null!=(n=e.sectionTitle)?n:"Strain Information",buttons:c,children:(0,r.jsx)(u,{strain:e.strain,strainIndex:e.strainIndex})})})},f=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data,u=c.selectedStrainIndex,f=c.strains,h=f[u-1];if(0===f.length)return(0,r.jsx)(i.wn,{title:"Container Information",buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.IC,{children:"No disease detected in provided blood sample."})});if(1===f.length)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d,{strain:f[0],strainIndex:1,sectionButtons:(0,r.jsx)(s,{})}),(null==(t=f[0].symptoms)?void 0:t.length)>0&&(0,r.jsx)(m,{strain:f[0]})]});var p=(0,r.jsx)(s,{});return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.wn,{title:"Culture Information",fill:!0,buttons:p,children:[(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.tU,{children:f.map(function(e,n){var t;return(0,r.jsx)(i.tU.Tab,{icon:"virus",selected:u-1===n,onClick:function(){return a("switch_strain",{strain_index:n+1})},children:null!=(t=e.commonName)?t:"Unknown"},n)})})}),(0,r.jsx)(d,{strain:h,strainIndex:u}),(null==(n=h.symptoms)?void 0:n.length)>0&&(0,r.jsx)(m,{className:"remove-section-bottom-padding",strain:h})]})})},h=function(e){return e.reduce(function(e,n){return e+n},0)},m=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.predictions,c=l.symptom_names,s=l.analyzing,u=l.analysisDuration,d=e.strain,f=d.baseStats,m=d.symptoms,p=d.known;return(0,r.jsx)(i.so.Item,{grow:!0,children:(0,r.jsx)(i.wn,{title:"Infection Symptoms",fill:!0,className:e.className,children:(0,r.jsxs)(i.XI,{className:"symptoms-table",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Name"}),(0,r.jsx)(i.XI.Cell,{children:"Stealth"}),(0,r.jsx)(i.XI.Cell,{children:"Resistance"}),(0,r.jsx)(i.XI.Cell,{children:"Stage Speed"}),(0,r.jsx)(i.XI.Cell,{children:"Transmissibility"})]}),m.map(function(e,n){return(0,r.jsxs)(i.XI.Row,{children:[p||"UNKNOWN"!==e.name?(0,r.jsx)(i.XI.Cell,{children:e.name}):(0,r.jsx)(i.ms,{options:c.sort(function(e,n){return e.localeCompare(n)}),width:"180px",selected:a[n],disabled:s||-2===u,onSelected:function(e){return t("set_prediction",{pred_index:n+1,pred_value:e})}}),(0,r.jsx)(i.XI.Cell,{children:e.stealth}),(0,r.jsx)(i.XI.Cell,{children:e.resistance}),(0,r.jsx)(i.XI.Cell,{children:e.stageSpeed}),(0,r.jsx)(i.XI.Cell,{children:e.transmissibility})]},n)}),(0,r.jsx)(i.XI.Row,{className:"table-spacer"}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:"Base Stats"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?f.transmissibility:"UNKNOWN"})]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Total"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stealth}))+f.stealth:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.resistance}))+f.resistance:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.stageSpeed}))+f.stageSpeed:"UNKNOWN"}),(0,r.jsx)(i.XI.Cell,{children:p?h(m.map(function(e){return e.transmissibility}))+f.transmissibility:"UNKNOWN"})]})]})})})},p=["flask","vial","eye-dropper"],x=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.synthesisCooldown,c=(l.beakerContainsVirus,l.resistances);return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Antibodies",fill:!0,children:(0,r.jsx)(i.BJ,{wrap:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:p[n%p.length],disabled:!!a,onClick:function(){return t("clone_vaccine",{resistance_index:n+1})},mr:"0.5em"}),e]},n)})})})})}},3566:function(e,n,t){"use strict";t.r(n),t.d(n,{ParticleAccelerator:()=>u});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(7946),c=t(3384),s=function(e){switch(e){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.assembled,u=a.power,h=a.strength,m=a.max_strength,p=(a.icon,a.layout_1,a.layout_2,a.layout_3,a.orientation);return(0,r.jsx)(c.p8,{width:395,height:s?160:"north"===p||"south"===p?540:465,children:(0,r.jsxs)(c.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Control Panel",buttons:(0,r.jsx)(i.$n,{dmIcon:"sync",content:"Connect",onClick:function(){return t("scan")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",mb:"5px",children:(0,r.jsx)(i.az,{color:s?"good":"bad",children:s?"Operational":"Error: Verify Configuration"})}),(0,r.jsx)(i.Ki.Item,{label:"Power",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:!s,onClick:function(){return t("power")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Strength",children:[(0,r.jsx)(i.$n,{icon:"backward",disabled:!s||0===h,onClick:function(){return t("remove_strength")},mr:"4px"}),h,(0,r.jsx)(i.$n,{icon:"forward",disabled:!s||h===m,onClick:function(){return t("add_strength")},ml:"4px"})]})]})}),s?"":(0,r.jsx)(i.wn,{title:p?"EM Acceleration Chamber Orientation: "+(0,o.ZH)(p):"Place EM Acceleration Chamber Next To Console",children:0===p?"":"north"===p||"south"===p?(0,r.jsx)(f,{}):(0,r.jsx)(d,{})})]})})},d=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,a=t.layout_1,c=t.layout_2,u=t.layout_3,d=t.orientation;return(0,r.jsxs)(i.XI,{children:[(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?a:u).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:c.slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(i.XI.Row,{width:"40px",children:("east"===d?u:a).slice().map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})},f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data);t.assembled,t.power,t.strength,t.max_strength;var o=t.icon,c=t.layout_1,u=t.layout_2,d=t.layout_3,f=t.orientation;return(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?c:d).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{children:u.slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})}),(0,r.jsx)(a.xA.Column,{width:"40px",children:("north"===f?d:c).slice().map(function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,tooltip:e.status,children:(0,r.jsx)(i.m_,{content:(0,r.jsxs)("span",{style:{wordWrap:"break-word"},children:[e.name," ",(0,r.jsx)("br",{})," ","Status: ".concat(e.status),(0,r.jsx)("br",{}),"Direction: ".concat(s(e.dir))]}),children:(0,r.jsx)(i.c_,{dmIcon:o,dmIconState:e.icon_state,dmDirection:e.dir,style:{borderStyle:"solid",borderWidth:"2px",borderColor:"good"===e.status?"green":"Incomplete"===e.status?"orange":"red",padding:"2px"}})})},e.name)})})]})}},3371:function(e,n,t){"use strict";t.r(n),t.d(n,{PdaPainter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.has_pda;return(0,r.jsx)(l.p8,{width:510,height:505,children:(0,r.jsx)(l.p8.Content,{children:n?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,r.jsx)(i.In,{name:"download",size:5,mb:"10px"}),(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){return n("insert_pda")}})]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.pda_colors;return(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.XI,{className:"PdaPainter__list",children:Object.keys(l).map(function(e){return(0,r.jsxs)(i.XI.Row,{onClick:function(){return t("choose_pda",{selectedPda:e})},children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)("img",{src:"data:image/png;base64,".concat(l[e][0]),style:{verticalAlign:"middle",width:"32px",margin:"0px",imageRendering:"pixelated"}})}),(0,r.jsx)(i.XI.Cell,{children:e})]},e)})})})})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.current_appearance,c=l.preview_appearance;return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Current PDA",children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(a),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){return t("eject_pda")}}),(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){return t("paint_pda")}})]}),(0,r.jsx)(i.wn,{title:"Preview",children:(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(c),style:{verticalAlign:"middle",width:"160px",margin:"0px",imageRendering:"pixelated"}})})]})}},6144:function(e,n,t){"use strict";t.r(n),t.d(n,{PersonalCrafting:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.busy,d=a.category,f=a.display_craftable_only,h=a.display_compact,m=a.prev_cat,p=a.next_cat,x=a.subcategory,g=a.prev_subcat,j=a.next_subcat;return(0,r.jsx)(l.p8,{width:700,height:800,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!u&&(0,r.jsxs)(i.Rr,{fontSize:"32px",children:[(0,r.jsx)(i.In,{name:"cog",spin:1})," Crafting..."]}),(0,r.jsxs)(i.wn,{title:d,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Show Craftable Only",icon:f?"check-square-o":"square-o",selected:f,onClick:function(){return t("toggle_recipes")}}),(0,r.jsx)(i.$n,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return t("toggle_compact")}})]}),children:[(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:m,icon:"arrow-left",onClick:function(){return t("backwardCat")}}),(0,r.jsx)(i.$n,{content:p,icon:"arrow-right",onClick:function(){return t("forwardCat")}})]}),x&&(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{content:g,icon:"arrow-left",onClick:function(){return t("backwardSubCat")}}),(0,r.jsx)(i.$n,{content:j,icon:"arrow-right",onClick:function(){return t("forwardSubCat")}})]}),h?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsx)(i.az,{mt:1,children:(0,r.jsxs)(i.Ki,{children:[c.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}),!a&&s.map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e.name,children:[(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,r.jsx)(i.$n,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,r.jsx)(i.$n,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,r.jsx)(i.$n,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.display_craftable_only,c=l.can_craft,s=l.cant_craft;return(0,r.jsxs)(i.az,{mt:1,children:[c.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",onClick:function(){return t("make",{make:e.ref})}}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)}),!a&&s.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsx)(i.$n,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,r.jsxs)(i.Ki,{children:[e.catalyst_text&&(0,r.jsx)(i.Ki.Item,{label:"Catalysts",children:e.catalyst_text}),(0,r.jsx)(i.Ki.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,r.jsx)(i.Ki.Item,{label:"Tools",children:e.tool_text})]})},e.name)})]})}},2327:function(e,n,t){"use strict";t.r(n),t.d(n,{Photocopier:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:400,height:440,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.wn,{title:"Photocopier",color:"silver",children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Copies:"}),(0,r.jsx)(i.BJ.Item,{width:"2em",bold:!0,children:a.copynumber}),(0,r.jsxs)(i.BJ.Item,{style:{float:"right"},children:[(0,r.jsx)(i.$n,{icon:"minus",textAlign:"center",content:"",onClick:function(){return t("minus")}}),(0,r.jsx)(i.$n,{icon:"plus",textAlign:"center",content:"",onClick:function(){return t("add")}})]})]}),(0,r.jsxs)(i.BJ,{mb:2,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Toner:"}),(0,r.jsx)(i.BJ.Item,{bold:!0,children:a.toner})]}),(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Document:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.copyitem&&!a.mob,content:a.copyitem?a.copyitem:a.mob?a.mob+"'s ass!":"document",onClick:function(){return t("removedocument")}})})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:12,children:"Inserted Folder:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",disabled:!a.folder,content:a.folder?a.folder:"folder",onClick:function(){return t("removefolder")}})})]})]}),(0,r.jsx)(i.wn,{children:(0,r.jsx)(c,{})}),(0,r.jsx)(s,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.issilicon;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"copy",textAlign:"center",content:"Copy",onClick:function(){return t("copy")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"file-import",textAlign:"center",content:"Scan",onClick:function(){return t("scandocument")}}),!!l&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"file",color:"green",textAlign:"center",content:"Print Text",onClick:function(){return t("ai_text")}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"image",color:"green",textAlign:"center",content:"Print Image",onClick:function(){return t("ai_pic")}})]})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Scanned Files",children:l.files.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print",disabled:l.toner<=0,onClick:function(){return t("filecopy",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){return t("deletefile",{uid:e.uid})}})]})},e.name)})})}},7331:function(e,n,t){"use strict";t.r(n),t.d(n,{PoolController:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["tempKey"]),s=c[l];if(!s)return null;var u=(0,o.Oc)(),d=u.data,f=u.act,h=d.currentTemp,m=s.label,p=s.icon;return(0,r.jsxs)(i.$n,(n=function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:330,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.direction,s=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Pump Direction",children:(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.$n,{width:4,icon:"sign-in-alt",content:"In",selected:!c,onClick:function(){return t("set_direction",{direction:0})}}),(0,r.jsx)(i.$n,{width:4,icon:"sign-out-alt",content:"Out",selected:c,onClick:function(){return t("set_direction",{direction:1})}})]})}),(0,r.jsx)(i.Ki.Item,{label:"Port status",children:(0,r.jsx)(i.az,{color:s?"green":"average",bold:1,ml:.5,children:s?"Connected":"Disconnected"})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.target_pressure,s=l.max_target_pressure,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_pressure",{pressure:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_pressure",{pressure:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_target_pressure,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},7920:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableScrubber:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).has_holding_tank;return(0,r.jsx)(l.p8,{width:435,height:300,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),t?(0,r.jsx)(u,{}):(0,r.jsx)(i.wn,{fill:!0,title:"Holding Tank",children:(0,r.jsx)(i.az,{color:"average",bold:1,textAlign:"center",mt:2.5,children:"No Holding Tank Inserted."})})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.on,c=l.port_connected;return(0,r.jsx)(i.wn,{title:"Pump Settings",buttons:(0,r.jsx)(i.$n,{width:4,icon:"power-off",content:a?"On":"Off",color:a?null:"red",selected:a,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Port Status:"}),(0,r.jsx)(i.BJ.Item,{color:c?"green":"average",bold:1,ml:6,children:c?"Connected":"Disconnected"})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.tank_pressure,c=l.rate,s=l.max_rate,u=.7*s,d=.25*s;return(0,r.jsxs)(i.wn,{title:"Pressure Settings",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Stored pressure",children:(0,r.jsxs)(i.z2,{value:a,minValue:0,maxValue:s,ranges:{good:[u,1/0],average:[d,u],bad:[-1/0,d]},children:[a," kPa"]})})}),(0,r.jsxs)(i.BJ,{mt:1,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,color:"label",mt:.3,children:"Target pressure:"}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"undo",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:101.325})}}),(0,r.jsx)(i.$n,{icon:"fast-backward",mr:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:0})}})]}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.Ap,{animated:!0,unit:"kPa",width:16.5,stepPixelSize:.22,minValue:0,maxValue:s,value:c,onChange:function(e,n){return t("set_rate",{rate:n})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"fast-forward",ml:.5,width:2.2,textAlign:"center",onClick:function(){return t("set_rate",{rate:s})}})})]})]})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.holding_tank,c=l.max_rate,s=.7*c,u=.25*c;return(0,r.jsxs)(i.wn,{fill:!0,title:"Holding Tank",buttons:(0,r.jsx)(i.$n,{onClick:function(){return t("remove_tank")},icon:"eject",children:"Eject"}),children:[(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",children:"Tank Label:"}),(0,r.jsx)(i.BJ.Item,{color:"silver",ml:4.5,children:a.name})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{color:"label",mt:2,children:"Tank Pressure:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,mt:1.5,children:(0,r.jsxs)(i.z2,{value:a.tank_pressure,minValue:0,maxValue:c,ranges:{good:[s,1/0],average:[u,s],bad:[-1/0,u]},children:[a.tank_pressure," kPa"]})})]})]})}},2854:function(e,n,t){"use strict";t.r(n),t.d(n,{PortableTurret:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.locked,u=c.on,d=c.lethal,f=c.lethal_is_configurable,h=c.targetting_is_configurable,m=c.check_weapons,p=c.neutralize_noaccess,x=c.access_is_configurable,g=c.regions,j=c.selectedAccess,b=c.one_access,y=c.neutralize_norecord,v=c.neutralize_criminals,w=c.neutralize_all,k=c.neutralize_unidentified,_=c.neutralize_cyborgs;return(0,r.jsx)(l.p8,{width:475,height:750,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.BJ.Item,{m:0,children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:s,onClick:function(){return t("power")}})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Lethals",children:(0,r.jsx)(i.$n,{icon:d?"exclamation-triangle":"times",content:d?"On":"Off",color:d?"bad":"",disabled:s,onClick:function(){return t("lethal")}})}),!!x&&(0,r.jsx)(i.Ki.Item,{label:"One Access Mode",children:(0,r.jsx)(i.$n,{icon:b?"address-card":"exclamation-triangle",content:b?"On":"Off",selected:b,disabled:s,onClick:function(){return t("one_access")}})})]})})}),!!h&&(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(i.wn,{title:"Humanoid Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:v,content:"Wanted Criminals",disabled:s,onClick:function(){return t("autharrest")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:y,content:"No Sec Record",disabled:s,onClick:function(){return t("authnorecord")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:m,content:"Unauthorized Weapons",disabled:s,onClick:function(){return t("authweapon")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:p,content:"Unauthorized Access",disabled:s,onClick:function(){return t("authaccess")}})]}),(0,r.jsxs)(i.wn,{title:"Other Targets",children:[(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:k,content:"Unidentified Lifesigns (Xenos, Animals, Etc)",disabled:s,onClick:function(){return t("authxeno")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:_,content:"Cyborgs",disabled:s,onClick:function(){return t("authborgs")}}),(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:w,content:"All Non-Synthetics",disabled:s,onClick:function(){return t("authsynth")}})]})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:!!x&&(0,r.jsx)(a.AccessList,{accesses:g,selectedList:j,accessMod:function(e){return t("set",{access:e})},grantAll:function(){return t("grant_all")},denyAll:function(){return t("clear_all")},grantDep:function(e){return t("grant_region",{region:e})},denyDep:function(e){return t("deny_region",{region:e})}})})]})})})}},1784:function(e,n,t){"use strict";t.r(n),t.d(n,{PowerMonitor:()=>m,PowerMonitorMainContent:()=>p});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(6859),c=t(3268),s=t(2864),u=t(3384);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t50?"battery-half":"battery-quarter";break;case"C":i="bolt";break;case"F":i="battery-full";break;case"M":i="slash"}return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.In,{width:"18px",textAlign:"center",name:i,color:"N"===n&&(t>50?"yellow":"red")||"C"===n&&"yellow"||"F"===n&&"green"||"M"===n&&"orange"}),(0,r.jsx)(l.az,{inline:!0,width:"36px",textAlign:"right",children:(0,a.Mg)(t)+"%"})]})},b=function(e){switch(e.status){case"AOn":n=!0,t=!0;break;case"AOff":n=!0,t=!1;break;case"On":n=!1,t=!0;break;case"Off":n=!1,t=!1}var n,t,i=(t?"On":"Off")+" [".concat(n?"auto":"manual","]");return(0,r.jsx)(l.m_,{content:i,children:(0,r.jsx)(l.BK,{color:t?"good":"bad",content:n?void 0:"M"})})}},8011:function(e,n,t){"use strict";t.r(n),t.d(n,{PrisonerImplantManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4744),c=t(7352),s=t(736),u=function(e){var n=(0,o.Oc)(),t=n.act,u=n.data,d=u.loginState,f=u.prisonerInfo,h=u.chemicalInfo,m=u.trackingInfo;if(!d.logged_in)return(0,r.jsx)(l.p8,{theme:"security",width:500,height:850,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(s.LoginScreen,{})})});var p=[1,5,10];return(0,r.jsxs)(l.p8,{theme:"security",width:500,height:850,children:[(0,r.jsx)(a.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.LoginInfo,{}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:f.name?"eject":"id-card",selected:f.name,content:f.name?f.name:"-----",tooltip:f.name?"Eject ID":"Insert ID",onClick:function(){return t("id_card")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Points",children:[null!==f.points?f.points:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"minus-square",disabled:null===f.points,content:"Reset",onClick:function(){return t("reset_points")}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Point Goal",children:[null!==f.goal?f.goal:"-/-",(0,r.jsx)(i.$n,{ml:2,icon:"pen",disabled:null===f.goal,content:"Edit",onClick:function(){return(0,a.modalOpen)("set_points")}})]}),(0,r.jsx)(i.Ki.Item,{children:(0,r.jsxs)("box",{hidden:null===f.goal,children:["1 minute of prison time should roughly equate to 150 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Sentences should not exceed 5000 points.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Permanent prisoners should not be given a point goal.",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle."]})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Tracking Implants",children:m.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.subject]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:e.location}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:e.health}),(0,r.jsx)(i.Ki.Item,{label:"Prisoner",children:(0,r.jsx)(i.$n,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){return(0,a.modalOpen)("warn",{uid:e.uid})}})})]})]},e.subject)]}),(0,r.jsx)("br",{})]})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Chemical Implants",children:h.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.az,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,r.jsxs)(i.az,{bold:!0,children:["Subject: ",e.name]}),(0,r.jsxs)(i.az,{children:[" ",(0,r.jsx)("br",{}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Reagents",children:e.volume})}),p.map(function(n){return(0,r.jsx)(i.$n,{mt:2,disabled:e.volumea});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.can_go_home,s=a.emagged,u=a.id_inserted,d=a.id_name,f=a.id_points,h=a.id_goal,m=+!s,p=c?"Completed!":"Insufficient";s&&(p="ERR0R");var x="No ID inserted";return u?x=(0,r.jsx)(i.z2,{value:f/h,ranges:{good:[m,1/0],bad:[-1/0,m]},children:f+" / "+h+" "+p}):s&&(x="ERR0R COMPLETED?!@"),(0,r.jsx)(l.p8,{width:315,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:x}),(0,r.jsx)(i.Ki.Item,{label:"Shuttle controls",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Move shuttle",disabled:!c,onClick:function(){return t("move_shuttle")}})}),(0,r.jsx)(i.Ki.Item,{label:"Inserted ID",children:(0,r.jsx)(i.$n,{fluid:!0,content:u?d:"-------------",onClick:function(){return t("handle_id")}})})]})})})}},9083:function(e,n,t){"use strict";t.r(n),t.d(n,{PrizeCounter:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu;return(0,r.jsx)(o.c_,{fluid:!0,title:e.name,dmIcon:e.icon,dmIconState:e.icon_state,buttonsAlt:(0,r.jsxs)(o.$n,{bold:!0,fontSize:1.5,tooltip:n&&"Not enough tickets",disabled:n,onClick:function(){return t("purchase",{purchase:e.itemID})},children:[e.cost,(0,r.jsx)(o.In,{m:0,mt:.25,name:"ticket",color:n?"bad":"good",size:1.6})]}),children:e.desc},e.name)})})})})})})}},7692:function(e,n,t){"use strict";t.r(n),t.d(n,{QuirkMenu:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e.cost},j=function(e){var n=p.has(e.name);if(n){var r=u(h.filter(function(n){return n!==e.name}),d.all_quirks);if(e.cost<0&&r<0)return}else if(e.cost>0&&!g(e))return;m(n?h.filter(function(n){return n!==e.name}):((function(e){if(Array.isArray(e))return c(e)})(h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(h)||s(h)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e.name])),t(n?"remove_quirk":"add_quirk",{path:e.path})},b=function(e,n,t,i){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.az,{p:.5,mb:1,color:t,style:{border:"1px solid ".concat(t),backgroundColor:"rgba(".concat("green"===t?"0,128,0":"255,0,0",",0.1)")},children:[(0,r.jsx)(o.In,{name:i})," ",n]}),e.map(function(e){var n=p.has(e.name),t=e.cost>0?"-".concat(e.cost):"+".concat(Math.abs(e.cost)),i=e.cost>0?"bad":"good",l=!1,a=n?"Remove":"Select",c=n?"bad":"good";if(n){var s=u(h.filter(function(n){return n!==e.name}),d.all_quirks);e.cost<0&&s<0&&(l=!0,a="Locked (Balance)",c="average")}else e.cost>0&&!g(e)&&(l=!0,a="Locked",c="average");return(0,r.jsx)(o.wn,{title:e.name,mb:1,buttons:(0,r.jsx)(o.$n,{color:c,content:a,disabled:l,onClick:function(){return j(e)},fluid:!0}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Description",children:e.desc}),(0,r.jsx)(o.Ki.Item,{label:"Effect",children:(0,r.jsx)(o.az,{color:i,bold:!0,children:t})})]})},e.name)})]})};return(0,r.jsx)(a.p8,{width:750,height:550,theme:"ntos",children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,basis:500,children:(0,r.jsx)(o.wn,{title:"Available Quirks",fill:!0,scrollable:!0,children:(0,r.jsxs)(o.BJ,{vertical:!0,children:[b(d.all_quirks.filter(function(e){return e.cost<0}),"Negative Quirks (Add Points)","green","minus-circle"),b(d.all_quirks.filter(function(e){return e.cost>0}),"Positive Quirks (Cost Points)","bad","plus-circle")]})})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.cG,{vertical:!0})}),(0,r.jsx)(o.BJ.Item,{basis:250,children:(0,r.jsxs)(o.BJ,{vertical:!0,fill:!0,children:[(0,r.jsx)(o.wn,{title:"Balance",children:(0,r.jsx)(o.az,{bold:!0,color:x>=0?"good":"bad",fontSize:"18px",children:x})}),(0,r.jsx)(o.wn,{title:"Selected Quirks",fill:!0,scrollable:!0,children:h.length?h.map(function(e){var n=d.all_quirks.find(function(n){return n.name===e});if(!n)return null;var t=n.cost>0?"-".concat(n.cost):"+".concat(Math.abs(n.cost)),i=n.cost>0?"var(--color-bad)":"var(--color-good)";return(0,r.jsx)(o.az,{mb:.5,p:.5,style:{borderLeft:"3px solid ".concat(i)},children:(0,r.jsxs)(o.BJ,{justify:"space-between",children:[(0,r.jsx)(o.az,{bold:!0,children:e}),(0,r.jsx)(o.az,{children:t})]})},e)}):(0,r.jsx)(o.az,{italic:!0,children:"No quirks selected."})})]})})]})})})}},7076:function(e,n,t){"use strict";t.r(n),t.d(n,{RCD:()=>s});var r=t(8138);t(4530);var i=t(7790),o=t(2864),l=t(3384),a=t(2723),c=t(4744),s=function(){return(0,r.jsxs)(l.p8,{width:480,height:670,children:[(0,r.jsx)(c.ComplexModal,{}),(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsx)(h,{}),(0,r.jsx)(m,{})]})})]})},u=function(){var e=(0,o.Oc)().data,n=e.matter,t=e.max_matter,l=.7*t,a=.25*t;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Matter Storage",children:(0,r.jsx)(i.z2,{ranges:{good:[l,1/0],average:[a,l],bad:[-1/0,a]},value:n,maxValue:t,children:(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:"".concat(n," / ").concat(t," units")})})})})},d=function(){return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Construction Type",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(f,{mode_type:"Floors and Walls"}),(0,r.jsx)(f,{mode_type:"Airlocks"}),(0,r.jsx)(f,{mode_type:"Windows"}),(0,r.jsx)(f,{mode_type:"Deconstruction"})]})})})},f=function(e){var n=e.mode_type,t=(0,o.Oc)(),l=t.act,a=t.data.mode;return(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",content:n,selected:+(a===n),onClick:function(){return l("mode",{mode:n})}})})},h=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.door_name,a=t.electrochromic,s=t.airlock_glass;return(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Airlock Settings",children:(0,r.jsxs)(i.BJ,{textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,r.jsxs)(r.Fragment,{children:["Rename: ",(0,r.jsx)("b",{children:l})]}),onClick:function(){return(0,c.modalOpen)("renameAirlock")}})}),(0,r.jsx)(i.BJ.Item,{children:1===s&&(0,r.jsx)(i.$n,{fluid:!0,icon:a?"toggle-on":"toggle-off",content:"Electrochromic",selected:a,onClick:function(){return n("electrochromic")}})})]})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.tab,c=t.locked,s=t.one_access,u=t.selected_accesses,d=t.regions;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.tU,{fluid:!0,children:[(0,r.jsx)(i.tU.Tab,{icon:"cog",selected:1===l,onClick:function(){return n("set_tab",{tab:1})},children:"Airlock Types"}),(0,r.jsx)(i.tU.Tab,{selected:2===l,icon:"list",onClick:function(){return n("set_tab",{tab:2})},children:"Airlock Access"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:1===l?(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Types",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:0})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(p,{check_number:1})})]})}):2===l&&c?(0,r.jsx)(i.wn,{fill:!0,title:"Access",buttons:(0,r.jsx)(i.$n,{icon:"lock-open",content:"Unlock",onClick:function(){return n("set_lock",{new_lock:"unlock"})}}),children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"lock",size:5,mb:3}),(0,r.jsx)("br",{}),"Airlock access selection is currently locked."]})})}):(0,r.jsx)(a.AccessList,{sectionButtons:(0,r.jsx)(i.$n,{icon:"lock",content:"Lock",onClick:function(){return n("set_lock",{new_lock:"lock"})}}),usedByRcd:1,rcdButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n.Checkbox,{checked:s,content:"One",onClick:function(){return n("set_one_access",{access:"one"})}}),(0,r.jsx)(i.$n.Checkbox,{checked:!s,width:4,content:"All",onClick:function(){return n("set_one_access",{access:"all"})}})]}),accesses:d,selectedList:u,accessMod:function(e){return n("set",{access:e})},grantAll:function(){return n("grant_all")},denyAll:function(){return n("clear_all")},grantDep:function(e){return n("grant_region",{region:e})},denyDep:function(e){return n("deny_region",{region:e})},grantableList:[]})})]})},p=function(e){var n=e.check_number,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.door_types_ui_list,s=a.door_type,u=c.filter(function(e,t){return t%2===n});return(0,r.jsx)(i.BJ.Item,{children:u.map(function(e,n){return(0,r.jsx)(i.BJ,{mb:.5,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,selected:s===e.type,content:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(e.image),style:{verticalAlign:"middle",width:"32px",margin:"3px",marginRight:"6px",marginLeft:"-3px"}}),e.name]}),onClick:function(){return l("door_type",{door_type:e.type})}})})},n)})})}},1703:function(e,n,t){"use strict";t.r(n),t.d(n,{RPD:()=>s});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=t(7946),c=t(3384),s=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.mainmenu,s=o.mode;return(0,r.jsx)(c.p8,{width:550,height:440,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:a.map(function(e){return(0,r.jsx)(i.tU.Tab,{icon:e.icon,selected:e.mode===s,onClick:function(){return t("mode",{mode:e.mode})},children:e.category},e.category)})})}),function(e){switch(e){case 1:return(0,r.jsx)(u,{});case 2:return(0,r.jsx)(d,{});case 3:return(0,r.jsx)(h,{});case 4:return(0,r.jsx)(m,{});case 5:return(0,r.jsx)(p,{});case 6:return(0,r.jsx)(x,{});default:return"WE SHOULDN'T BE HERE!"}}(s)]})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.pipemenu,u=c.pipe_category,d=c.pipelist,h=c.whatpipe,m=c.iconrotation;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.tU,{fluid:!0,children:s.map(function(e){return(0,r.jsx)(i.tU.Tab,{textAlign:"center",selected:e.pipemode===u,onClick:function(){return t("pipe_category",{pipe_category:e.pipemode})},children:e.category},e.category)})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.pd,{fluid:!0,placeholder:"Enter pipe label",onChange:function(e){return t("set_label",{set_label:e})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:d.filter(function(e){return 1===e.pipe_type}).filter(function(e){return e.pipe_category===u}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===h,onClick:function(){return t("whatpipe",{whatpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),d.filter(function(e){return 1===e.pipe_type&&e.pipe_id===h&&1!==e.orientations}).map(function(e){return(0,r.jsx)(i.az,{children:e.bendy?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","southwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})})]}),(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northeast-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","northwest-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===m,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]})},e.pipe_id)})]})})})})]})})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatdpipe,d=c.iconrotation;return c.auto_wrench_toggle,(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 2===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatdpipe",{whatdpipe:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 2===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})},f=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.iconrotation,c=o.auto_wrench_toggle;return(0,r.jsxs)(i.BJ,{mb:1,textAlign:"center",children:[(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Auto-orientation",selected:0===a,onClick:function(){return t("iconrotation",{iconrotation:0})}})}),(0,r.jsx)(i.BJ.Item,{basis:"50%",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:c,content:"Auto-anchor",onClick:function(){return t("auto_wrench_toggle")}})})]})},h=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"sync-alt",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to rotate loose pipes..."]})})})})},m=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"arrows-alt-h",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to flip loose pipes..."]})})})})},p=function(e){return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",children:[(0,r.jsx)(i.In,{name:"recycle",size:5,color:"gray",mb:5}),(0,r.jsx)("br",{}),"Device ready to eat loose pipes..."]})})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.pipe_category;var s=c.pipelist,u=c.whatttube,d=c.iconrotation;return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsx)(a.xA.Column,{children:s.filter(function(e){return 3===e.pipe_type}).map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:e.pipe_name,icon:"cog",selected:e.pipe_id===u,onClick:function(){return t("whatttube",{whatttube:e.pipe_id})},style:{marginBottom:"2px"}})},e.pipe_name)})})})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"50%",children:(0,r.jsx)(i.wn,{fill:!0,children:(0,r.jsx)(a.xA,{children:(0,r.jsxs)(a.xA.Column,{children:[(0,r.jsx)(f,{}),s.filter(function(e){return 3===e.pipe_type&&e.pipe_id===u&&1!==e.orientations}).map(function(e){return(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:1===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","north-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:1})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:4===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","east-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:4})},style:{marginBottom:"5px"}})})]}),4===e.orientations&&(0,r.jsxs)(a.xA,{children:[(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:2===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","south-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:2})},style:{marginBottom:"5px"}})}),(0,r.jsx)(a.xA.Column,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",selected:8===d,content:(0,r.jsx)(i.az,{className:(0,o.Ly)(["rpd32x32","west-".concat(e.pipe_icon)])}),onClick:function(){return t("iconrotation",{iconrotation:8})},style:{marginBottom:"5px"}})})]})]},e.pipe_id)})]})})})})]})})}},8930:function(e,n,t){"use strict";t.r(n),t.d(n,{Radio:()=>u});var r=t(8138),i=t(8587),o=t(7790),l=t(6859),a=t(2864),c=t(421),s=t(3384),u=function(e){var n=(0,a.Oc)(),t=n.act,u=n.data,d=u.freqlock,f=u.frequency,h=u.minFrequency,m=u.maxFrequency,p=u.canReset,x=u.listening,g=u.broadcasting,j=u.loudspeaker,b=u.has_loudspeaker,y=u.ichannels,v=u.schannels,w=c.Fo.find(function(e){return e.freq===f}),k=!!w&&!!w.name,_=[];c.Fo.forEach(function(e){_[e.name]=e.color});var C=(0,i.Tj)(v,function(e,n){return{name:n,status:!!e}}),I=(0,i.Tj)(y,function(e,n){return{name:n,freq:e}});return(0,r.jsx)(s.p8,{width:375,height:130+21.2*C.length+11*I.length,children:(0,r.jsx)(s.p8.Content,{scrollable:!0,children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsxs)(o.Ki.Item,{label:"Frequency",children:[d&&(0,r.jsx)(o.az,{inline:!0,color:"light-gray",children:(0,l.Mg)(f/10,1)+" kHz"})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.Q7,{animated:!0,unit:"kHz",step:.2,stepPixelSize:10,minValue:h/10,maxValue:m/10,value:f/10,format:function(e){return(0,l.Mg)(e,1)},onChange:function(e){return t("frequency",{adjust:e-f/10})}}),(0,r.jsx)(o.$n,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return t("frequency",{tune:"reset"})}})]}),k&&w&&(0,r.jsxs)(o.az,{inline:!0,color:w.color,ml:2,children:["[",w.name,"]"]})]}),(0,r.jsxs)(o.Ki.Item,{label:"Audio",children:[(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:x?"volume-up":"volume-mute",selected:x,color:x?"":"bad",tooltip:x?"Disable Incoming":"Enable Incoming",onClick:function(){return t("listen")}}),(0,r.jsx)(o.$n,{textAlign:"center",width:"37px",icon:g?"microphone":"microphone-slash",selected:g,tooltip:g?"Disable Hotmic":"Enable Hotmic",onClick:function(){return t("broadcast")}}),!!b&&(0,r.jsx)(o.$n,{ml:1,icon:"bullhorn",selected:j,content:"Loudspeaker",tooltip:j?"Disable Loudspeaker":"Enable Loudspeaker",onClick:function(){return t("loudspeaker")}})]}),0!==v.length&&(0,r.jsx)(o.Ki.Item,{label:"Keyed Channels",children:C.map(function(e){return(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.$n,{icon:e.status?"check-square-o":"square-o",selected:e.status,content:"",onClick:function(){return t("channel",{channel:e.name})}}),(0,r.jsx)(o.az,{inline:!0,color:_[e.name],children:e.name})]},e.name)})}),0!==I.length&&(0,r.jsx)(o.Ki.Item,{label:"Standard Channel",children:I.map(function(e){return(0,r.jsx)(o.$n,{icon:"arrow-right",content:e.name,selected:k&&w&&w.name===e.name,onClick:function(){return t("ichannel",{ichannel:e.freq})}},"i_"+e.name)})})]})})})})}},4097:function(e,n,t){"use strict";t.r(n),t.d(n,{RankedListInputModal:()=>h});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(1942),s=t(9472);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:null;if(null!==a){var i=function(e){if(Array.isArray(e))return u(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||f(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i.splice(a,1)[0];null===r?i.push(o):i.splice(r,0,o),t(i),c(null),e.stopPropagation()}};return(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,onDrop:function(e){return m(e)},onDragOver:h,children:(0,r.jsx)(o.XI,{children:n.map(function(e,n){return(0,r.jsx)(o.XI.Row,{style:{padding:"8px"},draggable:!0,onDragStart:function(){return s(n)},onDragOver:h,onDrop:function(e){return m(e,n)},children:(0,r.jsx)(o.$n,{fluid:!0,py:"0.25rem",color:"transparent",style:{animation:"none",transition:"none",cursor:"move"},icon:"grip-lines",children:e.replace(/^\w/,function(e){return e.toUpperCase()})})},n)})})})}},4087:function(e,n,t){"use strict";t.r(n),t.d(n,{ReactorMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),C=(t=Math).max.apply(t,[1].concat(function(e){if(Array.isArray(e))return s(e)}(n=_.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:500,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Power Generation",children:(0,r.jsx)(i.z2,{value:x,minValue:0,maxValue:2e3,ranges:x<=1e4?{good:[400,1/0],average:[200,400],bad:[-1/0,200]}:{good:[-1/0,1/0]},children:(0,o.Mg)(x<1e4?x:x/1e3)+(x<1e4?" KW":" MW")})}),(0,r.jsx)(i.Ki.Item,{label:"Reactivity Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:u(g),minValue:0,maxValue:u(1e4),ranges:{teal:[-1/0,u(80)],good:[u(80),u(373)],average:[u(373),u(1e3)],bad:[u(1e3),1/0]},children:(0,o.Mg)(g)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:u(j),minValue:0,maxValue:u(5e4),ranges:{good:[u(1),u(1e3)],average:[-1/0,u(3e3)],bad:[u(3e3),1/0]},children:(0,o.Mg)(j)+" kPa"})}),(0,r.jsx)(i.Ki.Item,{label:"Control Rod Limiter",children:(0,r.jsx)(i.z2,{value:y,minValue:0,maxValue:100,ranges:{teal:[100,1/0],good:[70,99],average:[30,70],bad:[-1/0,30]},children:(0,o.Mg)(y)+" %"})})]}),(0,r.jsx)(i.wn,{title:"Desired Control Rod Limit",textAlign:"center",children:(0,r.jsx)(i.N6,{size:5,value:v,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:2,onChange:function(e,n){return f("set_throttle",{NGCR_throttle:n})}})})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"power-off",content:m?"Vent Open":"Vent Closed",selected:m,onClick:function(){return f("toggle_vent")}}),children:(0,r.jsx)(i.Ki,{children:_.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:C,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})})})]})})})}},1876:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentGrinder:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(3013),c=t(6696),s=function(e){var n=(0,o.Oc)(),t=(n.act,n.data),a=n.config,s=t.operating,h=a.title;return(0,r.jsx)(l.p8,{width:400,height:565,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(c.Operating,{operating:s,name:h}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(u,{})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})}),(0,r.jsx)(i.BJ.Item,{height:"30%",children:(0,r.jsx)(f,{})})]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.inactive;return(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"mortar-pestle",disabled:l,tooltip:l?"There are no contents":"Grind the contents",tooltipPosition:"bottom",content:"Grind",onClick:function(){return t("grind")}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"blender",disabled:l,tooltip:l?"There are no contents":"Juice the contents",tooltipPosition:"bottom",content:"Juice",onClick:function(){return t("juice")}})})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.contents,c=l.limit,s=l.count,u=l.inactive;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Contents",buttons:(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",c," items"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Eject Contents",onClick:function(){return t("eject")},disabled:u,tooltip:u?"There are no contents":""})]}),children:(0,r.jsx)(i.XI,{className:"Ingredient__Table",children:a.map(function(e){return(0,r.jsxs)(i.XI.Row,{tr:5,children:[(0,r.jsx)("td",{children:(0,r.jsx)(i.XI.Cell,{bold:!0,children:e.name})}),(0,r.jsx)("td",{children:(0,r.jsxs)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:[e.amount," ",e.units]})})]},e.name)})})})},f=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,c=l.beaker_loaded,s=l.beaker_current_volume,u=l.beaker_max_volume,d=l.beaker_contents;return(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Beaker",buttons:!!c&&(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.az,{inline:!0,color:"label",mr:2,children:[s," / ",u," units"]}),(0,r.jsx)(i.$n,{icon:"eject",content:"Detach Beaker",onClick:function(){return t("detach")}})]}),children:(0,r.jsx)(a.BeakerContents,{beakerLoaded:c,beakerContents:d})})}},1569:function(e,n,t){"use strict";t.r(n),t.d(n,{ReagentsEditor:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(9298),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.on;return(0,r.jsx)(l.p8,{width:300,height:165,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Receiver",children:(0,r.jsx)(i.$n,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return t("recv_power")}})})}),(0,r.jsx)(a.Signaler,{data:c})]})})})}},5297:function(e,n,t){"use strict";t.r(n),t.d(n,{RequestConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){var e=(0,o.Oc)().data,n=e.screen,t=e.announcementConsole;return(0,r.jsx)(l.p8,{width:450,height:t?430:385,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:function(e){switch(e){case 0:return(0,r.jsx)(u,{});case 1:return(0,r.jsx)(d,{purpose:"ASSISTANCE"});case 2:return(0,r.jsx)(d,{purpose:"SUPPLIES"});case 3:return(0,r.jsx)(d,{purpose:"INFO"});case 4:return(0,r.jsx)(f,{type:"SUCCESS"});case 5:return(0,r.jsx)(f,{type:"FAIL"});case 6:return(0,r.jsx)(h,{type:"MESSAGES"});case 7:return(0,r.jsx)(m,{});case 8:return(0,r.jsx)(p,{});case 9:return(0,r.jsx)(x,{});case 10:return(0,r.jsx)(h,{type:"SHIPPING"});case 11:return(0,r.jsx)(g,{});default:return"WE SHOULDN'T BE HERE!"}}(n)})})})},c=function(e){var n=(0,o.Oc)().act,t=e.text,l=e.icon,a=e.screen;return(0,r.jsx)(i.$n,{fluid:!0,lineHeight:3,icon:l,onClick:function(){return n("setScreen",{setScreen:a})},children:t})},s=function(){var e=(0,o.Oc)().act;return(0,r.jsx)(i.$n,{icon:"arrow-left",onClick:function(){return e("setScreen",{setScreen:0})},children:"Back"})},u=function(){var e,n=(0,o.Oc)(),t=n.act,l=n.data,a=l.newmessagepriority,s=l.announcementConsole,u=l.silent;return e=3===a?(0,r.jsx)(i.Z8,{children:(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"NEW PRIORITY MESSAGES"})}):a>0?(0,r.jsx)(i.az,{color:"red",bold:!0,mb:1,children:"There are new messages"}):(0,r.jsx)(i.az,{color:"label",mb:1,children:"There are no new messages"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,r.jsx)(i.$n,{width:9,selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return t("toggleSilent")},children:u?"Speaker Off":"Speaker On"}),children:[e,(0,r.jsx)(i.az,{children:(0,r.jsx)(c,{icon:a>0?"envelope-open-text":"envelope",screen:6,text:"View Messages"})}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"hand-paper",screen:1,text:"Request Assistance"}),(0,r.jsx)(c,{icon:"box",screen:2,text:"Request Supplies"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:11,text:"Request Secondary Goal"}),(0,r.jsx)(c,{icon:"comment",screen:3,text:"Relay Anonymous Information"})]}),(0,r.jsxs)(i.az,{mt:1,children:[(0,r.jsx)(c,{icon:"tag",screen:9,text:"Print Shipping Label"}),(0,r.jsx)(c,{icon:"clipboard-list",screen:10,text:"View Shipping Logs"})]}),!!s&&(0,r.jsx)(i.az,{mt:1,children:(0,r.jsx)(c,{icon:"bullhorn",screen:8,text:"Send Station-Wide Announcement"})})]})})},d=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data,c=a.department,u=a.assist_dept,d=a.supply_dept,f=a.info_dept,h=[];switch(e.purpose){case"ASSISTANCE":h=u,n="Request assistance from another department";break;case"SUPPLIES":h=d,n="Request supplies from another department";break;case"INFO":h=f,n="Relay information to another department"}return(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:(0,r.jsx)(i.Ki,{children:h.filter(function(e){return e!==c}).map(function(e){return(0,r.jsxs)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:[(0,r.jsx)(i.$n,{icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:2})},children:"Message"}),(0,r.jsx)(i.$n,{icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:3})},children:"High Priority"})]},e)})})})})},f=function(e){var n;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Unable to contact messaging server"}return(0,r.jsx)(i.wn,{fill:!0,title:n,buttons:(0,r.jsx)(s,{})})},h=function(e){var n,t=(0,o.Oc)(),l=(t.act,t.data),a=l.message_log,c=l.shipping_log,u=[];switch(e.type){case"MESSAGES":u=a,n="Message Log";break;case"SHIPPING":u=c,n="Shipping label print log"}return u.reverse(),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:n,buttons:(0,r.jsx)(s,{}),children:u.map(function(e,n){return(0,r.jsxs)(i.az,{textAlign:"left",children:[e.map(function(e,n){return(0,r.jsx)("div",{children:e},n)}),(0,r.jsx)("hr",{})]},n)})})})},m=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.recipient,a=t.message,c=t.msgVerified,u=t.msgStamped;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,r.jsx)(s,{}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Recipient",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Message",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",color:"green",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Stamped by",color:"blue",children:u})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,textAlign:"center",icon:"envelope",onClick:function(){return n("department",{department:l})},children:"Send Message"})})})]})},p=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.message,a=t.announceAuth;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(i.$n,{icon:"edit",onClick:function(){return n("writeAnnouncement")},children:"Edit Message"})]}),children:l})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"bullhorn",disabled:!(a&&l),onClick:function(){return n("sendAnnouncement")},children:"Send Announcement"})]})})]})},x=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.shipDest,a=t.msgVerified,c=t.ship_dept;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{textAlign:"center",children:(0,r.jsxs)(i.wn,{title:"Print Shipping Label",buttons:(0,r.jsx)(s,{}),children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Destination",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Validated by",children:a})]}),(0,r.jsx)(i.$n,{fluid:!0,mt:1,textAlign:"center",icon:"print",disabled:!(l&&a),onClick:function(){return n("printLabel")},children:"Print Label"})]})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Destinations",children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:e,textAlign:"right",className:"candystripe",children:(0,r.jsx)(i.$n,{selected:l===e,onClick:function(){return n("shipSelect",{shipSelect:e})},children:l===e?"Selected":"Select"})},e)})})})})]})},g=function(){var e=(0,o.Oc)(),n=e.act,t=e.data,l=t.secondaryGoalAuth,a=t.secondaryGoalEnabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,r.jsx)(s,{})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsxs)(i.wn,{children:[a?l?(0,r.jsx)(i.az,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,r.jsx)(i.az,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,r.jsx)(i.$n,{fluid:!0,mt:2,textAlign:"center",icon:"clipboard-list",disabled:!(l&&a),onClick:function(){return n("requestSecondaryGoal")},children:"Request Secondary Goal"})]})})]})}},4384:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>c,RndBackupConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.network_name,u=a.has_disk,d=a.disk_name,f=a.linked,h=a.techs,m=a.last_timestamp;return(0,r.jsx)(l.p8,{width:900,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Device Info",children:[(0,r.jsx)(i.az,{mb:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Current Network",children:f?(0,r.jsx)(i.$n,{content:s,icon:"unlink",selected:1,onClick:function(){return t("unlink")}}):"None"}),(0,r.jsx)(i.Ki.Item,{label:"Loaded Disk",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:d+" (Last backup: "+m+")",icon:"save",selected:1,onClick:function(){return t("eject_disk")}}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Save all",onClick:function(){return t("saveall2disk")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load all",onClick:function(){return t("saveall2network")}})]}):"None"})]})}),!!f||(0,r.jsx)(c,{})]}),(0,r.jsx)(i.az,{mt:2,children:(0,r.jsx)(i.wn,{title:"Tech Info",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Tech Name"}),(0,r.jsx)(i.XI.Cell,{children:"Network Level"}),(0,r.jsx)(i.XI.Cell,{children:"Disk Level"}),(0,r.jsx)(i.XI.Cell,{children:"Actions"})]}),Object.keys(h).map(function(e){return!(h[e].network_level>0||h[e].disk_level>0)||(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:h[e].name}),(0,r.jsx)(i.XI.Cell,{children:h[e].network_level||"None"}),(0,r.jsx)(i.XI.Cell,{children:h[e].disk_level||"None"}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Load to network",disabled:!u||!f,onClick:function(){return t("savetech2network",{tech:e})}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Load to disk",disabled:!u||!f,onClick:function(){return t("savetech2disk",{tech:e})}})]})]},e)})]})})})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})}},4080:function(e,n,t){"use strict";t.r(n),t.d(n,{AnalyzerMenu:()=>a});var r=t(8138),i=t(7790),o=t(5490),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.data,o=n.act,a=t.tech_levels,s=t.loaded_item,u=t.linked_analyzer,d=t.can_discover;return u?s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Object Analysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Deconstruct",icon:"microscope",onClick:function(){o("deconstruct")}}),(0,r.jsx)(i.$n,{content:"Eject",icon:"eject",onClick:function(){o("eject_item")}}),!d||(0,r.jsx)(i.$n,{content:"Discover",icon:"atom",onClick:function(){o("discover")}})]}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name})})}),(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.XI,{id:"research-levels",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Research Field"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Current Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"Object Level"}),(0,r.jsx)(i.XI.Cell,{header:!0,children:"New Level"})]}),a.map(function(e){return(0,r.jsx)(c,{techLevel:e},e.id)})]})})]}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,r.jsx)(i.wn,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})},c=function(e){var n=e.techLevel,t=n.name,l=n.desc,a=n.level,c=n.object_level,s=n.ui_icon,u=null!=c,d=u&&c>=a?Math.max(c,a+1):a;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"circle-info",tooltip:l})}),(0,r.jsxs)(i.XI.Cell,{children:[(0,r.jsx)(i.In,{name:s})," ",t]}),(0,r.jsx)(i.XI.Cell,{children:a}),u?(0,r.jsx)(i.XI.Cell,{children:c}):(0,r.jsx)(i.XI.Cell,{className:"research-level-no-effect",children:"-"}),(0,r.jsx)(i.XI.Cell,{className:(0,o.Ly)([d!==a&&"upgraded-level"]),children:d})]})}},9529:function(e,n,t){"use strict";t.r(n),t.d(n,{DataDiskMenu:()=>d});var r=t(8138),i=t(7790),o=t(2864),l="tech",a=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;return a?(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:a.name}),(0,r.jsx)(i.Ki.Item,{label:"Level",children:a.level}),(0,r.jsx)(i.Ki.Item,{label:"Description",children:a.desc})]}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_tech")}})})]}):null},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.disk_data;if(!a)return null;var c=a.name,s=a.lathe_types,u=a.materials,d=s.join(", ");return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:c}),d?(0,r.jsx)(i.Ki.Item,{label:"Lathe Types",children:d}):null,(0,r.jsx)(i.Ki.Item,{label:"Required Materials"})]}),u.map(function(e){return(0,r.jsxs)(i.az,{children:["- ",(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:e.name})," x ",e.amount]},e.name)}),(0,r.jsx)(i.az,{mt:"10px",children:(0,r.jsx)(i.$n,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return l("updt_design")}})})]})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.disk_data;return(0,r.jsx)(i.wn,function(e){for(var n=1;na});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=function(e){var n=(0,o.Oc)(),t=n.data,a=n.act,c=t.category,s=t.matching_designs,u=4===t.menu?"build":"imprint";return(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,height:36,title:c,children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(i.XI,{className:"RndConsole__LatheCategory__MatchingDesigns",children:s.map(function(e){var n=e.id,t=e.name,o=e.can_build,l=e.materials;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{icon:"print",content:t,disabled:o<1,onClick:function(){return a(u,{id:n,amount:1})}})}),(0,r.jsx)(i.XI.Cell,{children:o>=5?(0,r.jsx)(i.$n,{content:"x5",onClick:function(){return a(u,{id:n,amount:5})}}):null}),(0,r.jsx)(i.XI.Cell,{children:o>=10?(0,r.jsx)(i.$n,{content:"x10",onClick:function(){return a(u,{id:n,amount:10})}}):null}),(0,r.jsx)(i.XI.Cell,{children:l.map(function(e){return(0,r.jsxs)(r.Fragment,{children:[" | ",(0,r.jsxs)("span",{className:e.is_red?"color-red":null,children:[e.amount," ",e.name]})]})})})]},n)})})]})}},4154:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheChemicalStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_chemicals,c=4===t.menu;return(0,r.jsxs)(i.wn,{title:"Chemical Storage",children:[(0,r.jsx)(i.$n,{content:"Purge All",icon:"trash",onClick:function(){l(c?"disposeallP":"disposeallI")}}),(0,r.jsx)(i.Ki,{children:a.map(function(e){var n=e.volume,t=e.name,o=e.id;return(0,r.jsx)(i.Ki.Item,{label:"* ".concat(n," of ").concat(t),children:(0,r.jsx)(i.$n,{content:"Purge",icon:"trash",onClick:function(){l(c?"disposeP":"disposeI",{id:o})}})},o)})})]})}},8563:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMainMenu:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(5887),a=t(6013),c=function(e){var n=(0,o.Oc)(),t=n.data,c=n.act,s=t.menu,u=t.categories;return(0,r.jsxs)(i.wn,{title:(4===s?"Protolathe":"Circuit Imprinter")+" Menu",children:[(0,r.jsx)(l.LatheMaterials,{}),(0,r.jsx)(a.LatheSearch,{}),(0,r.jsx)(i.cG,{}),(0,r.jsx)(i.so,{wrap:"wrap",children:u.map(function(e){return(0,r.jsx)(i.so,{style:{flexBasis:"50%",marginBottom:"6px"},children:(0,r.jsx)(i.$n,{icon:"arrow-right",content:e,onClick:function(){c("setCategory",{category:e})}})},e)})})]})}},7635:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterialStorage:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.loaded_materials;return(0,r.jsx)(i.wn,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,r.jsx)(i.XI,{children:a.map(function(e){var n=e.id,o=e.amount,a=e.name,c=function(e){l(4===t.menu?"lathe_ejectsheet":"imprinter_ejectsheet",{id:n,amount:e})},s=Math.floor(o/2e3),u=o<1;return(0,r.jsxs)(i.XI.Row,{className:u?"color-grey":"color-yellow",children:[(0,r.jsxs)(i.XI.Cell,{minWidth:"210px",children:["* ",o," of ",a]}),(0,r.jsxs)(i.XI.Cell,{minWidth:"110px",children:["(",s," sheet",1===s?"":"s",")"]}),(0,r.jsx)(i.XI.Cell,{children:o>=2e3?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"1x",icon:"eject",onClick:function(){return c(1)}}),(0,r.jsx)(i.$n,{content:"C",icon:"eject",onClick:function(){return c("custom")}}),o>=1e4?(0,r.jsx)(i.$n,{content:"5x",icon:"eject",onClick:function(){return c(5)}}):null,(0,r.jsx)(i.$n,{content:"All",icon:"eject",onClick:function(){return c(50)}})]}):null})]},n)})})})}},5887:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMaterials:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().data,t=n.total_materials,l=n.max_materials,a=n.max_chemicals,c=n.total_chemicals;return(0,r.jsx)(i.az,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,r.jsxs)(i.XI,{width:"auto",children:[(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Material Amount:"}),(0,r.jsx)(i.XI.Cell,{children:t}),l?(0,r.jsx)(i.XI.Cell,{children:" / "+l}):null]}),(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{bold:!0,children:"Chemical Amount:"}),(0,r.jsx)(i.XI.Cell,{children:c}),a?(0,r.jsx)(i.XI.Cell,{children:" / "+a}):null]})]})})}},9760:function(e,n,t){"use strict";t.r(n),t.d(n,{LatheMenu:()=>p});var r=t(8138),i=t(7790),o=t(2864),l=t(2247),a=t(1465),c=t(4154),s=t(8563),u=t(7635);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)().act;return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.pd,{placeholder:"Search...",onEnter:function(e){return n("search",{to_search:e})}})})}},7726:function(e,n,t){"use strict";t.r(n),t.d(n,{LinkMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.controllers;return(0,r.jsx)(l.p8,{width:800,height:550,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{title:"Setup Linkage",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),a.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("linktonetworkcontroller",{target_controller:e.addr})}})})]},e.addr)})]})})})})}},3321:function(e,n,t){"use strict";t.r(n),t.d(n,{SettingsMenu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(a,{}),(0,r.jsx)(c,{})]})},a=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data;l.sync;var a=l.admin;return(0,r.jsx)(i.wn,{title:"Settings",children:(0,r.jsxs)(i.so,{direction:"column",align:"flex-start",children:[(0,r.jsx)(i.$n,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){t("unlink")}}),1===a?(0,r.jsx)(i.$n,{icon:"gears",color:"red",content:"[ADMIN] Maximize research levels",onClick:function(){return t("maxresearch")}}):null]})})},c=function(e){var n=(0,o.Oc)(),t=n.data,l=n.act,a=t.linked_analyzer,c=t.linked_lathe,s=t.linked_imprinter;return(0,r.jsx)(i.wn,{title:"Linked Devices",buttons:(0,r.jsx)(i.$n,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return l("find_device")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Scientific Analyzer",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!a,content:a?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"analyze"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Protolathe",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!c,content:c?"Unlink":"Undetected",onClick:function(){l("disconnect",{item:"lathe"})}})}),(0,r.jsx)(i.Ki.Item,{label:"Circuit Imprinter",children:(0,r.jsx)(i.$n,{icon:"unlink",disabled:!s,content:s?"Unlink":"Undetected",onClick:function(){return l("disconnect",{item:"imprinter"})}})})]})})}},2247:function(e,n,t){"use strict";t.r(n),t.d(n,{MENU:()=>h,PRINTER_MENU:()=>m,RndConsole:()=>g});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4080),c=t(9529),s=t(9760),u=t(7726),d=t(3321),f=i.tU.Tab,h={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},m={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},p=function(e){switch(e){case h.MAIN:return(0,r.jsx)(b,{});case h.DISK:return(0,r.jsx)(c.DataDiskMenu,{});case h.ANALYZE:return(0,r.jsx)(a.AnalyzerMenu,{});case h.LATHE:case h.IMPRINTER:return(0,r.jsx)(s.LatheMenu,{});case h.SETTINGS:return(0,r.jsx)(d.SettingsMenu,{});default:return"UNKNOWN MENU"}},x=function(e){var n=(0,o.Oc)(),t=n.act,i=n.data.menu,l=e.menu,a=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["menu"]);return(0,r.jsx)(f,function(e){for(var n=1;nd});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t-1});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.wn,{title:"Network Configuration",children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Network Name",children:(0,r.jsx)(o.$n,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){return t("network_name")}})}),(0,r.jsx)(o.Ki.Item,{label:"Network Password",children:(0,r.jsx)(o.$n,{content:f||"Unset",selected:f,icon:"lock",onClick:function(){return t("network_password")}})})]})}),(0,r.jsxs)(o.wn,{title:"Connected Devices",children:[(0,r.jsxs)(o.tU,{children:[(0,r.jsx)(o.tU.Tab,{selected:"ALL"===s,onClick:function(){return d("ALL")},icon:"network-wired",children:"All Devices"},"AllDevices"),(0,r.jsx)(o.tU.Tab,{selected:"SRV"===s,onClick:function(){return d("SRV")},icon:"server",children:"R&D Servers"},"RNDServers"),(0,r.jsx)(o.tU.Tab,{selected:"RDC"===s,onClick:function(){return d("RDC")},icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,r.jsx)(o.tU.Tab,{selected:"MFB"===s,onClick:function(){return d("MFB")},icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,r.jsx)(o.tU.Tab,{selected:"MSC"===s,onClick:function(){return d("MSC")},icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,r.jsxs)(o.XI,{m:"0.5rem",children:[(0,r.jsxs)(o.XI.Row,{header:!0,children:[(0,r.jsx)(o.XI.Cell,{children:"Device Name"}),(0,r.jsx)(o.XI.Cell,{children:"Device ID"}),(0,r.jsx)(o.XI.Cell,{children:"Unlink"})]}),x.map(function(e){return(0,r.jsxs)(o.XI.Row,{children:[(0,r.jsx)(o.XI.Cell,{children:e.name}),(0,r.jsx)(o.XI.Cell,{children:e.id}),(0,r.jsx)(o.XI.Cell,{children:(0,r.jsx)(o.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink_device",{dclass:e.dclass,uid:e.id})}})})]},e.id)})]})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,c=n.data.designs,s=u((0,i.useState)(""),2),d=s[0],f=s[1];return(0,r.jsxs)(o.wn,{title:"Design Management",children:[(0,r.jsx)(o.pd,{fluid:!0,placeholder:"Search for designs",mb:2,onChange:function(e){return f(e)}}),c.filter((0,l.XZ)(d,function(e){return e.name})).map(function(e){return(0,r.jsx)(o.$n.Checkbox,{fluid:!0,content:e.name,checked:!e.blacklisted,onClick:function(){return t(e.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:e.uid})}},e.name)})]})}},5156:function(e,n,t){"use strict";t.r(n),t.d(n,{RndServer:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.active,d=a.network_name;return(0,r.jsx)(l.p8,{width:600,height:500,resizable:!0,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Server Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine power",children:(0,r.jsx)(i.$n,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link status",children:null===d?(0,r.jsx)(i.az,{color:"red",children:"Unlinked"}):(0,r.jsx)(i.az,{color:"green",children:"Linked"})})]})}),null===d?(0,r.jsx)(s,{}):(0,r.jsx)(c,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.network_name;return(0,r.jsx)(i.wn,{title:"Network Info",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Connected network ID",children:l}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.controllers;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.netname}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},7868:function(e,n,t){"use strict";t.r(n),t.d(n,{RobotSelfDiagnosis:()=>s});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(3384),c=function(e,n){var t=e/n;return t<=.2?"good":t<=.5?"average":"bad"},s=function(e){var n=(0,l.Oc)().data.component_data;return(0,r.jsx)(a.p8,{width:280,height:480,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:n.map(function(e,n){return(0,r.jsx)(i.wn,{title:(0,o.ZH)(e.name),children:e.installed<=0?(0,r.jsx)(i.IC,{m:-.5,height:3.5,color:"red",style:{fontStyle:"normal"},children:(0,r.jsx)(i.so,{height:"100%",children:(0,r.jsx)(i.so.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,r.jsxs)(i.so,{children:[(0,r.jsx)(i.so.Item,{width:"72%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",color:c(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",color:c(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,r.jsx)(i.so.Item,{width:"50%",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,r.jsx)(i.Ki.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},n)})})})}},1696:function(e,n,t){"use strict";t.r(n),t.d(n,{RoboticsControlConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.can_hack,u=a.safety,d=a.show_lock_all,f=a.cyborgs;return(0,r.jsx)(l.p8,{width:500,height:460,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[!!d&&(0,r.jsxs)(i.wn,{title:"Emergency Lock Down",children:[(0,r.jsx)(i.$n,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return t("arm",{})}}),(0,r.jsx)(i.$n,{icon:"lock",disabled:u,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){return t("masslock",{})}})]}),(0,r.jsx)(c,{cyborgs:void 0===f?[]:f,can_hack:s})]})})},c=function(e){var n=e.cyborgs;e.can_hack;var t=(0,o.Oc)(),l=t.act,a=t.data,c="Detonate";return(a.detonate_cooldown>0&&(c+=" ("+a.detonate_cooldown+"s)"),n.length)?n.map(function(e){return(0,r.jsx)(i.wn,{title:e.name,buttons:(0,r.jsxs)(r.Fragment,{children:[!!e.hackable&&!e.emagged&&(0,r.jsx)(i.$n,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return l("hackbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!a.auth,onClick:function(){return l("stopbot",{uid:e.uid})}}),(0,r.jsx)(i.$n.Confirm,{icon:"bomb",content:c,disabled:!a.auth||a.detonate_cooldown>0,color:"bad",onClick:function(){return l("killbot",{uid:e.uid})}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.az,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,r.jsx)(i.Ki.Item,{label:"Location",children:(0,r.jsx)(i.az,{children:e.locstring})}),(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cell Charge",children:(0,r.jsx)(i.z2,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,r.jsx)(i.Ki.Item,{label:"Cell Capacity",children:(0,r.jsx)(i.az,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})]})||(0,r.jsx)(i.Ki.Item,{label:"Cell",children:(0,r.jsx)(i.az,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,r.jsx)(i.Ki.Item,{label:"Safeties",children:(0,r.jsx)(i.az,{color:"bad",children:"DISABLED"})}),(0,r.jsx)(i.Ki.Item,{label:"Module",children:e.module}),(0,r.jsx)(i.Ki.Item,{label:"Master AI",children:(0,r.jsx)(i.az,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)}):(0,r.jsx)(i.IC,{children:"No cyborg units detected within access parameters."})}},5826:function(e,n,t){"use strict";t.r(n),t.d(n,{Safe:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=(n.act,n.data),i=t.dial,c=t.open;return t.locked,t.contents,(0,r.jsx)(a.p8,{theme:"safe",width:600,height:800,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsxs)(o.az,{className:"Safe--engraving",children:[(0,r.jsx)(s,{}),(0,r.jsxs)(o.az,{children:[(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"25%"}),(0,r.jsx)(o.az,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,r.jsx)(o.In,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,r.jsx)("br",{}),c?(0,r.jsx)(u,{}):(0,r.jsx)(o.az,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*i+"deg)",zIndex:0}})]}),!c&&(0,r.jsx)(d,{})]})})},s=function(e){var n=(0,l.Oc)(),t=n.act,i=n.data,a=i.dial,c=i.open,s=i.locked,u=function(e,n){return(0,r.jsx)(o.$n,{disabled:c||n&&!s,icon:"arrow-"+(n?"right":"left"),content:(n?"Right":"Left")+" "+e,iconRight:n,onClick:function(){return t(n?"turnleft":"turnright",{num:e})},style:{zIndex:10}})};return(0,r.jsxs)(o.az,{className:"Safe--dialer",children:[(0,r.jsx)(o.$n,{disabled:s,icon:c?"lock":"lock-open",content:c?"Close":"Open",mb:"0.5rem",onClick:function(){return t("open")}}),(0,r.jsx)("br",{}),(0,r.jsx)(o.az,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,r.jsx)(o.az,{className:"Safe--dialer--number",children:a})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.contents;return(0,r.jsx)(o.az,{className:"Safe--contents",overflow:"auto",children:a.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsxs)(o.$n,{mb:"0.5rem",onClick:function(){return t("retrieve",{index:n+1})},children:[(0,r.jsx)(o.az,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,r.jsx)("br",{})]},e)})})},d=function(e){return(0,r.jsxs)(o.wn,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,r.jsxs)(o.az,{children:["1. Turn the dial left to the first number.",(0,r.jsx)("br",{}),"2. Turn the dial right to the second number.",(0,r.jsx)("br",{}),"3. Continue repeating this process for each number, switching between left and right each time.",(0,r.jsx)("br",{}),"4. Open the safe."]}),(0,r.jsx)(o.az,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},1892:function(e,n,t){"use strict";t.r(n),t.d(n,{SatelliteControl:()=>u,SatelliteControlFooter:()=>h,SatelliteControlMapView:()=>f,SatelliteControlSatellitesList:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(7946),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=d?"good":"average",value:u,maxValue:100,children:[u,"%"]})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{content:"Check coverage",disabled:f,onClick:function(){return t("begin_test")}})})]})})}),(0,r.jsx)(o.BJ.Item,{color:c,children:a})]})}},7943:function(e,n,t){"use strict";t.r(n),t.d(n,{SecureStorage:()=>s});var r=t(8138),i=t(7790),o=t(7686),l=t(5490),a=t(2864),c=t(3384),s=function(e){return(0,r.jsx)(c.p8,{theme:"securestorage",height:500,width:280,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(d,{})})})})})},u=function(e){var n=(0,a.Oc)().act,t=window.event?e.which:e.keyCode;if(t===o.Ri){e.preventDefault(),n("keypad",{digit:"E"});return}if(t===o.s6){e.preventDefault(),n("keypad",{digit:"C"});return}if(t===o.ye){e.preventDefault(),n("backspace");return}if(t>=o.Pm&&t<=o.Wy){e.preventDefault(),n("keypad",{digit:t-o.Pm});return}if(t>=o.hr&&t<=o.C){e.preventDefault(),n("keypad",{digit:t-o.hr});return}},d=function(e){var n=(0,a.Oc)(),t=(n.act,n.data),o=t.locked,c=t.no_passcode,s=t.emagged,d=t.user_entered_code;return(0,r.jsx)(i.wn,{fill:!0,className:"SecureStorage",onKeyDown:function(e){return u(e)},children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{height:7.3,children:(0,r.jsx)(i.az,{className:(0,l.Ly)(["SecureStorage__displayBox","SecureStorage__displayBox--"+(c?"":o?"bad":"good")]),height:"100%",children:s?"ERROR":d})}),(0,r.jsx)(i.BJ.Item,{align:"center",children:(0,r.jsx)(i.XI,{collapsing:!0,children:[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]].map(function(e){return(0,r.jsx)(i.XI.Row,{children:e.map(function(e){return(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(f,{number:e})},e)})},e[0])})})})]})})},f=function(e){var n=(0,a.Oc)(),t=n.act;n.data;var o=e.number;return(0,r.jsx)(i.$n,{bold:!0,fluid:!0,textAlign:"center",fontSize:"55px",lineHeight:1.25,width:"80px",className:(0,l.Ly)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+o]),onClick:function(){return t("keypad",{digit:o})},children:o})}},8589:function(e,n,t){"use strict";t.r(n),t.d(n,{SecurityRecords:()=>g});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384),s=t(4744),u=t(7352),d=t(736),f=t(2264),h=t(7482);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tf});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=t(4744);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=n},r=function(e,n){return e<=n},i=e.split(" "),o=[],l=!0,a=!1,c=void 0;try{for(var s,u=i[Symbol.iterator]();!(l=(s=u.next()).done);l=!0){var d=function(){var e=s.value.split(":");if(0===e.length)return"continue";if(1===e.length)return o.push(function(n){return(n.name+" ("+n.variant+")").toLocaleLowerCase().includes(e[0].toLocaleLowerCase())}),"continue";if(e.length>2)return{v:function(e){return!1}};var i=void 0,l=n;if("-"===e[1][e[1].length-1]?(l=r,i=Number(e[1].substring(0,e[1].length-1))):"+"===e[1][e[1].length-1]?(l=t,i=Number(e[1].substring(0,e[1].length-1))):i=Number(e[1]),isNaN(i))return{v:function(e){return!1}};switch(e[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":o.push(function(e){return l(e.lifespan,i)});break;case"e":case"end":case"endurance":o.push(function(e){return l(e.endurance,i)});break;case"m":case"mat":case"maturation":o.push(function(e){return l(e.maturation,i)});break;case"pr":case"prod":case"production":o.push(function(e){return l(e.production,i)});break;case"y":case"yield":o.push(function(e){return l(e.yield,i)});break;case"po":case"pot":case"potency":o.push(function(e){return l(e.potency,i)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":o.push(function(e){return l(e.amount,i)});break;default:return{v:function(e){return!1}}}}();if("object"==(d&&"undefined"!=typeof Symbol&&d.constructor===Symbol?"symbol":typeof d))return d.v}}catch(e){a=!0,c=e}finally{try{l||null==u.return||u.return()}finally{if(a)throw c}}return function(e){var n=!0,t=!1,r=void 0;try{for(var i,l=o[Symbol.iterator]();!(n=(i=l.next()).done);n=!0)if(!(0,i.value)(e))return!1}catch(e){t=!0,r=e}finally{try{n||null==l.return||l.return()}finally{if(t)throw r}}return!0}},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=(0,i.useContext)(d),s=c.searchTextState,f=c.vendAmountState,m=c.sortIdState,x=c.sortOrderState,g=u(s,2),j=g[0];g[1];var b=u(f,2),y=b[0];b[1];var v=u(m,2),w=v[0];v[1];var k=u(x,2),_=k[0];k[1];var C=a.icons,I=a.seeds;return(0,r.jsx)(o.BJ.Item,{grow:!0,mt:.5,children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:(0,r.jsxs)(o.XI,{className:"SeedExtractor__list",children:[(0,r.jsxs)(o.XI.Row,{bold:!0,children:[(0,r.jsx)(p,{id:"name",children:"Name"}),(0,r.jsx)(p,{id:"lifespan",children:"Lifespan"}),(0,r.jsx)(p,{id:"endurance",children:"Endurance"}),(0,r.jsx)(p,{id:"maturation",children:"Maturation"}),(0,r.jsx)(p,{id:"production",children:"Production"}),(0,r.jsx)(p,{id:"yield",children:"Yield"}),(0,r.jsx)(p,{id:"potency",children:"Potency"}),(0,r.jsx)(p,{id:"amount",children:"Stock"})]}),0===I.length?"No seeds present.":I.filter(h(j)).sort(function(e,n){var t=_?1:-1;return"number"==typeof e[w]?(e[w]-n[w])*t:e[w].localeCompare(n[w])*t}).map(function(e){return(0,r.jsxs)(o.XI.Row,{onClick:function(){return t("vend",{seed_id:e.id,seed_variant:e.variant,vend_amount:y})},children:[(0,r.jsxs)(o.XI.Cell,{children:[(0,r.jsx)("img",{src:"data:image/jpeg;base64,".concat(C[e.image]),style:{verticalAlign:"middle",width:"32px",margin:"0px"}}),e.name]}),(0,r.jsx)(o.XI.Cell,{children:e.lifespan}),(0,r.jsx)(o.XI.Cell,{children:e.endurance}),(0,r.jsx)(o.XI.Cell,{children:e.maturation}),(0,r.jsx)(o.XI.Cell,{children:e.production}),(0,r.jsx)(o.XI.Cell,{children:e.yield}),(0,r.jsx)(o.XI.Cell,{children:e.potency}),(0,r.jsx)(o.XI.Cell,{children:e.amount})]},e.id)})]})})})},p=function(e){var n=(0,i.useContext)(d),t=n.sortIdState,l=n.sortOrderState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1],p=e.id,x=e.children;return(0,r.jsx)(o.XI.Cell,{children:(0,r.jsxs)(o.$n,{color:c!==p&&"transparent",fluid:!0,onClick:function(){c===p?m(!h):(s(p),m(!0))},children:[x,c===p&&(0,r.jsx)(o.In,{name:h?"sort-up":"sort-down",ml:"0.25rem;"})]})})},x=function(e){var n=(0,i.useContext)(d),t=n.searchTextState,l=n.vendAmountState,a=u(t,2),c=a[0],s=a[1],f=u(l,2),h=f[0],m=f[1];return(0,r.jsxs)(o.BJ,{fill:!0,children:[(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.pd,{placeholder:"Search by name, variant, potency:70+, production:3-, ...",fluid:!0,onChange:function(e){return s(e)},value:c})}),(0,r.jsxs)(o.BJ.Item,{children:["Vend amount:",(0,r.jsx)(o.pd,{placeholder:"1",onChange:function(e){return m(Number(e)>=1?Number(e):1)},value:"".concat(h)})]})]})}},631:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleConsole:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{width:350,height:150,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:a.status?a.status:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Missing"})}),!!a.shuttle&&(!!a.docking_ports_len&&(0,r.jsx)(i.Ki.Item,{label:"Send to ",children:a.docking_ports.map(function(e){return(0,r.jsx)(i.$n,{icon:"chevron-right",content:e.name,onClick:function(){return t("move",{move:e.id})}},e.name)})})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",color:"red",children:(0,r.jsx)(i.IC,{color:"red",children:"Shuttle Locked"})}),!!a.admin_controlled&&(0,r.jsx)(i.Ki.Item,{label:"Authorization",children:(0,r.jsx)(i.$n,{icon:"exclamation-circle",content:"Request Authorization",disabled:!a.status,onClick:function(){return t("request")}})})]}))]})})})})}},5060:function(e,n,t){"use strict";t.r(n),t.d(n,{ShuttleManipulator:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tc});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)();return 0===(n.act,n.data).active?(0,r.jsx)(s,{}):(0,r.jsx)(u,{})},s=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.singularities;return(0,r.jsx)(a.p8,{width:450,height:185,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{fill:!0,title:"Detected Singularities",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Refresh",onClick:function(){return t("refresh")}}),children:(0,r.jsx)(i.XI,{children:(void 0===c?[]:c).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.singularity_id+". "+e.area_name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,width:"120px",children:(0,r.jsx)(i.z2,{value:e.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(e.stage)})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.$n,{content:"Details",onClick:function(){return t("view",{view:e.singularity_id})}})})]},e.singularity_id)})})})})})},u=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;c.active;var s=c.singulo_stage,u=c.singulo_potential_stage,d=c.singulo_energy,f=c.singulo_high,h=c.singulo_low,m=c.generators;return(0,r.jsx)(a.p8,{width:550,height:185,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Stage",children:(0,r.jsx)(i.z2,{value:s,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.Mg)(s)})}),(0,r.jsx)(i.Ki.Item,{label:"Potential Stage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:6,ranges:{good:[1,s+.5],average:[s+.5,s+1.5],bad:[s+1.5,s+2]},children:(0,o.Mg)(u)})}),(0,r.jsx)(i.Ki.Item,{label:"Energy",children:(0,r.jsx)(i.z2,{value:d,minValue:h,maxValue:f,ranges:{good:[.67*f+.33*h,f],average:[.33*f+.67*h,.67*f+.33*h],bad:[h,.33*f+.67*h]},children:(0,o.Mg)(d)+"MJ"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return t("back")}}),children:(0,r.jsx)(i.Ki,{children:(void 0===m?[]:m).map(function(e){return(0,r.jsx)(i.Ki.Item,{label:"Remaining Charge",children:(0,r.jsx)(i.z2,{value:e.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.Mg)(e.charge)})},e.gen_index)})})})})]})})})}},1495:function(e,n,t){"use strict";t.r(n),t.d(n,{Sleeper:()=>f});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],u={average:[.25,.5],bad:[.5,1/0]},d=["bad","average","average","good","average","average","bad"],f=function(e){var n=(0,l.Oc)(),t=(n.act,n.data).hasOccupant?(0,r.jsx)(h,{}):(0,r.jsx)(j,{});return(0,r.jsx)(a.p8,{width:550,height:760,children:(0,r.jsx)(a.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:t}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(x,{})})]})})})},h=function(e){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{}),(0,r.jsx)(p,{}),(0,r.jsx)(g,{})]})},m=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,s=a.occupant,u=a.auto_eject_dead;return(0,r.jsx)(i.wn,{title:"Occupant",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{color:"label",inline:!0,children:"Auto-eject if dead:\xa0"}),(0,r.jsx)(i.$n,{icon:u?"toggle-on":"toggle-off",selected:u,content:u?"On":"Off",onClick:function(){return t("auto_eject_dead_"+(u?"off":"on"))}}),(0,r.jsx)(i.$n,{icon:"user-slash",content:"Eject",onClick:function(){return t("ejectify")}})]}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Name",children:s.name}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{minValue:0,maxValue:s.maxHealth,value:s.health,ranges:{good:[.5*s.maxHealth,1/0],average:[0,.5*s.maxHealth],bad:[-1/0,0]},children:(0,o.LI)(s.health,0)})}),(0,r.jsx)(i.Ki.Item,{label:"Status",color:c[s.stat][0],children:c[s.stat][1]}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.maxTemp,value:s.bodyTemperature,color:d[s.temperatureSuitability+3],children:[(0,o.LI)(s.btCelsius,0),"\xb0C, ",(0,o.LI)(s.btFaren,0),"\xb0F"]})}),!!s.hasBlood&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ki.Item,{label:"Blood Level",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s.bloodMax,value:s.bloodLevel,ranges:{bad:[-1/0,.6*s.bloodMax],average:[.6*s.bloodMax,.9*s.bloodMax],good:[.9*s.bloodMax,1/0]},children:[s.bloodPercent,"%, ",s.bloodLevel,"cl"]})}),(0,r.jsxs)(i.Ki.Item,{label:"Pulse",verticalAlign:"middle",children:[s.pulse," BPM"]})]})]})})},p=function(e){var n=(0,l.Oc)().data.occupant;return(0,r.jsx)(i.wn,{title:"Occupant Damage",children:(0,r.jsx)(i.Ki,{children:s.map(function(e,t){var l=n[e[1]],a="number"==typeof l?l:0;return(0,r.jsx)(i.Ki.Item,{label:e[0],children:(0,r.jsx)(i.z2,{minValue:0,maxValue:100,value:a,ranges:u,children:(0,o.LI)(a,0)},t)},t)})})})},x=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.hasOccupant,c=o.isBeakerLoaded,s=o.beakerMaxSpace,u=o.beakerFreeSpace,d=o.dialysis&&u>0;return(0,r.jsx)(i.wn,{title:"Dialysis",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{disabled:!c||u<=0||!a,selected:d,icon:d?"toggle-on":"toggle-off",content:d?"Active":"Inactive",onClick:function(){return t("togglefilter")}}),(0,r.jsx)(i.$n,{disabled:!c,icon:"eject",content:"Eject",onClick:function(){return t("removebeaker")}})]}),children:c?(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Remaining Space",children:(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:u,ranges:{good:[.5*s,1/0],average:[.25*s,.5*s],bad:[-1/0,.25*s]},children:[u,"u"]})})}):(0,r.jsx)(i.az,{color:"label",children:"No beaker loaded."})})},g=function(e){var n=(0,l.Oc)(),t=n.act,o=n.data,a=o.occupant,c=o.chemicals,s=o.maxchem,u=o.amounts;return(0,r.jsx)(i.wn,{title:"Occupant Chemicals",children:c.map(function(e,n){var o,l="";return e.overdosing?(l="bad",o=(0,r.jsxs)(i.az,{color:"bad",children:[(0,r.jsx)(i.In,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(l="average",o=(0,r.jsxs)(i.az,{color:"average",children:[(0,r.jsx)(i.In,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,r.jsx)(i.az,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,r.jsx)(i.wn,{title:e.title,buttons:o,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.z2,{minValue:0,maxValue:s,value:e.occ_amount,color:l,mr:"0.5rem",children:[e.pretty_amount,"/",s,"u"]}),u.map(function(n,o){return(0,r.jsx)(i.$n,{disabled:!e.injectable||e.occ_amount+n>s||2===a.stat,icon:"syringe",content:"Inject ".concat(n,"u"),mb:"0",height:"19px",onClick:function(){return t("chemical",{chemid:e.id,amount:n})}},o)})]})})},n)})})},j=function(e){return(0,r.jsx)(i.wn,{fill:!0,textAlign:"center",children:(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:"user-slash",mb:"0.5rem",size:5}),(0,r.jsx)("br",{}),"No occupant detected."]})})})}},6526:function(e,n,t){"use strict";t.r(n),t.d(n,{SlotMachine:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return null===c.money?(0,r.jsx)(l.p8,{width:350,height:90,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:"Could not scan your card or could not find account!"}),(0,r.jsx)(i.az,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===c.plays?c.plays+" player has tried their luck today!":c.plays+" players have tried their luck today!",(0,r.jsx)(l.p8,{width:300,height:151,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{lineHeight:2,children:n}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Credits Remaining",children:(0,r.jsx)(i.zv,{value:c.money})}),(0,r.jsx)(i.Ki.Item,{label:"10 credits to spin",children:(0,r.jsx)(i.$n,{icon:"coins",disabled:c.working,content:c.working?"Spinning...":"Spin",onClick:function(){return a("spin")}})})]}),(0,r.jsx)(i.az,{bold:!0,lineHeight:2,color:c.resultlvl,children:c.result})]})})}))}},1645:function(e,n,t){"use strict";t.r(n),t.d(n,{Smartfridge:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.secure,s=a.can_dry,u=a.drying,d=a.contents;return(0,r.jsx)(l.p8,{width:500,height:500,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!c&&(0,r.jsx)(i.IC,{children:"Secure Access: Please have your identification ready."}),(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s?"Drying rack":"Contents",buttons:!!s&&(0,r.jsx)(i.$n,{width:4,icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return t("drying")}}),children:[!d&&(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,r.jsxs)(i.In.Stack,{children:[(0,r.jsx)(i.In,{name:"cookie-bite",size:5,color:"brown"}),(0,r.jsx)(i.In,{name:"slash",size:5,color:"red"})]}),(0,r.jsx)("br",{}),"No products loaded."]})}),!!d&&d.slice().sort(function(e,n){return e.display_name.localeCompare(n.display_name)}).map(function(e){return(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:"55%",children:e.display_name}),(0,r.jsxs)(i.BJ.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,r.jsxs)(i.BJ.Item,{width:13,children:[(0,r.jsx)(i.$n,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return t("vend",{index:e.vend,amount:1})}}),(0,r.jsx)(i.Q7,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(n){return t("vend",{index:e.vend,amount:n})}}),(0,r.jsx)(i.$n,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){return t("vend",{index:e.vend,amount:e.quantity})}})]})]},e)})]})]})})})}},1399:function(e,n,t){"use strict";t.r(n),t.d(n,{Smes:()=>c});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,s=c.capacityPercent,u=(c.capacity,c.charge),d=c.inputAttempt,f=c.inputting,h=c.inputLevel,m=c.inputLevelMax,p=c.inputAvailable,x=c.outputPowernet,g=c.outputAttempt,j=c.outputting,b=c.outputLevel,y=c.outputLevelMax,v=c.outputUsed,w=s>=100&&"good"||f&&"average"||"bad";return(0,r.jsx)(a.p8,{width:340,height:360,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.wn,{title:"Stored Energy",children:(0,r.jsx)(i.z2,{value:.01*s,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,r.jsx)(i.wn,{title:"Input",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Charge Mode",buttons:(0,r.jsx)(i.$n,{icon:d?"sync-alt":"times",selected:d,onClick:function(){return t("tryinput")},children:d?"Auto":"Off"}),children:(0,r.jsx)(i.az,{color:w,children:s>=100&&"Fully Charged"||f&&"Charging"||"Not Charging"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Input",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===h,onClick:function(){return t("input",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===h,onClick:function(){return t("input",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:h/1e3,fillValue:p/1e3,minValue:0,maxValue:m/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("input",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:h===m,onClick:function(){return t("input",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:h===m,onClick:function(){return t("input",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Available",children:(0,o.d5)(p)})]})}),(0,r.jsx)(i.wn,{fill:!0,title:"Output",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Output Mode",buttons:(0,r.jsx)(i.$n,{icon:g?"power-off":"times",selected:g,onClick:function(){return t("tryoutput")},children:g?"On":"Off"}),children:(0,r.jsx)(i.az,{color:j&&"good"||u>0&&"average"||"bad",children:x?j?"Sending":u>0?"Not Sending":"No Charge":"Not Connected"})}),(0,r.jsx)(i.Ki.Item,{label:"Target Output",children:(0,r.jsxs)(i.BJ,{width:"100%",children:[(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:0===b,onClick:function(){return t("output",{target:"min"})}}),(0,r.jsx)(i.$n,{icon:"backward",disabled:0===b,onClick:function(){return t("output",{adjust:-1e4})}})]}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.Ap,{value:b/1e3,minValue:0,maxValue:y/1e3,step:5,stepPixelSize:4,format:function(e){return(0,o.d5)(1e3*e,1)},onChange:function(e,n){return t("output",{target:1e3*n})}})}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"forward",disabled:b===y,onClick:function(){return t("output",{adjust:1e4})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:b===y,onClick:function(){return t("output",{target:"max"})}})]})]})}),(0,r.jsx)(i.Ki.Item,{label:"Outputting",children:(0,o.d5)(v)})]})})]})})})}},1343:function(e,n,t){"use strict";t.r(n),t.d(n,{SolarControl:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(7946),a=t(3384),c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data,s=c.generated,u=c.generated_ratio,d=c.tracking_state,f=c.tracking_rate,h=c.connected_panels,m=c.connected_tracker,p=c.cdir,x=c.direction,g=c.rotating_direction;return(0,r.jsx)(a.p8,{width:490,height:277,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsx)(i.$n,{icon:"sync",content:"Scan for new hardware",onClick:function(){return t("refresh")}}),children:(0,r.jsxs)(l.xA,{children:[(0,r.jsx)(l.xA.Column,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Solar tracker",color:m?"good":"bad",children:m?"OK":"N/A"}),(0,r.jsx)(i.Ki.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,r.jsx)(l.xA.Column,{size:2,children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Power output",children:(0,r.jsx)(i.z2,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:u,children:s+" W"})}),(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[p,"\xb0 (",x,")"]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[2===d&&(0,r.jsx)(i.az,{children:" Automated "}),1===d&&(0,r.jsxs)(i.az,{children:[" ",f,"\xb0/h (",g,")"," "]}),0===d&&(0,r.jsx)(i.az,{children:" Tracker offline "})]})]})})]})}),(0,r.jsx)(i.wn,{title:"Controls",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Panel orientation",children:[2!==d&&(0,r.jsx)(i.Q7,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onChange:function(e){return t("cdir",{cdir:e})}}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker status",children:[(0,r.jsx)(i.$n,{icon:"times",content:"Off",selected:0===d,onClick:function(){return t("track",{track:0})}}),(0,r.jsx)(i.$n,{icon:"clock-o",content:"Timed",selected:1===d,onClick:function(){return t("track",{track:1})}}),(0,r.jsx)(i.$n,{icon:"sync",content:"Auto",selected:2===d,disabled:!m,onClick:function(){return t("track",{track:2})}})]}),(0,r.jsxs)(i.Ki.Item,{label:"Tracker rotation",children:[1===d&&(0,r.jsx)(i.Q7,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:f,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onChange:function(e){return t("tdir",{tdir:e})}}),0===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Tracker offline "}),2===d&&(0,r.jsx)(i.az,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},4263:function(e,n,t){"use strict";t.r(n),t.d(n,{SpawnersMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.spawners||[];return(0,r.jsx)(l.p8,{width:700,height:600,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(i.wn,{children:a.map(function(e){return(0,r.jsxs)(i.wn,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return t("jump",{ID:e.uids})}}),(0,r.jsx)(i.$n,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return t("spawn",{ID:e.uids})}})]}),children:[(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,r.jsx)(i.az,{style:{whiteSpace:"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)})})})})}},8729:function(e,n,t){"use strict";t.r(n),t.d(n,{SpecMenu:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return(0,r.jsx)(l.p8,{width:1100,height:600,theme:"nologo",children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(c,{}),(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("hemomancer")}}),children:[(0,r.jsx)("h3",{children:"Focuses on blood magic and the manipulation of blood around you."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Vampiric claws"}),": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood Barrier"}),": Unlocked at 250 blood, allows you to select two turfs and create a wall between them."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood tendrils"}),": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Sanguine pool"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Predator senses"}),": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood eruption"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"The blood bringers rite"}),": 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."]})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("umbrae")}}),children:[(0,r.jsx)("h3",{children:"Focuses on darkness, stealth ambushing and mobility."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Cloak of darkness"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow anchor"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Shadow snare"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Dark passage"}),": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Extinguish"}),": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms."]}),(0,r.jsx)("b",{children:"Shadow boxing"}),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Eternal darkness"}),": 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."]}),(0,r.jsx)("p",{children:"In addition, you also gain permanent X-ray vision."})]})})},u=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("gargantua")}}),children:[(0,r.jsx)("h3",{children:"Focuses on tenacity and melee damage."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rejuvenate"}),": Will heal you at an increased rate based on how much damage you have taken."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell"}),": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Seismic stomp"}),": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood rush"}),": Unlocked at 250 blood, gives you a short speed boost when cast."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood swell II"}),": Unlocked at 400 blood, increases all melee damage by 10."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Overwhelming force"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Demonic grasp"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Charge"}),": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Desecrated Duel"}),": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages."]})]})})},d=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.subclasses,(0,r.jsx)(i.BJ.Item,{grow:!0,basis:"25%",children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,r.jsx)(i.$n,{content:"Choose",onClick:function(){return t("dantalion")}}),children:[(0,r.jsx)("h3",{children:"Focuses on thralling and illusions."}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Enthrall"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall cap"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Thrall commune"}),": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Subspace swap"}),": Unlocked at 250 blood, allows you to swap positions with a target."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Pacify"}),": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Decoy"}),": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Rally thralls"}),": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Blood bond"}),": 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."]}),(0,r.jsxs)("p",{children:[(0,r.jsx)("b",{children:"Full Power"}),(0,r.jsx)(i.cG,{}),(0,r.jsx)("b",{children:"Mass Hysteria"}),": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals."]})]})})}},9469:function(e,n,t){"use strict";t.r(n),t.d(n,{StackCraft:()=>d});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=e&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:e*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:e})}}))}()}catch(e){u=!0,d=e}finally{try{s||null==h.return||h.return()}finally{if(u)throw d}}return -1===l.indexOf(i)&&c.push((0,r.jsx)(o.$n,{bold:!0,fontSize:.85,width:"32px",content:i*t.result_amount+"x",onClick:function(){return n("make",{recipe_uid:t.uid,multiplier:i})}})),(0,r.jsx)(r.Fragment,{children:c.map(function(e){return e})})},x=function(e){return Object.entries(e.recipes).map(function(e){var n=u(e,2),t=n[0],i=n[1];return m(i)?(0,r.jsx)(o.Nt,{title:t,child_mt:0,childStyles:{padding:"0.5em",backgroundColor:"rgba(62, 97, 137, 0.15)",border:"1px solid rgba(255, 255, 255, 0.1)",borderTop:"none",borderRadius:"0 0 0.33em 0.33em"},children:(0,r.jsx)(o.az,{p:1,pb:.25,children:(0,r.jsx)(x,{recipes:i})})},t):(0,r.jsx)(g,{title:t,recipe:i},t)})},g=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data.amount,l=e.title,c=e.recipe,s=c.result_amount,u=c.required_amount,d=c.max_result_amount,f=c.uid,h=c.icon,m=c.icon_state,x=c.image,g="".concat(s>1?"".concat(s,"x "):"").concat(l),j="".concat(u," sheet").concat(u>1?"s":""),b=c.required_amount>i?0:Math.floor(i/c.required_amount);return(0,r.jsx)(o.c_,{fluid:!0,base64:x,dmIcon:h,dmIconState:m,imageSize:32,disabled:!b,tooltip:j,buttons:d>1&&b>1&&(0,r.jsx)(p,{recipe:c,max_possible_multiplier:b}),onClick:function(){return t("make",{recipe_uid:f,multiplier:1})},children:g})}},5592:function(e,n,t){"use strict";t.r(n),t.d(n,{StationAlertConsole:()=>a,StationAlertConsoleContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(){return(0,r.jsx)(l.p8,{width:325,height:500,children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsx)(c,{})})})},c=function(e){var n=(0,o.Oc)().data.alarms||[],t=n.Fire||[],l=n.Atmosphere||[],a=n.Power||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.wn,{title:"Fire Alarms",children:(0,r.jsxs)("ul",{children:[0===t.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),t.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Atmospherics Alarms",children:(0,r.jsxs)("ul",{children:[0===l.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),l.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})}),(0,r.jsx)(i.wn,{title:"Power Alarms",children:(0,r.jsxs)("ul",{children:[0===a.length&&(0,r.jsx)("li",{className:"color-good",children:"Systems Nominal"}),a.map(function(e){return(0,r.jsx)("li",{className:"color-average",children:e},e)})]})})]})}},5651:function(e,n,t){"use strict";t.r(n),t.d(n,{StationTraitsPanel:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:f.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n,{color:"red",icon:"times",onClick:function(){t("setup_future_traits",{station_traits:(0,i.pb)((0,i.Tj)(f,function(e){return e.path}),function(n){return n!==e.path})})},children:"Delete"})})]})},e.path)})}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No station traits will run next round."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){return t("clear_future_traits")},children:"Run Station Traits Normally"})]}):(0,r.jsxs)(l.az,{textAlign:"center",children:[(0,r.jsx)(l.az,{children:"No future station traits are planned."}),(0,r.jsx)(l.$n,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){return t("setup_future_traits",{station_traits:[]})},children:"Prevent station traits from running next round"})]})]})},h=function(e){var n=(0,a.Oc)(),t=n.act,i=n.data;return i.current_traits.length>0?(0,r.jsx)(l.BJ,{vertical:!0,fill:!0,children:i.current_traits.map(function(e){return(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:e.name}),(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.$n.Confirm,{content:"Revert",color:"red",disabled:i.too_late_to_revert||!e.can_revert,tooltip:!e.can_revert&&"This trait is not revertable."||i.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){return t("revert",{ref:e.ref})}})})]})},e.ref)})}):(0,r.jsx)(l.az,{textAlign:"center",children:"There are no active station traits."})},m=function(e){var n,t=u((0,o.useState)(1),2),i=t[0],a=t[1];switch(i){case 0:n=(0,r.jsx)(f,{});break;case 1:n=(0,r.jsx)(h,{});break;default:throw Error("Unhandled case: ".concat(i))}return(0,r.jsx)(c.p8,{title:"Modify Station Traits",height:350,width:350,children:(0,r.jsx)(c.p8.Content,{scrollable:!0,children:(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.tU,{children:[(0,r.jsx)(l.tU.Tab,{icon:"eye",selected:1===i,onClick:function(){return a(1)},children:"View"}),(0,r.jsx)(l.tU.Tab,{icon:"edit",selected:0===i,onClick:function(){return a(0)},children:"Edit"})]})}),(0,r.jsxs)(l.BJ.Item,{m:0,children:[(0,r.jsx)(l.cG,{}),n]})]})})})}},5724:function(e,n,t){"use strict";t.r(n),t.d(n,{StripMenu:()=>x});var r=t(8138),i=t(8587),o=t(7790),l=t(8595),a=t(2864),c=t(3384),s=function(e){return 0===e?5:9},u="64px",d=function(e){return"".concat(e[0],"/").concat(e[1])},f=function(e){var n=e.align,t=e.children;return(0,r.jsx)(o.az,{style:{position:"absolute",left:"left"===n?"6px":"48px",textAlign:n,textShadow:"2px 2px 2px #000",top:"2px"},children:t})},h={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},m={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,4]),image:"inventory-pda.png"}},p={eyes:{displayName:"eyewear",gridSpot:d([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:d([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:d([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:d([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:d([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:d([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:d([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:d([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:d([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:d([1,4])},jumpsuit:{displayName:"uniform",gridSpot:d([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:d([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:d([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:d([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,r.jsx)(f,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:d([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,r.jsx)(f,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:d([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:d([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:d([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:d([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:d([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:d([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:d([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:d([4,8]),image:"inventory-pda.png"}},x=function(e){var n=(0,a.Oc)(),t=n.act,f=n.data,x=new Map;if(0===f.show_mode){var g=!0,j=!1,b=void 0;try{for(var y,v=Object.keys(f.items)[Symbol.iterator]();!(g=(y=v.next()).done);g=!0){var w=y.value;x.set(m[w].gridSpot,w)}}catch(e){j=!0,b=e}finally{try{g||null==v.return||v.return()}finally{if(j)throw b}}}else{var k=!0,_=!1,C=void 0;try{for(var I,S=Object.keys(f.items)[Symbol.iterator]();!(k=(I=S.next()).done);k=!0){var O=I.value;x.set(p[O].gridSpot,O)}}catch(e){_=!0,C=e}finally{try{k||null==S.return||S.return()}finally{if(_)throw C}}}return 0===x.size?(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,r.jsx)(o.BJ.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:"No slots"})})})}):(0,r.jsx)(c.p8,{title:"Stripping ".concat(f.name),width:64*s(f.show_mode)+6*(s(f.show_mode)+1),height:390,theme:"nologo",children:(0,r.jsx)(c.p8.Content,{style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},children:(0,r.jsx)(o.BJ,{fill:!0,vertical:!0,children:(0,i.y1)(0,5).map(function(e){return(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.BJ,{fill:!0,children:(0,i.y1)(0,s(f.show_mode)).map(function(n){var i,a,c,s=d([e,n]),p=x.get(s);if(!p)return(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u}},s);var g=f.items[p],j=m[p];return null===g?c=j.displayName:"name"in g?(a=(0,r.jsx)(o._V,{src:"data:image/jpeg;base64,".concat(g.icon),height:"100%",width:"100%",style:{imageRendering:"pixelated",verticalAlign:"middle"}}),c=g.name):"obscured"in g&&(a=(0,r.jsx)(o.In,{name:1===g.obscured?"ban":"eye-slash",size:3,ml:0,mt:2.5,color:"white",style:{textAlign:"center",height:"100%",width:"100%"}}),c="obscured ".concat(j.displayName)),null!==g&&"alternates"in g&&null!==g.alternates&&(i=g.alternates),(0,r.jsx)(o.BJ.Item,{style:{width:u,height:u},children:(0,r.jsxs)(o.az,{style:{position:"relative",width:"100%",height:"100%"},children:[(0,r.jsxs)(o.$n,{onClick:function(){t("use",{key:p})},fluid:!0,color:(null==g?void 0:g.interacting)?"average":null,tooltip:c,style:{position:"relative",width:"100%",height:"100%",padding:0,backgroundColor:(null==g?void 0:g.cantstrip)?"transparent":"none"},children:[j.image&&(0,r.jsx)(o._V,{src:(0,l.l)(j.image),opacity:.7,style:{position:"absolute",width:"32px",height:"32px",left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%) scale(2)"}}),(0,r.jsx)(o.az,{style:{position:"relative"},children:a}),j.additionalComponent]}),(0,r.jsx)(o.BJ,{direction:"row-reverse",children:void 0!==i&&i.map(function(e,n){var i=1.8*n;return(0,r.jsx)(o.BJ.Item,{width:"100%",children:(0,r.jsx)(o.$n,{onClick:function(){t("alt",{key:p,action_key:e})},tooltip:h[e].text,width:"1.8em",style:{background:"rgba(0, 0, 0, 0.6)",position:"absolute",bottom:0,right:"".concat(i,"em"),zIndex:2+n},children:(0,r.jsx)(o.In,{name:h[e].icon})})},n)})})]})},s)})})},e)})})})})}},2975:function(e,n,t){"use strict";t.r(n),t.d(n,{SuitStorage:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)().data.uv;return(0,r.jsx)(l.p8,{width:400,height:260,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[!!n&&(0,r.jsx)(i.Rr,{backgroundColor:"black",opacity:.85,children:(0,r.jsx)(i.BJ,{children:(0,r.jsxs)(i.BJ.Item,{bold:!0,textAlign:"center",mb:1,children:[(0,r.jsx)(i.In,{name:"spinner",spin:1,size:4,mb:4}),(0,r.jsx)("br",{}),"Disinfection of contents in progress..."]})})}),(0,r.jsx)(c,{}),(0,r.jsx)(u,{})]})})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.helmet,c=l.suit,u=l.magboots,d=l.mask,f=l.storage,h=l.open,m=l.locked;return(0,r.jsx)(i.wn,{fill:!0,title:"Stored Items",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:"Start Disinfection Cycle",icon:"radiation",textAlign:"center",onClick:function(){return t("cook")}}),(0,r.jsx)(i.$n,{content:m?"Unlock":"Lock",icon:m?"unlock":"lock",disabled:h,onClick:function(){return t("toggle_lock")}})]}),children:h&&!m?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(s,{object:a,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,r.jsx)(s,{object:c,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,r.jsx)(s,{object:u,label:"Boots",missingText:"boots",eject:"dispense_boots"}),(0,r.jsx)(s,{object:d,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,r.jsx)(s,{object:f,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,r.jsx)(i.BJ,{fill:!0,children:(0,r.jsxs)(i.BJ.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,r.jsx)(i.In,{name:m?"lock":"exclamation-circle",size:"5",mb:3}),(0,r.jsx)("br",{}),m?"The unit is locked.":"The unit is closed."]})})})},s=function(e){var n=(0,o.Oc)(),t=n.act;n.data;var l=e.object,a=e.label,c=e.missingText,s=e.eject;return(0,r.jsx)(i.Ki.Item,{label:a,children:(0,r.jsx)(i.az,{my:.5,children:l?(0,r.jsx)(i.$n,{my:-1,icon:"eject",content:l,onClick:function(){return t(s)}}):(0,r.jsxs)(i.az,{color:"silver",bold:!0,children:["No ",c," found."]})})})},u=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.open,c=l.locked;return(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.$n,{fluid:!0,content:a?"Close Suit Storage Unit":"Open Suit Storage Unit",icon:a?"times-circle":"expand",color:a?"red":"green",disabled:c,textAlign:"center",onClick:function(){return t("toggle_open")}})})}},4835:function(e,n,t){"use strict";t.r(n),t.d(n,{SupermatterMonitor:()=>u});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(421),c=t(3384);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=.01}).sort(function(e,n){return n.amount-e.amount}),k=(n=Math).max.apply(n,[1].concat(function(e){if(Array.isArray(e))return s(e)}(e=w.map(function(e){return e.portion}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return s(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return(0,r.jsx)(c.p8,{width:550,height:270,children:(0,r.jsx)(c.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:"270px",children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Metrics",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Integrity",children:(0,r.jsx)(i.z2,{value:h/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,r.jsx)(i.Ki.Item,{label:"Peak EER",children:(0,r.jsx)(i.z2,{value:p,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(p)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Nominal EER",children:(0,r.jsx)(i.z2,{value:m,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.Mg)(m)+" MeV/cm3"})}),(0,r.jsx)(i.Ki.Item,{label:"Gas Coefficient",children:(0,r.jsx)(i.z2,{value:b,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:b.toFixed(2)})}),(0,r.jsx)(i.Ki.Item,{label:"Temperature",children:(0,r.jsx)(i.z2,{value:d(x),minValue:0,maxValue:d(1e4),ranges:{teal:[-1/0,d(80)],good:[d(80),d(373)],average:[d(373),d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(x)+" K"})}),(0,r.jsx)(i.Ki.Item,{label:"Mole Per Tile",children:(0,r.jsx)(i.z2,{value:j,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.Mg)(j)+" mol"})}),(0,r.jsx)(i.Ki.Item,{label:"Pressure",children:(0,r.jsx)(i.z2,{value:d(g),minValue:0,maxValue:d(5e4),ranges:{good:[d(1),d(300)],average:[-1/0,d(1e3)],bad:[d(1e3),1/0]},children:(0,o.Mg)(g)+" kPa"})})]})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,basis:0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,r.jsx)(i.$n,{icon:"arrow-left",content:"Back",onClick:function(){return u("back")}}),children:(0,r.jsx)(i.Ki,{children:w.map(function(e){return(0,r.jsx)(i.Ki.Item,{label:(0,a.wM)(e.name,e.name),children:(0,r.jsx)(i.z2,{color:(0,a.b_)(e.name),value:e.portion,minValue:0,maxValue:k,children:(0,o.Mg)(e.amount)+" mol ("+e.portion+"%)"})},e.name)})})})})]})})})}},2266:function(e,n,t){"use strict";t.r(n),t.d(n,{SyndicateComputerSimple:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data;return(0,r.jsx)(l.p8,{theme:"syndicate",width:400,height:400,children:(0,r.jsx)(l.p8.Content,{children:a.rows.map(function(e){return(0,r.jsxs)(i.wn,{title:e.title,buttons:(0,r.jsx)(i.$n,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return t(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,r.jsx)(i.az,{children:e.bullets.map(function(e){return(0,r.jsx)(i.az,{children:e},e)})})]},e.title)})})})}},8073:function(e,n,t){"use strict";t.r(n),t.d(n,{TEG:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},c=function(e){var n=(0,o.Oc)(),t=n.act,c=n.data;return c.error?(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{title:"Error",children:[c.error,(0,r.jsx)(i.$n,{icon:"circle",content:"Recheck",onClick:function(){return t("check")}})]})})}):(0,r.jsx)(l.p8,{width:500,height:400,children:(0,r.jsxs)(l.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Cold Loop ("+c.cold_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Cold Inlet",children:[a(c.cold_inlet_temp)," K, ",a(c.cold_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Cold Outlet",children:[a(c.cold_outlet_temp)," K, ",a(c.cold_outlet_pressure)," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Hot Loop ("+c.hot_dir+")",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Hot Inlet",children:[a(c.hot_inlet_temp)," K, ",a(c.hot_inlet_pressure)," kPa"]}),(0,r.jsxs)(i.Ki.Item,{label:"Hot Outlet",children:[a(c.hot_outlet_temp)," K, ",a(c.hot_outlet_pressure)," kPa"]})]})}),(0,r.jsxs)(i.wn,{title:"Power Output",children:[a(c.output_power)," W",!!c.warning_switched&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,r.jsx)(i.az,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}},5808:function(e,n,t){"use strict";t.r(n),t.d(n,{TachyonArray:()=>a,TachyonArrayContent:()=>c});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,s=a.records,u=void 0===s?[]:s,d=a.explosion_target,f=a.toxins_tech,h=a.printing;return(0,r.jsx)(l.p8,{width:500,height:600,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Shift's Target",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Current Toxins Level",children:f}),(0,r.jsxs)(i.Ki.Item,{label:"Administration",children:[(0,r.jsx)(i.$n,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return t("print_logs")}}),(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return t("delete_logs")}})]})]})}),u.length?(0,r.jsx)(c,{}):(0,r.jsx)(i.IC,{children:"No Records"})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.wn,{title:"Logged Explosions",children:(0,r.jsx)(i.so,{children:(0,r.jsx)(i.so.Item,{children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Time"}),(0,r.jsx)(i.XI.Cell,{children:"Epicenter"}),(0,r.jsx)(i.XI.Cell,{children:"Actual Size"}),(0,r.jsx)(i.XI.Cell,{children:"Theoretical Size"})]}),(void 0===l?[]:l).map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.logged_time}),(0,r.jsx)(i.XI.Cell,{children:e.epicenter}),(0,r.jsx)(i.XI.Cell,{children:e.actual_size_message}),(0,r.jsx)(i.XI.Cell,{children:e.theoretical_size_message}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return t("delete_record",{index:e.index})}})})]},e.index)})]})})})})}},5125:function(e,n,t){"use strict";t.r(n),t.d(n,{Tank:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n,t=(0,o.Oc)(),a=t.act,c=t.data;return n=c.has_mask?(0,r.jsx)(i.Ki.Item,{label:"Mask",children:(0,r.jsx)(i.$n,{fluid:!0,width:"76%",icon:c.connected?"check":"times",content:c.connected?"Internals On":"Internals Off",selected:c.connected,onClick:function(){return a("internals")}})}):(0,r.jsx)(i.Ki.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,r.jsx)(l.p8,{width:325,height:135,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Tank Pressure",children:(0,r.jsx)(i.z2,{value:c.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:c.tankPressure+" kPa"})}),(0,r.jsxs)(i.Ki.Item,{label:"Release Pressure",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.ReleasePressure===c.minReleasePressure,tooltip:"Min",onClick:function(){return a("pressure",{pressure:"min"})}}),(0,r.jsx)(i.Q7,{animated:!0,value:parseFloat(c.releasePressure),width:"65px",unit:"kPa",minValue:c.minReleasePressure,maxValue:c.maxReleasePressure,onChange:function(e){return a("pressure",{pressure:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.ReleasePressure===c.maxReleasePressure,tooltip:"Max",onClick:function(){return a("pressure",{pressure:"max"})}}),(0,r.jsx)(i.$n,{icon:"undo",content:"",disabled:c.ReleasePressure===c.defaultReleasePressure,tooltip:"Reset",onClick:function(){return a("pressure",{pressure:"reset"})}})]}),n]})})})})}},7112:function(e,n,t){"use strict";t.r(n),t.d(n,{TankDispenser:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.o_tanks,s=a.p_tanks;return(0,r.jsx)(l.p8,{width:250,height:105,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{children:[(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:0===c,icon:"arrow-circle-down",onClick:function(){return t("oxygen")}})}),(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return t("plasma")}})})]})})})}},3283:function(e,n,t){"use strict";t.r(n),t.d(n,{TcommsCore:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,u=a.linked,d=a.active,f=a.network_id;return(0,r.jsx)(l.p8,{width:600,height:292,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{title:"Relay Configuration",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Machine Power",children:(0,r.jsx)(i.$n,{content:d?"On":"Off",selected:d,icon:"power-off",onClick:function(){return t("toggle_active")}})}),(0,r.jsx)(i.Ki.Item,{label:"Network ID",children:(0,r.jsx)(i.$n,{content:f||"Unset",selected:f,icon:"server",onClick:function(){return t("network_id")}})}),(0,r.jsx)(i.Ki.Item,{label:"Link Status",children:1===u?(0,r.jsx)(i.az,{color:"green",children:"Linked"}):(0,r.jsx)(i.az,{color:"red",children:"Unlinked"})})]})}),1===u?(0,r.jsx)(c,{}):(0,r.jsx)(s,{})]})})},c=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.linked_core_id,c=l.linked_core_addr,s=l.hidden_link;return(0,r.jsx)(i.wn,{title:"Link Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Linked Core ID",children:a}),(0,r.jsx)(i.Ki.Item,{label:"Linked Core Address",children:c}),(0,r.jsx)(i.Ki.Item,{label:"Hidden Link",children:(0,r.jsx)(i.$n,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){return t("toggle_hidden_link")}})}),(0,r.jsx)(i.Ki.Item,{label:"Unlink",children:(0,r.jsx)(i.$n,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return t("unlink")}})})]})})},s=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.cores;return(0,r.jsx)(i.wn,{title:"Detected Cores",children:(0,r.jsxs)(i.XI,{m:"0.5rem",children:[(0,r.jsxs)(i.XI.Row,{header:!0,children:[(0,r.jsx)(i.XI.Cell,{children:"Network Address"}),(0,r.jsx)(i.XI.Cell,{children:"Network ID"}),(0,r.jsx)(i.XI.Cell,{children:"Sector"}),(0,r.jsx)(i.XI.Cell,{children:"Link"})]}),l.map(function(e){return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{children:e.addr}),(0,r.jsx)(i.XI.Cell,{children:e.net_id}),(0,r.jsx)(i.XI.Cell,{children:e.sector}),(0,r.jsx)(i.XI.Cell,{children:(0,r.jsx)(i.$n,{content:"Link",icon:"link",onClick:function(){return t("link",{addr:e.addr})}})})]},e.addr)})]})})}},5605:function(e,n,t){"use strict";t.r(n),t.d(n,{Teleporter:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.targetsTeleport?a.targetsTeleport:{},s=a.calibrated,u=a.calibrating,d=a.powerstation,f=a.regime,h=a.teleporterhub,m=a.target,p=a.locked,x=a.adv_beacon_allowed,g=a.advanced_beacon_locking;return(0,r.jsx)(l.p8,{width:350,height:325,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsx)(i.BJ,{fill:!0,vertical:!0,children:(0,r.jsxs)(i.BJ.Item,{grow:!0,children:[(!d||!h)&&(0,r.jsxs)(i.wn,{fill:!0,title:"Error",children:[h,!d&&(0,r.jsx)(i.az,{color:"bad",children:" Powerstation not linked "}),d&&!h&&(0,r.jsx)(i.az,{color:"bad",children:" Teleporter hub not linked "})]}),d&&h&&(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:"Status",buttons:(0,r.jsx)(r.Fragment,{children:!!x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.az,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xa0"}),(0,r.jsx)(i.$n,{selected:g,icon:g?"toggle-on":"toggle-off",content:g?"Enabled":"Disabled",onClick:function(){return t("advanced_beacon_locking",{on:+!g})}})]})}),children:[(0,r.jsxs)(i.BJ,{mb:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,r.jsxs)(i.BJ.Item,{children:[0===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),1===f&&(0,r.jsx)(i.ms,{width:18.2,selected:m,disabled:u,options:Object.keys(c),color:"None"!==m?"default":"bad",onSelected:function(e){return t("settarget",{x:c[e].x,y:c[e].y,z:c[e].z,tptarget:c[e].pretarget})}}),2===f&&(0,r.jsx)(i.az,{children:m})]})]}),(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Regime:"}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:1===f?"good":null,onClick:function(){return t("setregime",{regime:1})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:0===f?"good":null,onClick:function(){return t("setregime",{regime:0})}})}),(0,r.jsx)(i.BJ.Item,{grow:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:2===f?"good":null,disabled:!p,onClick:function(){return t("setregime",{regime:2})}})})]}),(0,r.jsxs)(i.BJ,{label:"Calibration",mt:1,children:[(0,r.jsx)(i.BJ.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,r.jsxs)(i.BJ.Item,{children:["None"!==m&&(0,r.jsxs)(i.BJ,{fill:!0,children:[(0,r.jsx)(i.BJ.Item,{width:15.8,textAlign:"center",mt:.5,children:u&&(0,r.jsx)(i.az,{color:"average",children:"In Progress"})||s&&(0,r.jsx)(i.az,{color:"good",children:"Optimal"})||(0,r.jsx)(i.az,{color:"bad",children:"Sub-Optimal"})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.$n,{icon:"sync-alt",tooltip:"Calibrates the hub. \\ Accidents may occur when the \\ calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!s||!!u,onClick:function(){return t("calibrate")}})})]}),"None"===m&&(0,r.jsx)(i.az,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(p&&d&&h&&2===f)&&(0,r.jsx)(i.wn,{title:"GPS",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return t("load")}}),(0,r.jsx)(i.$n,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return t("eject")}})]})})]})})})})}},8336:function(e,n,t){"use strict";t.r(n),t.d(n,{TelescienceConsole:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0)||(0,r.jsx)("ul",{children:m.map(function(e){return(0,r.jsx)("li",{children:e},e)})})]})}),(0,r.jsx)(o.wn,{title:"Telepad Status",children:1===f?(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Current Bearing",children:(0,r.jsxs)(o.az,{inline:!0,position:"relative",children:[(0,r.jsx)(o.Q7,{unit:"\xb0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:v,value:j,onChange:function(e){C(e),s("setbear",{bear:e})}}),(0,r.jsx)(o.In,{ml:1,size:1,name:"arrow-up",rotation:_})]})}),(0,r.jsx)(o.Ki.Item,{label:"Current Elevation",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:v,value:b,onChange:function(e){return s("setelev",{elev:e})}})}),(0,r.jsx)(o.Ki.Item,{label:"Power Level",children:p.map(function(e,n){return(0,r.jsx)(o.$n,{content:e,selected:g===e,disabled:n>=x-1||v,onClick:function(){return s("setpwr",{pwr:n+1})}},e)})}),(0,r.jsx)(o.Ki.Item,{label:"Target Sector",children:(0,r.jsx)(o.Q7,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:w,value:y,disabled:v,onChange:function(e){return s("setz",{newz:e})}})}),(0,r.jsxs)(o.Ki.Item,{label:"Telepad Actions",children:[(0,r.jsx)(o.$n,{content:"Send",disabled:v,onClick:function(){return s("pad_send")}}),(0,r.jsx)(o.$n,{content:"Receive",disabled:v,onClick:function(){return s("pad_receive")}})]}),(0,r.jsxs)(o.Ki.Item,{label:"Crystal Maintenance",children:[(0,r.jsx)(o.$n,{content:"Recalibrate Crystals",disabled:v,onClick:function(){return s("recal_crystals")}}),(0,r.jsx)(o.$n,{content:"Eject Crystals",disabled:v,onClick:function(){return s("eject_crystals")}})]})]}):(0,r.jsx)(r.Fragment,{children:"No pad linked to console. Please use a multitool to link a pad."})}),(0,r.jsx)(o.wn,{title:"GPS Actions",children:1===h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Eject GPS",onClick:function(){return s("eject_gps")}}),(0,r.jsx)(o.$n,{disabled:0===h||v,content:"Store Coordinates",onClick:function(){return s("store_to_gps")}})]}):(0,r.jsx)(r.Fragment,{children:"Please insert a GPS to store coordinates to it."})})]})})}},1745:function(e,n,t){"use strict";t.r(n),t.d(n,{TempGun:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data,f=c.target_temperature,h=c.temperature,m=c.max_temp,p=c.min_temp;return(0,r.jsx)(a.p8,{width:250,height:121,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.Q7,{animate:!0,step:10,stepPixelSize:6,minValue:p,maxValue:m,value:f,format:function(e){return(0,o.Mg)(e,2)},width:"50px",onChange:function(e){return t("target_temperature",{target_temperature:e})}}),"\xb0C"]}),(0,r.jsx)(i.Ki.Item,{label:"Current Temperature",children:(0,r.jsxs)(i.az,{color:s(h),bold:h>500-273.15,children:[(0,r.jsx)(i.zv,{value:(0,o.LI)(h,2)}),"\xb0C"]})}),(0,r.jsx)(i.Ki.Item,{label:"Power Cost",children:(0,r.jsx)(i.az,{color:d(h),children:u(h)})})]})})})})},s=function(e){return e<=-100?"blue":e<=0?"teal":e<=100?"green":e<=200?"orange":"red"},u=function(e){return e<=100-273.15?"High":e<=250-273.15?"Medium":e<=300-273.15?"Low":e<=400-273.15?"Medium":"High"},d=function(e){return e<=100-273.15?"red":e<=250-273.15?"orange":e<=300-273.15?"green":e<=400-273.15?"orange":"red"}},4273:function(e,n,t){"use strict";t.r(n),t.d(n,{TextInputModal:()=>m,removeAllSkiplines:()=>h,sanitizeMultiline:()=>f});var r=t(8138),i=t(4530),o=t(7790),l=t(925),a=t(2864),c=t(3384),s=t(1942),u=t(9472);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=30,O=135+(b.length>30?Math.ceil(b.length/4):0)+75*!!S+(b.length&&x?5:0);return(0,r.jsxs)(c.p8,{title:k,width:325,height:O,children:[w&&(0,r.jsx)(u.Loader,{value:w}),(0,r.jsx)(c.p8.Content,{onKeyDown:function(e){e.key!==l._.Enter||S&&e.shiftKey||m("submit",{entry:C}),(0,l.KL)(e.key)&&m("cancel")},children:(0,r.jsx)(o.wn,{fill:!0,children:(0,r.jsxs)(o.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.az,{color:"label",children:b})}),(0,r.jsx)(o.BJ.Item,{grow:!0,children:(0,r.jsx)(o.fs,{autoFocus:!0,autoSelect:!0,fluid:!0,height:y||C.length>=30?"100%":"1.8rem",maxLength:g,onEscape:function(){return m("cancel")},onChange:function(e){e!==C&&I(y?f(e):h(e))},placeholder:"Type something...",value:C})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(s.InputButtons,{input:C,message:"".concat(C.length,"/").concat(g||"∞")})})]})})})]})}},9449:function(e,n,t){"use strict";t.r(n),t.d(n,{ThermoMachine:()=>c});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data;return(0,r.jsx)(a.p8,{width:300,height:225,children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Temperature",children:[(0,r.jsx)(i.zv,{value:c.temperature,format:function(e){return(0,o.Mg)(e,2)}})," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Pressure",children:[(0,r.jsx)(i.zv,{value:c.pressure,format:function(e){return(0,o.Mg)(e,2)}})," kPa"]})]})}),(0,r.jsx)(i.wn,{title:"Controls",buttons:(0,r.jsx)(i.$n,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){return t("power")}}),children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Setting",textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){return t("cooling")}})}),(0,r.jsxs)(i.Ki.Item,{label:"Target Temperature",children:[(0,r.jsx)(i.$n,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){return t("target",{target:c.min})}}),(0,r.jsx)(i.Q7,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onChange:function(e){return t("target",{target:e})}}),(0,r.jsx)(i.$n,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){return t("target",{target:c.max})}}),(0,r.jsx)(i.$n,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){return t("target",{target:c.initial})}})]})]})})]})})}},1760:function(e,n,t){"use strict";t.r(n),t.d(n,{TransferValve:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.tank_one,s=a.tank_two,u=a.attached_device,d=a.valve;return(0,r.jsx)(l.p8,{width:460,height:285,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsx)(i.wn,{children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Valve Status",children:(0,r.jsx)(i.$n,{icon:d?"unlock":"lock",content:d?"Open":"Closed",disabled:!c||!s,onClick:function(){return t("toggle")}})})})}),(0,r.jsx)(i.wn,{title:"Assembly",buttons:(0,r.jsx)(i.$n,{icon:"cog",content:"Configure Assembly",disabled:!u,onClick:function(){return t("device")}}),children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:u?(0,r.jsx)(i.$n,{icon:"eject",content:u,disabled:!u,onClick:function(){return t("remove_device")}}):(0,r.jsx)(i.az,{color:"average",children:"No Assembly"})})})}),(0,r.jsx)(i.wn,{title:"Attachment One",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:c?(0,r.jsx)(i.$n,{icon:"eject",content:c,disabled:!c,onClick:function(){return t("tankone")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})}),(0,r.jsx)(i.wn,{title:"Attachment Two",children:(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Attachment",children:s?(0,r.jsx)(i.$n,{icon:"eject",content:s,disabled:!s,onClick:function(){return t("tanktwo")}}):(0,r.jsx)(i.az,{color:"average",children:"No Tank"})})})})]})})}},6971:function(e,n,t){"use strict";t.r(n),t.d(n,{TurbineComputer:()=>s});var r=t(8138),i=t(7790),o=t(9582),l=t(6859),a=t(2864),c=t(3384),s=function(e){var n=(0,a.Oc)(),t=n.act,o=n.data,l=o.compressor,s=o.compressor_broken,f=o.turbine,h=o.turbine_broken,m=o.online,p=o.throttle,x=(o.preBurnTemperature,o.bearingDamage),g=!!(l&&!s&&f&&!h);return(0,r.jsx)(c.p8,{width:400,height:415,children:(0,r.jsxs)(c.p8.Content,{children:[(0,r.jsx)(i.wn,{title:"Status",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{icon:m?"power-off":"times",content:m?"Online":"Offline",selected:m,disabled:!g,onClick:function(){return t("toggle_power")}}),(0,r.jsx)(i.$n,{icon:"times",content:"Disconnect",onClick:function(){return t("disconnect")}})]}),children:g?(0,r.jsx)(d,{}):(0,r.jsx)(u,{})}),x>=100?(0,r.jsx)(i.BJ,{mb:"30px",fontsize:"256px",children:(0,r.jsx)(i.BJ.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:"Bearings Inoperable, Repair Required"})}):(0,r.jsx)(i.wn,{title:"Throttle",children:g?(0,r.jsx)(i.N6,{size:3,value:p,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,tickWhileDragging:!0,onChange:function(e,n){return t("set_throttle",{throttle:n})}}):""})]})})},u=function(e){var n=(0,a.Oc)().data,t=n.compressor,o=n.compressor_broken,l=n.turbine,c=n.turbine_broken;return n.online,(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Compressor Status",color:!t||o?"bad":"good",children:o?t?"Offline":"Missing":"Online"}),(0,r.jsx)(i.Ki.Item,{label:"Turbine Status",color:!l||c?"bad":"good",children:c?l?"Offline":"Missing":"Online"})]})},d=function(e){var n=(0,a.Oc)().data,t=n.rpm,c=n.temperature,s=n.power,u=n.bearingDamage,d=n.preBurnTemperature,f=n.postBurnTemperature,h=n.thermalEfficiency,m=n.compressionRatio,p=n.gasThroughput;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Turbine Speed",children:[(0,l.Mg)(t,2)," RPM"]}),(0,r.jsxs)(i.Ki.Item,{label:"Effective Compression Ratio",children:[(0,l.Mg)(m,2),":1"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Pre Burn Temp",children:[(0,l.Mg)(d,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gasmix Post Burn Temp",children:[(0,l.Mg)(f,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Compressor Temp",children:[(0,l.Mg)(c,2)," K"]}),(0,r.jsxs)(i.Ki.Item,{label:"Thermal Efficiency",children:[(0,l.Mg)(100*h,2)," %"]}),(0,r.jsxs)(i.Ki.Item,{label:"Gas Throughput",children:[(0,l.Mg)(p,2)," mol/s"]}),(0,r.jsx)(i.Ki.Item,{label:"Generated Power",children:(0,o.d5)(s)}),(0,r.jsx)(i.Ki.Item,{label:"Bearing Damage",children:(0,r.jsx)(i.z2,{value:u,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,l.Mg)(u)+"%"})})]})}},8380:function(e,n,t){"use strict";t.r(n),t.d(n,{Uplink:()=>m});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864),s=t(3384),u=t(4744);function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"";if(e=(0,i.pb)(e,function(e){return!!e.name}),n){var t=(0,a.XZ)(n,function(e){var n="".concat(e.name,"|").concat(e.desc,"|").concat(e.cost,"tc");return e.hijack_only&&(n+="|hijack"),n});e=(0,i.pb)(e,function(e){return t(e)})}return(0,i.Ul)(e,function(e){return e.name})},v=function(e){if(b(e),""===e)return p(d[0].items);p(y(d.map(function(e){return e.items}).flat(),e))},w=f((0,o.useState)(1),2),k=w[0],_=w[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ,{vertical:!0,children:(0,r.jsx)(l.BJ.Item,{children:(0,r.jsx)(l.wn,{title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:k,onClick:function(){return _(!k)}}),(0,r.jsx)(l.$n,{content:"Random Item",icon:"question",onClick:function(){return t("buyRandom")}}),(0,r.jsx)(l.$n,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){return t("refund")}})]}),children:(0,r.jsx)(l.pd,{fluid:!0,placeholder:"Search Equipment",value:g,onChange:function(e){v(e)}})})})}),(0,r.jsxs)(l.BJ,{fill:!0,mt:.3,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.tU,{vertical:!0,children:d.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:""===g&&e.items===m,onClick:function(){p(e.items),b("")},children:e.cat},e.cat)})})})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(l.BJ,{vertical:!0,children:m.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:k},(0,a.jT)(e.name))},(0,a.jT)(e.name))})})})})]})]})},x=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,s=i.cart,u=i.crystals,d=i.cart_price,h=f((0,o.useState)(0),2),m=h[0],p=h[1];return(0,r.jsxs)(l.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Current Balance: "+u+"TC",buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n.Checkbox,{content:"Show Descriptions",checked:m,onClick:function(){return p(!m)}}),(0,r.jsx)(l.$n,{content:"Empty Cart",icon:"trash",onClick:function(){return t("empty_cart")},disabled:!s}),(0,r.jsx)(l.$n,{content:"Purchase Cart ("+d+"TC)",icon:"shopping-cart",onClick:function(){return t("purchase_cart")},disabled:!s||d>u})]}),children:(0,r.jsx)(l.BJ,{vertical:!0,children:s?s.map(function(e){return(0,r.jsx)(l.BJ.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,r.jsx)(j,{i:e,showDecription:m,buttons:(0,r.jsx)(y,{i:e})})},(0,a.jT)(e.name))}):(0,r.jsx)(l.az,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,r.jsx)(g,{})]})},g=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=i.cats,a=i.lucky_numbers;return(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,r.jsx)(l.$n,{icon:"dice",content:"See more suggestions",onClick:function(){return t("shuffle_lucky_numbers")}}),children:(0,r.jsx)(l.BJ,{wrap:!0,children:a.map(function(e){return o[e.cat].items[e.item]}).filter(function(e){return null!=e}).map(function(e,n){return(0,r.jsx)(l.BJ.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",grow:!0,children:(0,r.jsx)(j,{i:e})},n)})})})})},j=function(e){var n=e.i,t=e.showDecription,i=e.buttons,o=void 0===i?(0,r.jsx)(b,{i:n}):i;return(0,r.jsx)(l.wn,{title:(0,a.jT)(n.name),buttons:o,children:(void 0===t?1:t)?(0,r.jsx)(l.az,{italic:!0,children:(0,a.jT)(n.desc)}):null})},b=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i,a=i.crystals;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$n,{icon:"shopping-cart",color:1===o.hijack_only&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){return t("add_to_cart",{item:o.obj_path})},disabled:o.cost>a}),(0,r.jsx)(l.$n,{content:"Buy ("+o.cost+"TC)"+(o.refundable?" [Refundable]":""),color:1===o.hijack_only&&"red",tooltip:1===o.hijack_only&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){return t("buyItem",{item:o.obj_path})},disabled:o.cost>a})]})},y=function(e){var n=(0,c.Oc)(),t=n.act,i=n.data,o=e.i;return i.exploitable,(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.$n,{icon:"times",content:"("+o.cost*o.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){return t("remove_from_cart",{item:o.obj_path})}}),(0,r.jsx)(l.$n,{icon:"minus",tooltip:0===o.limit&&"Discount already redeemed!",ml:"5px",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:--o.amount})},disabled:o.amount<=0}),(0,r.jsx)(l.$n.Input,{value:"".concat(o.amount),width:"45px",tooltipPosition:"bottom-end",tooltip:0===o.limit&&"Discount already redeemed!",onCommit:function(e){return t("set_cart_item_quantity",{item:o.obj_path,quantity:e})},disabled:-1!==o.limit&&o.amount>=o.limit&&o.amount<=0}),(0,r.jsx)(l.$n,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:0===o.limit&&"Discount already redeemed!",onClick:function(){return t("set_cart_item_quantity",{item:o.obj_path,quantity:++o.amount})},disabled:-1!==o.limit&&o.amount>=o.limit})]})},v=function(e){var n=(0,c.Oc)(),t=n.act,s=n.data,u=s.exploitable,d=s.selected_record,h=f((0,o.useState)(""),2),m=h[0],p=h[1],x=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(e,function(e){return!!e.name});if(n){var r=(0,a.XZ)(n,function(e){return e.name});t=(0,i.pb)(t,function(e){return r(e)})}return(0,i.Ul)(t,function(e){return e.name})}(u,m);return(0,r.jsxs)(l.BJ,{fill:!0,children:[(0,r.jsx)(l.BJ.Item,{width:"30%",children:(0,r.jsxs)(l.wn,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search Crew",onChange:function(e){return p(e)}}),(0,r.jsx)(l.tU,{vertical:!0,children:x&&x.map(function(e){return(0,r.jsx)(l.tU.Tab,{selected:e.name===d.name,onClick:function(){return t("view_record",{uid_gen:e.uid_gen})},children:e.name},e.uid_gen)})})]})}),(0,r.jsx)(l.BJ.Item,{grow:!0,children:(0,r.jsx)(l.wn,{fill:!0,scrollable:!0,title:d.name,children:(0,r.jsxs)(l.BJ,{children:[(0,r.jsx)(l.BJ.Item,{children:(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Age",children:d.age}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:d.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:d.rank}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:d.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:d.species}),(0,r.jsx)(l.Ki.Item,{label:"NT Relation",children:d.nt_relation})]})}),!!d.has_photos&&d.photos.map(function(e,n){return(0,r.jsxs)(l.BJ.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,r.jsx)("img",{src:e,style:{width:"96px",marginTop:"1rem",marginBottom:"0.5rem",imageRendering:"pixelated"}}),(0,r.jsx)("br",{}),"Photo #",n+1]},n)})]})})})]})}},1638:function(e,n,t){"use strict";t.r(n),t.d(n,{Vending:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);th&&a.price>m;return(0,r.jsxs)(i.XI.Row,{children:[(0,r.jsx)(i.XI.Cell,{collapsing:!0,children:(0,r.jsx)(i.Hg,{verticalAlign:"middle",icon:s,icon_state:u,fallback:(0,r.jsx)(i.In,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,r.jsx)(i.XI.Cell,{bold:!0,children:a.name}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsxs)(i.az,{color:c<=0&&"bad"||c<=a.max_amount/2&&"average"||"good",children:[c," in stock"]})}),(0,r.jsx)(i.XI.Cell,{collapsing:!0,textAlign:"center",children:(0,r.jsx)(i.$n,{fluid:!0,disabled:j,icon:g,content:x,textAlign:"left",onClick:function(){return t("vend",{inum:a.inum})}})})]})},u=function(e){var n,t=(0,o.Oc)(),a=t.act,u=t.data,d=u.user,f=u.usermoney,h=u.inserted_cash,m=u.product_records,p=u.hidden_records,x=u.stock,g=(u.vend_ready,u.inserted_item_name),j=u.panel_open,b=u.speaker,y=u.locked,v=u.bypass_lock;return n=c(void 0===m?[]:m),u.extended_inventory&&(n=c(n).concat(c(void 0===p?[]:p))),n=n.filter(function(e){return!!e}),(0,r.jsx)(l.p8,{title:"Vending Machine",width:450,height:Math.min((!y||v?230:171)+32*n.length,585),children:(0,r.jsx)(l.p8.Content,{scrollable:!0,children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(!y||!!v)&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Configuration",children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Rename Vendor",onClick:function(){return a("rename",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{icon:"pen-to-square",content:"Change Vendor Appearance",onClick:function(){return a("change_appearance",{})}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"User",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.BJ.Item,{children:!!g&&(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:(0,r.jsx)("span",{style:{textTransform:"capitalize"},children:g}),onClick:function(){return a("eject_item",{})}})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.$n,{disabled:!h,icon:"money-bill-wave-alt",content:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("b",{children:h})," credits"]}):"Dispense Change",tooltip:h?"Dispense Change":null,textAlign:"left",onClick:function(){return a("change")}})})]}),children:d&&(0,r.jsxs)(i.az,{children:["Welcome, ",(0,r.jsx)("b",{children:d.name}),", ",(0,r.jsx)("b",{children:d.job||"Unemployed"}),"!",(0,r.jsx)("br",{}),"Your balance is ",(0,r.jsxs)("b",{children:[f," credits"]}),".",(0,r.jsx)("br",{})]})})}),!!j&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Maintenance",children:(0,r.jsx)(i.$n,{icon:b?"check":"volume-mute",selected:b,content:"Speaker",textAlign:"left",onClick:function(){return a("toggle_voice",{})}})})}),(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,title:"Products",children:(0,r.jsx)(i.XI,{children:n.map(function(e){return(0,r.jsx)(s,{product:e,productStock:x[e.name],productIcon:e.icon,productIconState:e.icon_state},e.name)})})})})]})})})}},2144:function(e,n,t){"use strict";t.r(n),t.d(n,{VolumeMixer:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)(),t=n.act,c=n.data.channels;return(0,r.jsx)(a.p8,{width:350,height:Math.min(95+50*c.length,565),children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsx)(o.wn,{fill:!0,scrollable:!0,children:c.map(function(e,n){return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)(o.az,{fontSize:"1.25rem",color:"label",mt:n>0&&"0.5rem",children:e.name}),(0,r.jsx)(o.az,{mt:"0.5rem",children:(0,r.jsxs)(o.BJ,{children:[(0,r.jsx)(o.BJ.Item,{mr:.5,children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:0})}})})}),(0,r.jsx)(o.BJ.Item,{grow:!0,mx:"0.5rem",children:(0,r.jsx)(o.Ap,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(n,r){return t("volume",{channel:e.num,volume:r})}})}),(0,r.jsx)(o.BJ.Item,{children:(0,r.jsx)(o.$n,{width:"24px",color:"transparent",children:(0,r.jsx)(o.In,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return t("volume",{channel:e.num,volume:100})}})})})]})})]},e.num)})})})})}},7063:function(e,n,t){"use strict";t.r(n),t.d(n,{VotePanel:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.remaining,s=a.question,u=a.choices,d=a.user_vote,f=a.counts,h=a.show_counts;return(0,r.jsx)(l.p8,{width:400,height:360,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.wn,{fill:!0,scrollable:!0,title:s,children:[(0,r.jsxs)(i.az,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),u.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{mb:1,fluid:!0,lineHeight:3,multiLine:e,content:e+(h?" ("+(f[e]||0)+")":""),onClick:function(){return t("vote",{target:e})},selected:e===d})},e)})]})})})}},7983:function(e,n,t){"use strict";t.r(n),t.d(n,{Wires:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data,c=a.wires||[],s=a.status||[],u=56+23*c.length+(status?0:15+17*s.length);return(0,r.jsx)(l.p8,{width:350,height:u,children:(0,r.jsx)(l.p8.Content,{children:(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{grow:!0,children:(0,r.jsx)(i.wn,{fill:!0,scrollable:!0,children:(0,r.jsx)(i.Ki,{children:c.map(function(e){return(0,r.jsx)(i.Ki.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.$n,{content:e.cut?"Mend":"Cut",onClick:function(){return t("cut",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:"Pulse",onClick:function(){return t("pulse",{wire:e.color})}}),(0,r.jsx)(i.$n,{content:e.attached?"Detach":"Attach",onClick:function(){return t("attach",{wire:e.color})}})]}),children:!!e.wire&&(0,r.jsxs)("i",{children:["(",e.wire,")"]})},e.seen_color)})})})}),!!s.length&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:s.map(function(e){return(0,r.jsx)(i.az,{color:"lightgray",children:e},e)})})})]})})})}},8167:function(e,n,t){"use strict";t.r(n),t.d(n,{WizardApprenticeContract:()=>a});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.used;return(0,r.jsx)(l.p8,{width:500,height:555,children:(0,r.jsxs)(l.p8.Content,{scrollable:!0,children:[(0,r.jsxs)(i.wn,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,r.jsx)("p",{children:"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points."}),a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,r.jsx)(i.wn,{title:"Which school of magic is your apprentice studying?",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,r.jsx)("br",{}),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("fire")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,r.jsx)("br",{}),"They know Teleport, Blink and Ethereal Jaunt.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("translocation")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,r.jsx)("br",{}),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("restoration")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,r.jsx)("br",{}),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, 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,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("stealth")}})]}),(0,r.jsx)(i.Ki.Divider,{}),(0,r.jsxs)(i.Ki.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,r.jsx)("br",{}),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,r.jsx)("br",{}),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,r.jsx)("br",{}),(0,r.jsx)(i.$n,{content:"Select",disabled:a,onClick:function(){return t("honk")}})]}),(0,r.jsx)(i.Ki.Divider,{})]})})]})})}},234:function(e,n,t){"use strict";t.r(n),t.d(n,{ZLevelManager:()=>u});var r=t(8138),i=t(7790),o=t(2864),l=t(3384),a=t(4530);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ts});var r=t(8138),i=t(8587),o=t(4530),l=t(7790);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&!g.includes(e.ref)&&!p.includes(e.ref),checked:p.includes(e.ref),onClick:function(){return j(e.ref)}},e.desc)})]})]})})}},7276:function(e,n,t){"use strict";t.r(n),t.d(n,{AtmosScan:()=>l});var r=t(8138),i=t(8587),o=t(7790),l=function(e){var n=e.aircontents;return(0,r.jsx)(o.az,{children:(0,r.jsx)(o.Ki,{children:(0,i.pb)(n,function(e){return"0"!==e.val||"Pressure"===e.entry||"Temperature"===e.entry}).map(function(e){var n,t,i,l,a;return(0,r.jsxs)(o.Ki.Item,{label:e.entry,color:(n=e.val,t=e.bad_low,i=e.poor_low,l=e.poor_high,a=e.bad_high,nl?"average":n>a?"bad":"good"),children:[e.val,e.units]},e.entry)})})})}},3013:function(e,n,t){"use strict";t.r(n),t.d(n,{BeakerContents:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.beakerLoaded,t=e.beakerContents,o=void 0===t?[]:t,l=e.buttons;return(0,r.jsx)(i.BJ,{vertical:!0,children:n?0===o.length?(0,r.jsx)(i.BJ.Item,{color:"label",children:"Beaker is empty."}):o.map(function(e,n){var t;return(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{color:"label",grow:!0,children:[(t=e.volume)+" unit"+(1===t?"":"s")," of ",e.name]},e.name),!!l&&(0,r.jsx)(i.BJ.Item,{children:l(e,n)})]},e.name)}):(0,r.jsx)(i.BJ.Item,{color:"label",children:"No beaker loaded."})})}},9226:function(e,n,t){"use strict";t.r(n),t.d(n,{BotStatus:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.locked,c=l.noaccess,s=l.maintpanel,u=l.on,d=l.autopatrol,f=l.canhack,h=l.emagged,m=l.remote_disabled;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.IC,{children:["Swipe an ID card to ",a?"unlock":"lock"," this interface."]}),(0,r.jsx)(i.wn,{title:"General Settings",children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:(0,r.jsx)(i.$n,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,disabled:c,onClick:function(){return t("power")}})}),void 0!==d&&(0,r.jsx)(i.Ki.Item,{label:"Patrol",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:d,content:"Auto Patrol",disabled:c,onClick:function(){return t("autopatrol")}})}),!!s&&(0,r.jsx)(i.Ki.Item,{label:"Maintenance Panel",children:(0,r.jsx)(i.az,{color:"bad",children:"Panel Open!"})}),(0,r.jsx)(i.Ki.Item,{label:"Safety System",children:(0,r.jsx)(i.az,{color:h?"bad":"good",children:h?"DISABLED!":"Enabled"})}),!!f&&(0,r.jsx)(i.Ki.Item,{label:"Hacking",children:(0,r.jsx)(i.$n,{icon:"terminal",content:h?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){return t("hack")}})}),(0,r.jsx)(i.Ki.Item,{label:"Remote Access",children:(0,r.jsx)(i.$n.Checkbox,{fluid:!0,checked:!m,content:"AI Remote Control",disabled:c,onClick:function(){return t("disableremote")}})})]})})]})}},4744:function(e,n,t){"use strict";t.r(n),t.d(n,{ComplexModal:()=>h,modalAnswer:()=>d,modalClose:()=>f,modalOpen:()=>s,modalRegisterBodyOverride:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(2864);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);td});var r=t(8138),i=t(7790),o=t(3268),l=t(2864),a=t(421).lm.department,c=["Captain","Station Commander","Head of Command","Commanding Officer","Head of Personnel","Head of Service","Crew Relations Officer","Head of Security","Security Director","Sheriff","Chief Engineer","Engineering Director","Engine Foreman","Senior Engineer","Research Director","Senior Researcher","Chief Research Officer","Chief Medical Officer","Senior Physician","Medical Director","Quartermaster","Chief Logistics Officer","Supply Director","Requisitions Foreman"],s=function(e){if(-1!==c.indexOf(e))return!0},u=function(e){return e.length>0&&(0,r.jsxs)(i.XI,{children:[(0,r.jsxs)(i.XI.Row,{header:!0,color:"white",children:[(0,r.jsx)(i.XI.Cell,{width:"50%",children:"Name"}),(0,r.jsx)(i.XI.Cell,{width:"35%",children:"Rank"}),(0,r.jsx)(i.XI.Cell,{width:"15%",children:"Active"})]}),e.map(function(e){var n;return(0,r.jsxs)(i.XI.Row,{color:(n=e.rank,-1!==c.indexOf(n)?"green":"orange"),bold:s(e.rank),children:[(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.name)}),(0,r.jsx)(i.XI.Cell,{children:(0,o.jT)(e.rank)}),(0,r.jsx)(i.XI.Cell,{children:e.active})]},e.name+e.rank)})]})},d=function(e){if((0,l.Oc)().act,e.data)n=e.data;else{var n;n=(0,l.Oc)().data}var t=n.manifest,o=t.heads,c=t.sec,s=t.eng,d=t.med,f=t.sci,h=t.ser,m=t.sup,p=t.misc;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.command,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:u(o)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.security,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:u(c)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.engineering,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:u(s)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.medical,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:u(d)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.science,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:u(f)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.service,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:u(h)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{backgroundColor:a.supply,m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:u(m)}),(0,r.jsx)(i.wn,{title:(0,r.jsx)(i.az,{m:-1,pt:1,pb:1,children:(0,r.jsx)(i.az,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:u(p)})]})}},1942:function(e,n,t){"use strict";t.r(n),t.d(n,{InputButtons:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.large_buttons,c=l.swapped_buttons,s=e.input,u=e.message,d=e.disabled,f=(0,r.jsx)(i.$n,{color:"good",textAlign:"center",bold:!!a,fluid:!!a,tooltip:!!a&&u,disabled:!!d,width:!a&&6,onClick:function(){return t("submit",{entry:s})},children:"Submit"}),h=(0,r.jsx)(i.$n,{color:"bad",textAlign:"center",bold:!!a,fluid:!!a,width:!a&&6,onClick:function(){return t("cancel")},children:"Cancel"});return(0,r.jsxs)(i.BJ,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[(0,r.jsx)(i.BJ.Item,{grow:a,children:h}),!a&&u&&(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.az,{color:"label",textAlign:"center",children:u})}),(0,r.jsx)(i.BJ.Item,{grow:a,children:f})]})}},1992:function(e,n,t){"use strict";t.r(n),t.d(n,{InterfaceLockNoticeBox:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=e.siliconUser,c=void 0===a?l.siliconUser:a,s=e.locked,u=void 0===s?l.locked:s,d=e.normallyLocked,f=void 0===d?l.normallyLocked:d,h=e.onLockStatusChange,m=void 0===h?function(){return t("lock")}:h,p=e.accessText;return c?(0,r.jsx)(i.IC,{color:c&&"grey",children:(0,r.jsxs)(i.so,{align:"center",children:[(0,r.jsx)(i.so.Item,{children:"Interface lock status:"}),(0,r.jsx)(i.so.Item,{grow:"1"}),(0,r.jsx)(i.so.Item,{children:(0,r.jsx)(i.$n,{m:"0",color:f?"red":"green",icon:f?"lock":"unlock",content:f?"Locked":"Unlocked",onClick:function(){m&&m(!u)}})})]})}):(0,r.jsxs)(i.IC,{children:["Swipe ",void 0===p?"an ID card":p," to ",u?"unlock":"lock"," this interface."]})}},9472:function(e,n,t){"use strict";t.r(n),t.d(n,{Loader:()=>l});var r=t(8138),i=t(7790),o=t(6859),l=function(e){var n=e.value;return(0,r.jsx)("div",{className:"AlertModal__Loader",children:(0,r.jsx)(i.az,{className:"AlertModal__LoaderProgress",style:{width:100*(0,o.J$)(n)+"%"}})})}},7352:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginInfo:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState;if(l)return(0,r.jsx)(i.IC,{info:!0,children:(0,r.jsxs)(i.BJ,{children:[(0,r.jsxs)(i.BJ.Item,{grow:!0,mt:.5,children:["Logged in as: ",a.name," (",a.rank,")"]}),(0,r.jsxs)(i.BJ.Item,{children:[(0,r.jsx)(i.$n,{icon:"eject",disabled:!a.id,content:"Eject ID",color:"good",onClick:function(){return t("login_eject")}}),(0,r.jsx)(i.$n,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){return t("login_logout")}})]})]})})}},736:function(e,n,t){"use strict";t.r(n),t.d(n,{LoginScreen:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.loginState,c=l.isAI,s=l.isRobot,u=l.isAdmin;return(0,r.jsx)(i.wn,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,r.jsx)(i.so,{height:"100%",align:"center",justify:"center",children:(0,r.jsxs)(i.so.Item,{textAlign:"center",mt:"-2rem",children:[(0,r.jsxs)(i.az,{fontSize:"1.5rem",bold:!0,children:[(0,r.jsx)(i.In,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,r.jsxs)(i.az,{color:"label",my:"1rem",children:["ID:",(0,r.jsx)(i.$n,{icon:"id-card",content:a.id?a.id:"----------",ml:"0.5rem",onClick:function(){return t("login_insert")}})]}),(0,r.jsx)(i.$n,{icon:"sign-in-alt",disabled:!a.id,content:"Login",onClick:function(){return t("login_login",{login_type:1})}}),!!c&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return t("login_login",{login_type:2})}}),!!s&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return t("login_login",{login_type:3})}}),!!u&&(0,r.jsx)(i.$n,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return t("login_login",{login_type:4})}})]})})})}},6696:function(e,n,t){"use strict";t.r(n),t.d(n,{Operating:()=>o});var r=t(8138),i=t(7790),o=function(e){var n=e.operating,t=e.name;if(n)return(0,r.jsx)(i.Rr,{children:(0,r.jsx)(i.so,{mb:"30px",children:(0,r.jsxs)(i.so.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,r.jsx)(i.In,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,r.jsx)("br",{}),"The ",t," is processing..."]})})})}},6888:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>a});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)().act,t=e.data,a=t.code,c=t.frequency,s=t.minFrequency,u=t.maxFrequency;return(0,r.jsxs)(i.wn,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Frequency",children:(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:u/10,value:c/10,format:function(e){return(0,o.Mg)(e,1)},width:"80px",onChange:function(e){return n("freq",{freq:e})}})}),(0,r.jsx)(i.Ki.Item,{label:"Code",children:(0,r.jsx)(i.Q7,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:a,width:"80px",onChange:function(e){return n("code",{code:e})}})})]}),(0,r.jsx)(i.$n,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},4455:function(e,n,t){"use strict";t.r(n),t.d(n,{SimpleRecords:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(3268),c=t(2864);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1&&void 0!==arguments[1]?arguments[1]:"",t=(0,i.pb)(u,function(e){return null==e?void 0:e.Name});return n&&(t=(0,i.pb)(t,(0,a.XZ)(n,function(e){return e.Name}))),(0,i.Ul)(t,function(e){return e.Name})}(u,f);return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.pd,{fluid:!0,mb:1,placeholder:"Search records...",onChange:function(e){return h(e)}}),m.map(function(e){return(0,r.jsx)(l.az,{children:(0,r.jsx)(l.$n,{mb:.5,content:e.Name,icon:"user",onClick:function(){return t("Records",{target:e.uid})}})},e)})]})},f=function(e){(0,c.Oc)().act;var n,t=e.data.records,i=t.general,o=t.medical,a=t.security;switch(e.recordType){case"MED":n=(0,r.jsx)(l.wn,{level:2,title:"Medical Data",children:o?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Blood Type",children:o.blood_type}),(0,r.jsx)(l.Ki.Item,{label:"Minor Disabilities",children:o.mi_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.mi_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Disabilities",children:o.ma_dis}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.ma_dis_d}),(0,r.jsx)(l.Ki.Item,{label:"Allergies",children:o.alg}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.alg_d}),(0,r.jsx)(l.Ki.Item,{label:"Current Diseases",children:o.cdi}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:o.cdi_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:o.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,r.jsx)(l.wn,{level:2,title:"Security Data",children:a?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Criminal Status",children:a.criminal}),(0,r.jsx)(l.Ki.Item,{label:"Minor Crimes",children:a.mi_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.mi_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Major Crimes",children:a.ma_crim}),(0,r.jsx)(l.Ki.Item,{label:"Details",children:a.ma_crim_d}),(0,r.jsx)(l.Ki.Item,{label:"Important Notes",preserveWhitespace:!0,children:a.notes})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,r.jsxs)(l.az,{children:[(0,r.jsx)(l.wn,{title:"General Data",children:i?(0,r.jsxs)(l.Ki,{children:[(0,r.jsx)(l.Ki.Item,{label:"Name",children:i.name}),(0,r.jsx)(l.Ki.Item,{label:"Sex",children:i.sex}),(0,r.jsx)(l.Ki.Item,{label:"Species",children:i.species}),(0,r.jsx)(l.Ki.Item,{label:"Age",children:i.age}),(0,r.jsx)(l.Ki.Item,{label:"Rank",children:i.rank}),(0,r.jsx)(l.Ki.Item,{label:"Fingerprint",children:i.fingerprint}),(0,r.jsx)(l.Ki.Item,{label:"Physical Status",children:i.p_stat}),(0,r.jsx)(l.Ki.Item,{label:"Mental Status",children:i.m_stat})]}):(0,r.jsx)(l.az,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},2264:function(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(4530);function o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(7790),o=t(2864);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var a=function(e){var n=(0,o.Oc)(),t=n.act,a=n.data.temp;if(a){var c,s,u=l({},a.style,!0);return(0,r.jsx)(i.IC,(c=function(e){for(var n=1;nc});var r=t(8138),i=t(7790),o=t(9582),l=t(2864),a=t(3384),c=function(e){var n=(0,l.Oc)().data,t=n.total_earnings,c=n.total_energy;return n.name,(0,r.jsx)(a.p8,{title:"Power Transmission Laser",width:"310",height:"485",children:(0,r.jsxs)(a.p8.Content,{children:[(0,r.jsx)(s,{}),(0,r.jsx)(u,{}),(0,r.jsx)(d,{}),(0,r.jsxs)(i.IC,{success:!0,children:["Earned Credits : ",t?(0,o.up)(t):0]}),(0,r.jsxs)(i.IC,{success:!0,children:["Energy Sold : ",c?(0,o.QL)(c,0,"J"):"0 J"]})]})})},s=function(e){var n=(0,l.Oc)().data,t=n.max_capacity,a=n.held_power,c=n.input_total,s=n.max_grid_load;return(0,r.jsxs)(i.wn,{title:"Status",children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Reserve energy",children:a?(0,o.QL)(a,0,"J"):"0 J"})}),(0,r.jsx)(i.z2,{mt:"0.5em",mb:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:a/t}),(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Grid Saturation"})}),(0,r.jsx)(i.z2,{mt:"0.5em",ranges:{good:[.8,1/0],average:[.5,.8],bad:[-1/0,.5]},value:Math.min(c,t-a)/s})]})},u=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.input_total,s=a.accepting_power,u=a.sucking_power,d=a.input_number,f=a.power_format;return(0,r.jsxs)(i.wn,{title:"Input Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Input Circuit",buttons:(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",onClick:function(){return t("toggle_input")},children:s?"Enabled":"Disabled"}),children:(0,r.jsx)(i.az,{color:u&&"good"||s&&"average"||"bad",children:u&&"Online"||s&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Input Level",children:c?(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",animated:!0,size:1.25,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,value:d,onChange:function(e){return t("set_input",{set_input:e})}}),(0,r.jsx)(i.$n,{selected:1===f,onClick:function(){return t("inputW")},children:"W"}),(0,r.jsx)(i.$n,{selected:1e3===f,onClick:function(){return t("inputKW")},children:"KW"}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("inputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("inputGW")},children:"GW"})]})]})},d=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data,c=a.output_total,s=a.firing,u=a.accepting_power,d=a.output_number,f=a.output_multiplier,h=a.target,m=a.held_power;return(0,r.jsxs)(i.wn,{title:"Output Controls",children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Laser Circuit",buttons:(0,r.jsxs)(i.BJ,{children:[(0,r.jsx)(i.$n,{icon:"crosshairs",color:""===h?"green":"red",onClick:function(){return t("target")},children:h}),(0,r.jsx)(i.$n,{icon:"power-off",color:s?"green":"red",disabled:!s&&m<1e6,onClick:function(){return t("toggle_output")},children:s?"Enabled":"Disabled"})]}),children:(0,r.jsx)(i.az,{color:s&&"good"||u&&"average"||"bad",children:s&&"Online"||u&&"Idle"||"Offline"})}),(0,r.jsx)(i.Ki.Item,{label:"Output Level",children:c?c<0?"-"+(0,o.d5)(Math.abs(c)):(0,o.d5)(c):"0 W"})]}),(0,r.jsxs)(i.az,{mt:"0.5em",children:[(0,r.jsx)(i.Q7,{mr:"0.5em",size:1.25,animated:!0,inline:!0,step:1,stepPixelSize:2,minValue:0,maxValue:999,ranges:{bad:[-1/0,-1]},value:d,onChange:function(e){return t("set_output",{set_output:e})}}),(0,r.jsx)(i.$n,{selected:1e6===f,onClick:function(){return t("outputMW")},children:"MW"}),(0,r.jsx)(i.$n,{selected:1e9===f,onClick:function(){return t("outputGW")},children:"GW"})]})]})}},2817:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_atmosphere:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.AtmosScan,{aircontents:t.app_data.aircontents})}},7716:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_bioscan:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).app_data,l=t.holder,a=t.dead,c=t.health,s=t.brute,u=t.oxy,d=t.tox,f=t.burn;return(t.temp,l)?(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Status",children:a?(0,r.jsx)(i.az,{bold:!0,color:"red",children:"Dead"}):(0,r.jsx)(i.az,{bold:!0,color:"green",children:"Alive"})}),(0,r.jsx)(i.Ki.Item,{label:"Health",children:(0,r.jsx)(i.z2,{min:0,max:1,value:c/100,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,r.jsx)(i.Ki.Item,{label:"Oxygen Damage",children:(0,r.jsx)(i.az,{color:"blue",children:u})}),(0,r.jsx)(i.Ki.Item,{label:"Toxin Damage",children:(0,r.jsx)(i.az,{color:"green",children:d})}),(0,r.jsx)(i.Ki.Item,{label:"Burn Damage",children:(0,r.jsx)(i.az,{color:"orange",children:f})}),(0,r.jsx)(i.Ki.Item,{label:"Brute Damage",children:(0,r.jsx)(i.az,{color:"red",children:s})})]}):(0,r.jsx)(i.az,{color:"red",children:"Error: No biological host found."})}},1091:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_directives:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.master,c=l.dna,s=l.prime,u=l.supplemental;return(0,r.jsxs)(i.az,{children:[(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Master",children:a?a+" ("+c+")":"None"}),a&&(0,r.jsx)(i.Ki.Item,{label:"Request DNA",children:(0,r.jsx)(i.$n,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return t("getdna")}})}),(0,r.jsx)(i.Ki.Item,{label:"Prime Directive",children:s}),(0,r.jsx)(i.Ki.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,r.jsx)(i.az,{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,r.jsx)(i.az,{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."})]})}},9316:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_doorjack:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n,t,l=(0,o.Oc)(),a=l.act,c=l.data.app_data,s=c.cable,u=c.machine,d=c.inprogress,f=c.progress;return c.aborted,n=u?(0,r.jsx)(i.$n,{selected:!0,content:"Connected"}):(0,r.jsx)(i.$n,{content:s?"Extended":"Retracted",color:s?"orange":null,onClick:function(){return a("cable")}}),u&&(t=(0,r.jsxs)(i.Ki.Item,{label:"Hack",children:[(0,r.jsx)(i.z2,{ranges:{good:[67,1/0],average:[33,67],bad:[-1/0,33]},value:f,maxValue:100}),d?(0,r.jsx)(i.$n,{mt:1,color:"red",content:"Abort",onClick:function(){return a("cancel")}}):(0,r.jsx)(i.$n,{mt:1,content:"Start",onClick:function(){return a("jack")}})]})),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Cable",children:n}),t]})}},5042:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.app_data,a=l.available_software,c=l.installed_software,s=l.installed_toggles,u=l.available_ram,d=l.emotions,f=l.current_emotion,h=l.speech_verbs,m=l.current_speech_verb,p=l.available_chassises,x=l.current_chassis,g=[];return c.map(function(e){return g[e.key]=e.name}),s.map(function(e){return g[e.key]=e.name}),(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Available RAM",children:u}),(0,r.jsxs)(i.Ki.Item,{label:"Available Software",children:[a.filter(function(e){return!g[e.key]}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return t("purchaseSoftware",{key:e.key})}},e.key)}),0===a.filter(function(e){return!g[e.key]}).length&&"No software available!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Software",children:[c.filter(function(e){return"mainmenu"!==e.key}).map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,onClick:function(){return t("startSoftware",{software_key:e.key})}},e.key)}),0===c.length&&"No software installed!"]}),(0,r.jsxs)(i.Ki.Item,{label:"Installed Toggles",children:[s.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return t("setToggle",{toggle_key:e.key})}},e.key)}),0===s.length&&"No toggles installed!"]}),(0,r.jsx)(i.Ki.Item,{label:"Select Emotion",children:d.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.id===f,onClick:function(){return t("setEmotion",{emotion:e.id})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Speaking State",children:h.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.name===m,onClick:function(){return t("setSpeechStyle",{speech_state:e.name})}},e.id)})}),(0,r.jsx)(i.Ki.Item,{label:"Select Chassis Type",children:p.map(function(e){return(0,r.jsx)(i.$n,{content:e.name,selected:e.icon===x,onClick:function(){return t("setChassis",{chassis_to_change:e.icon})}},e.id)})})]})})}},702:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.CrewManifest,{data:t.app_data})}},9513:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_medrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"MED"})}},984:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_messenger:()=>l});var r=t(8138),i=t(2864),o=t(3260),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return t.app_data.active_convo?(0,r.jsx)(o.ActiveConversation,{data:t.app_data}):(0,r.jsx)(o.MessengerList,{data:t.app_data})}},9028:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_radio:()=>a});var r=t(8138),i=t(7790),o=t(6859),l=t(2864),a=function(e){var n=(0,l.Oc)(),t=n.act,a=n.data.app_data,c=a.minFrequency,s=a.maxFrequency,u=a.frequency,d=a.broadcasting;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Frequency",children:[(0,r.jsx)(i.Q7,{animate:!0,step:.2,stepPixelSize:6,minValue:c/10,maxValue:s/10,value:u/10,format:function(e){return(0,o.Mg)(e,1)},onChange:function(e){return t("freq",{freq:e})}}),(0,r.jsx)(i.$n,{tooltip:"Reset",icon:"undo",onClick:function(){return t("freq",{freq:"145.9"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Broadcast Nearby Speech",children:(0,r.jsx)(i.$n,{onClick:function(){return t("toggleBroadcast")},selected:d,content:d?"Enabled":"Disabled"})})]})}},6838:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_secrecords:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},4244:function(e,n,t){"use strict";t.r(n),t.d(n,{pai_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t.app_data})}},8539:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_atmos_scan:()=>l});var r=t(8138),i=t(2864),o=t(7276),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.AtmosScan,{aircontents:n.aircontents})}},5246:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_cookbook:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.games;return(0,r.jsx)(i.az,{children:l.map(function(e){return(0,r.jsxs)(i.$n,{width:"33%",textAlign:"center",color:"transparent",onClick:function(){return t("play",{id:e.id})},children:[(0,r.jsx)(i.In.Stack,{height:"96px",children:"Minesweeper"===e.name?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.In,{ml:"4px",mt:"10px",name:"flag",size:"6",color:"gray",rotation:30}),(0,r.jsx)(i.In,{ml:"20px",mt:"4px",name:"bomb",size:"3",color:"black"})]}):(0,r.jsx)(i.In,{name:"gamepad",size:"6"})}),(0,r.jsx)(i.az,{children:e.name})]},e.name)})})}},3606:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_janitor:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).janitor,l=t.user_loc,a=t.mops,c=t.buckets,s=t.cleanbots,u=t.carts,d=t.janicarts;return(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Current Location",children:[l.x,",",l.y]}),a&&(0,r.jsx)(i.Ki.Item,{label:"Mop Locations",children:a.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),c&&(0,r.jsx)(i.Ki.Item,{label:"Mop Bucket Locations",children:c.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),s&&(0,r.jsx)(i.Ki.Item,{label:"Cleanbot Locations",children:s.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)})}),u&&(0,r.jsx)(i.Ki.Item,{label:"Janitorial Cart Locations",children:u.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)})}),d&&(0,r.jsx)(i.Ki.Item,{label:"Janicart Locations",children:d.map(function(e){return(0,r.jsxs)(i.az,{children:[e.x,",",e.y," (",e.direction_from_user,")"]},e)})})]})}},2526:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_main_menu:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data,a=l.owner,c=l.ownjob,s=l.idInserted,u=l.categories,d=l.pai,f=l.notifying;return(0,r.jsxs)(i.BJ,{fill:!0,vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Owner",color:"average",children:[a,", ",c]}),(0,r.jsx)(i.Ki.Item,{label:"ID",children:(0,r.jsx)(i.$n,{icon:"sync",content:"Update PDA Info",disabled:!s,onClick:function(){return t("UpdateInfo")}})})]})})}),(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.wn,{title:"Functions",children:(0,r.jsx)(i.Ki,{children:u.map(function(e){var n=l.apps[e];return n&&n.length?(0,r.jsx)(i.Ki.Item,{label:e,children:n.map(function(e){return(0,r.jsx)(i.$n,{icon:e.uid in f?e.notify_icon:e.icon,iconSpin:e.uid in f,color:e.uid in f?"red":"transparent",content:e.name,onClick:function(){return t("StartProgram",{program:e.uid})}},e.uid)})},e):null})})})}),(0,r.jsx)(i.BJ.Item,{children:!!d&&(0,r.jsxs)(i.wn,{title:"pAI",children:[(0,r.jsx)(i.$n,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return t("pai",{option:1})}}),(0,r.jsx)(i.$n,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return t("pai",{option:2})}})]})})]})}},4642:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_manifest:()=>l});var r=t(8138),i=t(2864),o=t(2639),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.CrewManifest,{})}},1212:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_medical:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"MED"})}},3260:function(e,n,t){"use strict";t.r(n),t.d(n,{ActiveConversation:()=>d,MessengerList:()=>f,pda_messenger:()=>u});var r=t(8138),i=t(8587),o=t(4530),l=t(7790),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tu,MineSweeperLeaderboard:()=>d,pda_minesweeper:()=>s});var r=t(8138),i=t(4530),o=t(7790),l=t(2864),a=t(2264);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).mulebot.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.mulebot.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.mulebot,c=a.botstatus,s=a.active,u=c.mode,d=c.loca,f=c.load,h=c.powr,m=c.dest,p=c.home,x=c.retn,g=c.pick;switch(u){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=u}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Power",children:[h,"%"]}),(0,r.jsx)(i.Ki.Item,{label:"Home",children:p}),(0,r.jsx)(i.Ki.Item,{label:"Destination",children:(0,r.jsx)(i.$n,{content:m?m+" (Set)":"None (Set)",onClick:function(){return l("target")}})}),(0,r.jsx)(i.Ki.Item,{label:"Current Load",children:(0,r.jsx)(i.$n,{content:f?f+" (Unload)":"None",disabled:!f,onClick:function(){return l("unload")}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Pickup",children:(0,r.jsx)(i.$n,{content:g?"Yes":"No",selected:g,onClick:function(){return l("set_pickup_type",{autopick:+!g})}})}),(0,r.jsx)(i.Ki.Item,{label:"Auto Return",children:(0,r.jsx)(i.$n,{content:x?"Yes":"No",selected:x,onClick:function(){return l("set_auto_return",{autoret:+!x})}})}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Proceed",icon:"play",onClick:function(){return l("start")}}),(0,r.jsx)(i.$n,{content:"Return Home",icon:"home",onClick:function(){return l("home")}})]})]})]})}},9749:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_nanobank:()=>u});var r=t(8138),i=t(4530),o=t(7790),l=t(3268),a=t(2864);function c(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.note;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.wn,{children:l}),(0,r.jsx)(i.$n,{icon:"pen",onClick:function(){return t("Edit")},content:"Edit"})]})}},4702:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_power:()=>l});var r=t(8138),i=t(2864),o=t(1784),l=function(e){var n=(0,i.Oc)();return n.act,n.data,(0,r.jsx)(o.PowerMonitorMainContent,{})}},6651:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_secbot:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).beepsky.active;return(0,r.jsx)(i.az,{children:t?(0,r.jsx)(c,{}):(0,r.jsx)(a,{})})},a=function(e){var n=(0,o.Oc)(),t=n.act;return n.data.beepsky.bots.map(function(e){return(0,r.jsx)(i.az,{children:(0,r.jsx)(i.$n,{content:e.Name,icon:"cog",onClick:function(){return t("control",{bot:e.uid})}})},e.Name)})},c=function(e){var n,t=(0,o.Oc)(),l=t.act,a=t.data.beepsky,c=a.botstatus,s=a.active,u=c.mode,d=c.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,r.jsxs)(i.wn,{title:s,children:[-1===u&&(0,r.jsx)(i.az,{color:"red",bold:!0,children:"Waiting for response..."}),(0,r.jsxs)(i.Ki,{children:[(0,r.jsx)(i.Ki.Item,{label:"Location",children:d}),(0,r.jsx)(i.Ki.Item,{label:"Status",children:n}),(0,r.jsxs)(i.Ki.Item,{label:"Controls",children:[(0,r.jsx)(i.$n,{content:"Go",icon:"play",onClick:function(){return l("go")}}),(0,r.jsx)(i.$n,{content:"Stop",icon:"stop",onClick:function(){return l("stop")}}),(0,r.jsx)(i.$n,{content:"Summon",icon:"arrow-down",onClick:function(){return l("summon")}})]})]})]})}},7155:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_security:()=>l});var r=t(8138),i=t(2864),o=t(4455),l=function(e){var n=(0,i.Oc)().data;return(0,r.jsx)(o.SimpleRecords,{data:n,recordType:"SEC"})}},7024:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_signaler:()=>l});var r=t(8138),i=t(2864),o=t(9298),l=function(e){var n=(0,i.Oc)(),t=(n.act,n.data);return(0,r.jsx)(o.Signaler,{data:t})}},7148:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_status_display:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=n.act,l=n.data.records;return(0,r.jsx)(i.az,{children:(0,r.jsxs)(i.Ki,{children:[(0,r.jsxs)(i.Ki.Item,{label:"Code",children:[(0,r.jsx)(i.$n,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return t("Status",{statdisp:0})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return t("Status",{statdisp:1})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return t("Status",{statdisp:2})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return t("Status",{statdisp:3,alert:"redalert"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return t("Status",{statdisp:3,alert:"default"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return t("Status",{statdisp:3,alert:"lockdown"})}}),(0,r.jsx)(i.$n,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return t("Status",{statdisp:3,alert:"biohazard"})}})]}),(0,r.jsx)(i.Ki.Item,{label:"Message line 1",children:(0,r.jsx)(i.$n,{content:l.message1+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:1})}})}),(0,r.jsx)(i.Ki.Item,{label:"Message line 2",children:(0,r.jsx)(i.$n,{content:l.message2+" (set)",icon:"pen",onClick:function(){return t("SetMessage",{msgnum:2})}})})]})})}},7632:function(e,n,t){"use strict";t.r(n),t.d(n,{pda_supplyrecords:()=>l});var r=t(8138),i=t(7790),o=t(2864),l=function(e){var n=(0,o.Oc)(),t=(n.act,n.data).supply,l=t.shuttle_loc,a=t.shuttle_time,c=t.shuttle_moving,s=t.approved,u=t.approved_count,d=t.requests,f=t.requests_count;return(0,r.jsxs)(i.az,{children:[(0,r.jsx)(i.Ki,{children:(0,r.jsx)(i.Ki.Item,{label:"Shuttle Status",children:c?(0,r.jsxs)(i.az,{children:["In transit ",a]}):(0,r.jsx)(i.az,{children:l})})}),(0,r.jsx)(i.wn,{mt:1,title:"Requested Orders",children:f>0&&d.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)})}),(0,r.jsx)(i.wn,{title:"Approved Orders",children:u>0&&s.map(function(e){return(0,r.jsxs)(i.az,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)})})]})}},9136:function(e,n,t){"use strict";t.d(n,{P:()=>d});var r=t(8138),i=t(4530),o=t(1128),l=t(5490),a=t(3375);function c(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){var n=e.className,t=e.theme,i=void 0===t?"nanotrasen":t,o=e.children,d=u(e,["className","theme","children"]);return document.documentElement.className="theme-".concat(i),(0,r.jsx)("div",{className:"theme-"+i,children:(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout",n,(0,a.WP)(d)])},(0,a.Fl)(d)),{children:o}))})}d.Content=function(e){var n=e.className,t=e.scrollable,d=e.children,f=u(e,["className","scrollable","children"]),h=(0,i.useRef)(null);return(0,i.useEffect)(function(){var e=h.current;return e&&t&&(0,o.tk)(e),function(){e&&t&&(0,o.WK)(e)}},[]),(0,r.jsx)("div",s(c({className:(0,l.Ly)(["Layout__content",t&&"Layout__content--scrollable",n,(0,a.WP)(f)]),ref:h},(0,a.Fl)(f)),{children:d}))}},2372:function(e,n,t){"use strict";t(8138),t(7790),t(5490),t(2864),t(1956),t(9136)},7655:function(e,n,t){"use strict";t.d(n,{c:()=>s});var r=t(8138),i=t(7790),o=t(2316),l=t(5490),a=t(3268),c=t(2864);function s(e){var n=e.className,t=e.title,s=e.status,u=e.canClose,d=e.fancy,f=e.onDragStart,h=e.onClose,m=e.children;c.J3.dispatch;var p="string"==typeof t&&t===t.toLowerCase()&&(0,a.Sn)(t)||t;return(0,r.jsxs)("div",{className:(0,l.Ly)(["TitleBar",n]),children:[(0,r.jsx)("div",{className:"TitleBar__dragZone",onMouseDown:function(e){return d&&f&&f(e)}}),void 0===s?(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",name:"tools",opacity:.5}):(0,r.jsx)(i.In,{className:"TitleBar__statusIcon",color:function(e){switch(e){case o.KA:return"good";case o.bz:return"average";case o.KS:default:return"bad"}}(s),name:s===o.KS?"eye-slash":"eye"}),(0,r.jsx)("div",{className:"TitleBar__title",children:p}),!!m&&(0,r.jsx)("div",{className:"TitleBar__buttons",children:m}),!1,!!(d&&u)&&(0,r.jsx)("div",{className:"TitleBar__close",onClick:h,children:(0,r.jsx)(i.In,{className:"TitleBar__close--icon",name:"times"})})]})}t(3123)},7334:function(e,n,t){"use strict";t.d(n,{p:()=>b});var r=t(8138),i=t(4530),o=t(2316),l=t(5490),a=t(3268),c=t(2864),s=t(1956),u=t(6400),d=t(2533),f=t(9136),h=t(7655);function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(e,["className","fitted","children"]);return(0,r.jsx)(f.P.Content,x(p({className:(0,l.Ly)(["Window__content",n])},o),{children:t&&i||(0,r.jsx)("div",{className:"Window__contentPadding",children:i})}))}},3384:function(e,n,t){"use strict";t.d(n,{p8:()=>r.p}),t(9136),t(2372);var r=t(7334)},2533:function(e,n,t){"use strict";function r(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,v:()=>a});var o=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Generic",t=arguments.length,r=Array(t>2?t-2:0),o=2;o=2){var l=[n].concat(i(r)).map(function(e){var n;return"string"==typeof e?e:(null!=(n=Error)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n)?e.stack||String(e):JSON.stringify(e)}).filter(function(e){return e}).join(" ")+"\nUser Agent: "+navigator.userAgent;Byond.sendMessage({type:"log",ns:n,message:l})}},l=function(e){return{debug:function(){for(var n=arguments.length,t=Array(n),r=0;rc,Su:()=>s,XX:()=>u});var r,i=t(9227),o=t(1843);(0,t(2533).h)("renderer");var l=!0,a=!1;function c(){l=l||"resumed",a=!1}function s(){a=!0}function u(e){if(i.k.mark("render/start"),!r){var n=document.getElementById("react-root");r=(0,o.createRoot)(n)}r.render(e),i.k.mark("render/finish"),!a&&l&&(l=!1)}},483:function(e,n,t){"use strict";t.d(n,{l:()=>f,z:()=>s});var r=t(8138),i=t(7790),o=t(2864),l=t(1956),a=t(3384),c=t(4808),s=function(e,n){return function(){return(0,r.jsx)(a.p8,{children:(0,r.jsxs)(a.p8.Content,{scrollable:!0,children:["notFound"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," was not found."]}),"missingExport"===e&&(0,r.jsxs)("div",{children:["Interface ",(0,r.jsx)("b",{children:n})," is missing an export."]})]})})}};function u(){return(0,r.jsx)(a.p8,{children:(0,r.jsx)(a.p8.Content,{scrollable:!0})})}function d(){return(0,r.jsx)(a.p8,{height:130,title:"Loading",width:150,children:(0,r.jsx)(a.p8.Content,{children:(0,r.jsxs)(i.BJ,{align:"center",fill:!0,justify:"center",vertical:!0,children:[(0,r.jsx)(i.BJ.Item,{children:(0,r.jsx)(i.In,{color:"blue",name:"toolbox",spin:!0,size:4})}),(0,r.jsx)(i.BJ.Item,{children:"Please wait..."})]})})})}function f(){var e,n=(0,o.Oc)(),t=n.suspended,r=n.config;if((0,l.Lo)().kitchenSink,t)return u;if(null==r?void 0:r.refreshing)return d;for(var i=null==r?void 0:r.interface,a=[function(e){return"./".concat(e,".tsx")},function(e){return"./".concat(e,".jsx")},function(e){return"./".concat(e,"/index.tsx")},function(e){return"./".concat(e,"/index.jsx")}];!e&&a.length>0;){var f=a.shift()(i);try{e=c(f)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw e}}if(!e)return s("notFound",i);var h=e[i];return h||s("missingExport",i)}},7997:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(2533);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);ta});var r=t(8138),i=t(1699),o=t(7790),l=t(9582),a={title:"Storage",render:function(){return(0,r.jsx)(c,{})}},c=function(e){return window.localStorage?(0,r.jsx)(o.wn,{title:"Local Storage",buttons:(0,r.jsx)(o.$n,{icon:"recycle",onClick:function(){localStorage.clear(),i.IG.clear()},children:"Clear"}),children:(0,r.jsxs)(o.Ki,{children:[(0,r.jsx)(o.Ki.Item,{label:"Keys in use",children:localStorage.length}),(0,r.jsx)(o.Ki.Item,{label:"Remaining space",children:(0,l.QL)(localStorage.remainingSpace,0,"B")})]})}):(0,r.jsx)(o.IC,{children:"Local storage is not available."})}},9615:function(e,n,t){"use strict";t.r(n),t.d(n,{meta:()=>c});var r=t(8138),i=t(4530),o=t(7790),l=t(7218);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);tl,sendMessage:()=>o,setupHotReloading:()=>a,subscribe:()=>i});let r=[];function i(e){r.push(e)}function o(e){}function l(e,n){}function a(){}}},r={};function i(e){var n=r[e];if(void 0!==n)return n.exports;var o=r[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,i.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return i.d(n,{a:n}),n},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(t,r){if(1&r&&(t=this(t)),8&r||"object"==typeof t&&t&&(4&r&&t.__esModule||16&r&&"function"==typeof t.then))return t;var o=Object.create(null);i.r(o);var l={};e=e||[null,n({}),n([]),n(n)];for(var a=2&r&&t;"object"==typeof a&&!~e.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(e=>{l[e]=()=>t[e]});return l.default=()=>t,i.d(o,l),o},i.d=(e,n)=>{for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.k=e=>""+e+".css",i.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),i.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.p="/",i.rv=()=>"1.5.8",i.ruid="bundler=rspack@1.5.8",(()=>{"use strict";var e,n=i(8138);i(5810),i(8232),i(5153),i(4620),i(9258),i(3001),i(4648),i(5616),i(2186),i(6070),i(8523),i(4372),i(8500),i(9782),i(9770);var t=i(9227),r=i(1128),o=i(1874),l=i(2864),a=i(4530),c=i(8595),s=i(2533);function u(){return(0,a.useEffect)(function(){0===Object.keys(Byond.iconRefMap).length&&(function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return fetch(n,t).catch(function(){return new Promise(function(i){setTimeout(function(){e(n,t,r).then(i)},r)})})})((0,c.l)("icon_ref_map.json")).then(function(e){return e.json()}).then(function(e){return Byond.iconRefMap=e}).catch(function(e){return s.v.log(e)})},[]),null}function d(){return(0,n.jsx)(a.Suspense,{fallback:null,children:(0,n.jsx)(u,{})})}function f(){var e=(0,i(483).l)(l.J3);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{}),(0,n.jsx)(d,{})]})}var h=function(){document.addEventListener("click",function(e){for(var n=e.target;;){if(!n||n===document.body)return;if("a"===String(n.tagName).toLowerCase())break;n=n.parentElement}var t=n.getAttribute("href")||"";if(!("?"===t.charAt(0)||t.startsWith("byond://"))){e.preventDefault();var r=t;r.toLowerCase().startsWith("www")&&(r="https://"+r),Byond.sendMessage({type:"openLink",url:r})}})},m=i(2901),p=i(5900);function x(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t1?t-1:0),i=1;ie.length)&&(n=e.length);for(var t=0,r=Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},t=n.sideEffects,r=n.reducer,i=n.middleware,o=b([(0,p.HY)({debug:y.A$,backend:l.jB}),r]),a=void 0===t||t?w((null==i?void 0:i.pre)||[]).concat([c.h,l.pX],w((null==i?void 0:i.post)||[])):[],s=p.Tw.apply(void 0,w(a)),u=(0,p.y$)(o,s);return window.__store__=u,window.__augmentStack__=(e=u,function(n,t){(t=t||Error(n.split("\n")[0])).stack=t.stack||n,k.log("FatalError:",t);var r,i,o=e.getState(),l=null==o||null==(r=o.backend)?void 0:r.config;return n+"\nUser Agent: "+navigator.userAgent+"\nState: "+JSON.stringify({ckey:null==l||null==(i=l.client)?void 0:i.ckey,interface:null==l?void 0:l.interface,window:null==l?void 0:l.window})}),u}();!function e(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):((0,l.H$)(_),(0,r.y4)(),(0,o.Bm)({keyUpVerb:"Key_Up",keyDownVerb:"Key_Down",verbParamsFn:function(e,n){return"".concat(e,' "').concat(n,'"')}}),h(),_.subscribe(function(){return(0,m.XX)((0,n.jsx)(f,{}))}),Byond.subscribe(function(e,n){return _.dispatch({type:e,payload:n})}))}()})()})(); \ No newline at end of file