diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm
index 33879680bd..84709a78b1 100644
--- a/code/__HELPERS/_logging.dm
+++ b/code/__HELPERS/_logging.dm
@@ -118,6 +118,9 @@
//reusing the PDA option because I really don't think news comments are worth a config option
WRITE_LOG(GLOB.world_pda_log, "COMMENT: [text]")
+/proc/log_paper(text)
+ WRITE_LOG(GLOB.world_paper_log, "PAPER: [text]")
+
/proc/log_telecomms(text)
if (CONFIG_GET(flag/log_telecomms))
WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]")
diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm
index b0a22f1d54..e9f98f836e 100644
--- a/code/_globalvars/logging.dm
+++ b/code/_globalvars/logging.dm
@@ -32,6 +32,8 @@ GLOBAL_VAR(world_asset_log)
GLOBAL_PROTECT(world_asset_log)
GLOBAL_VAR(world_map_error_log)
GLOBAL_PROTECT(world_map_error_log)
+GLOBAL_VAR(world_paper_log)
+GLOBAL_PROTECT(world_paper_log)
GLOBAL_VAR(subsystem_log)
GLOBAL_PROTECT(subsystem_log)
GLOBAL_VAR(reagent_log)
diff --git a/code/game/world.dm b/code/game/world.dm
index 5d54c92661..c60fb5c4d6 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -132,6 +132,7 @@ GLOBAL_LIST(topic_status_cache)
GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log"
GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log"
GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log"
+ GLOB.world_paper_log = "[GLOB.log_directory]/paper.log"
GLOB.tgui_log = "[GLOB.log_directory]/tgui.log"
GLOB.subsystem_log = "[GLOB.log_directory]/subsystem.log"
GLOB.reagent_log = "[GLOB.log_directory]/reagents.log"
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 2747932907..acae918d8b 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -5,6 +5,8 @@
desc = "A canister for the storage of gas."
icon_state = "yellow"
density = TRUE
+ ui_x = 300
+ ui_y = 232
var/valve_open = FALSE
var/obj/machinery/atmospherics/components/binary/passive_gate/pump
@@ -34,6 +36,7 @@
var/restricted = FALSE
req_access = list()
+ var/update = 0
var/static/list/label2types = list(
"n2" = /obj/machinery/portable_atmospherics/canister/nitrogen,
"o2" = /obj/machinery/portable_atmospherics/canister/oxygen,
@@ -159,11 +162,11 @@
/obj/machinery/portable_atmospherics/canister/proto
name = "prototype canister"
+
/obj/machinery/portable_atmospherics/canister/proto/default
name = "prototype canister"
desc = "The best way to fix an atmospheric emergency... or the best way to introduce one."
icon_state = "proto"
- icon_state = "proto"
volume = 5000
max_integrity = 300
temperature_resistance = 2000 + T0C
@@ -171,6 +174,7 @@
can_min_release_pressure = (ONE_ATMOSPHERE / 30)
prototype = TRUE
+
/obj/machinery/portable_atmospherics/canister/proto/default/oxygen
name = "prototype canister"
desc = "A prototype canister for a prototype bike, what could go wrong?"
@@ -192,6 +196,7 @@
update_icon()
+
/obj/machinery/portable_atmospherics/canister/Destroy()
qdel(pump)
pump = null
@@ -215,7 +220,6 @@
/obj/machinery/portable_atmospherics/canister/update_overlays()
. = ..()
-
if(holding)
. += "can-open"
if(connected_port)
@@ -245,7 +249,8 @@
new /obj/item/stack/sheet/metal (loc, 5)
qdel(src)
-/obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
+obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
+ ..()
if(user.a_intent == INTENT_HARM)
return FALSE
@@ -261,7 +266,8 @@
return TRUE
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
- if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
+ . = ..()
+ if(!.)
return
canister_break()
@@ -272,10 +278,9 @@
T.assume_air(expelled_gas)
air_update_turf()
- stat |= BROKEN
+ obj_break()
density = FALSE
- playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
- update_icon()
+ playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
investigate_log("was destroyed.", INVESTIGATE_ATMOS)
if(holding)
@@ -318,7 +323,7 @@
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
- ui = new(user, src, ui_key, "Canister", name, 420, 405, master_ui, state)
+ ui = new(user, src, ui_key, "Canister", name, ui_x, ui_y, master_ui, state)
ui.open()
/obj/machinery/portable_atmospherics/canister/ui_data()
@@ -353,7 +358,7 @@
return
switch(action)
if("relabel")
- var/label = input("New canister label:", name) as null|anything in label2types
+ var/label = input("New canister label:", name) as null|anything in sortList(label2types)
if(label && !..())
var/newtype = label2types[label]
if(newtype)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index dcce95f448..8dd814c604 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -4,12 +4,19 @@
*
* lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
*/
+#define MAX_PAPER_LENGTH 5000
+#define MAX_PAPER_STAMPS 30 // Too low?
+#define MAX_PAPER_STAMPS_OVERLAYS 4
+#define MODE_READING 0
+#define MODE_WRITING 1
+#define MODE_STAMPING 2
/**
** Paper is now using markdown (like in github pull notes) for ALL rendering
** so we do loose a bit of functionality but we gain in easy of use of
** paper and getting rid of that crashing bug
**/
/obj/item/paper
+ var/static/regex/sign_regex = regex("%s(?:ign)?(?=\\s|$)", "igm")
name = "paper"
gender = NEUTER
icon = 'icons/obj/bureaucracy.dmi'
@@ -27,28 +34,37 @@
dog_fashion = /datum/dog_fashion/head
color = "white"
/// What's actually written on the paper.
- var/info
+ var/info = ""
/// The (text for the) stamps on the paper.
- var/stamps
- var/list/stamped
+ var/list/stamps /// Positioning for the stamp in tgui
+ var/list/stamped /// Overlay info
/// This REALLY should be a componenet. Basicly used during, april fools
/// to honk at you
var/rigged = 0
var/spam_flag = 0
- ///
+
var/contact_poison // Reagent ID to transfer on contact
var/contact_poison_volume = 0
var/ui_x = 600
var/ui_y = 800
- /// When a piece of paper cannot be edited, this makes it mutable
- var/finalized = FALSE
- /// We MAY be edited, mabye we are just looking at it or something.
- var/readonly = FALSE
- /// Color of the pin that wrote on this paper
+ /// When the sheet can be "filled out"
+ /// This is an associated list
+ var/list/form_fields = null
+ var/field_counter = 1
+ /// What edit mode we are in and who is
+ /// writing on it right now
+ var/edit_mode = MODE_READING
+ var/mob/living/edit_usr = null
+ /// Setup for writing to a sheet
var/pen_color = "black"
+ var/pen_font = ""
+ var/is_crayon = FALSE
+ /// Setup for stamping a sheet
+ var/obj/item/stamp/current_stamp = null
+ var/stamp_class = null
/**
** This proc copies this sheet of paper to a new
@@ -58,12 +74,12 @@
/obj/item/paper/proc/copy()
var/obj/item/paper/N = new(arglist(args))
N.info = info
- N.pen_color = pen_color
N.color = color
- N.finalized = TRUE
N.update_icon_state()
N.stamps = stamps
N.stamped = stamped.Copy()
+ N.form_fields = form_fields.Copy()
+ N.field_counter = field_counter
copy_overlays(N, TRUE)
return N
@@ -72,9 +88,10 @@
** icons. You can modify the pen_color after if need
** be.
**/
-/obj/item/paper/proc/setText(text, read_only = TRUE)
- readonly = read_only
+/obj/item/paper/proc/setText(text)
info = text
+ form_fields = null
+ field_counter = 0
update_icon_state()
/obj/item/paper/pickup(user)
@@ -108,6 +125,7 @@
var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/paper)
. = replacetext(html, "", assets.css_tag())
+
/obj/item/paper/verb/rename()
set name = "Rename paper"
set category = "Object"
@@ -132,13 +150,17 @@
user.visible_message("[user] scratches a grid on [user.p_their()] wrist with the paper! It looks like [user.p_theyre()] trying to commit sudoku...")
return (BRUTELOSS)
-/// ONLY USED FOR APRIL FOOLS
+/// ONLY USED FOR APRIL FOOLS
/obj/item/paper/proc/reset_spamflag()
spam_flag = FALSE
+
/obj/item/paper/attack_self(mob/user)
- readonly = TRUE /// Assume we are just reading it
+ if(edit_usr == user)
+ // we are shifting out of editing mode
+ edit_mode = MODE_READING
+ edit_usr = null
if(rigged && (SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
if(!spam_flag)
spam_flag = TRUE
@@ -148,8 +170,7 @@
/obj/item/paper/proc/clearpaper()
- finalized = FALSE
- info = null
+ info = ""
stamps = null
LAZYCLEARLIST(stamped)
cut_overlays()
@@ -159,49 +180,56 @@
/obj/item/paper/can_interact(mob/user)
if(!..())
return FALSE
- if(resistance_flags & ON_FIRE) /// Are we on fire? Hard ot read if so
+ if(resistance_flags & ON_FIRE) // Are we on fire? Hard ot read if so
return FALSE
- if(user.is_blind()) /// Even harder to read if your blind...braile? humm
+ if(user.is_blind()) // Even harder to read if your blind...braile? humm
return FALSE
return user.can_read(src) // checks if the user can read.
/obj/item/paper/attackby(obj/item/P, mob/living/carbon/human/user, params)
- readonly = TRUE /// Assume we are just reading it
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
- if(finalized)
- to_chat(user, "This sheet of paper has already been written too!")
+ if(length(info) >= MAX_PAPER_LENGTH) // Sheet must have less than 1000 charaters
+ to_chat(user, "This sheet of paper is full!")
return
- readonly = FALSE /// Nope we are going to write stuff
- /// should a crayon be in the same subtype as a pen? How about a brush or charcoal?
- if(istype(P, /obj/item/pen))
- var/obj/item/pen/PEN = P
- pen_color = PEN.colour
- else
+ if(edit_mode != MODE_READING)
+ to_chat(user, "[edit_usr] is already working on this sheet!")
+ return
+
+ edit_mode = MODE_WRITING
+ edit_usr = user
+ // should a crayon be in the same subtype as a pen? How about a brush or charcoal?
+ // TODO: Convert all writing stuff to one type, /obj/item/art_tool maybe?
+ is_crayon = istype(P, /obj/item/toy/crayon);
+ if(is_crayon)
var/obj/item/toy/crayon/PEN = P
- pen_color = PEN.crayon_color
+ pen_font = CRAYON_FONT
+ pen_color = PEN.paint_color
+ else
+ var/obj/item/pen/PEN = P
+ pen_font = PEN.font
+ pen_color = PEN.colour
+
ui_interact(user)
return
else if(istype(P, /obj/item/stamp))
- if(!in_range(src, user))
+ if(edit_mode != MODE_READING)
+ to_chat(user, "[edit_usr] is already working on this sheet!")
return
+ edit_mode = MODE_STAMPING // we are read only becausse the sheet is full
+ edit_usr = user
+ current_stamp = P
+
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/simple/paper)
- if(isnull(stamps))
- stamps = sheet.css_tag()
- stamps += sheet.icon_tag(P.icon_state)
- var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[P.icon_state]")
- stampoverlay.pixel_x = rand(-2, 2)
- stampoverlay.pixel_y = rand(-3, 2)
+ stamp_class = sheet.icon_class_name(P.icon_state)
- LAZYADD(stamped, P.icon_state)
- add_overlay(stampoverlay)
-
- to_chat(user, "You stamp the paper with your rubber stamp.")
+ to_chat(user, "You ready your stamp over the paper! ")
+ ui_interact(user)
return /// Normaly you just stamp, you don't need to read the thing
- if(P.get_temperature())
+ else if(P.get_temperature())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("[user] accidentally ignites [user.p_them()]self!", \
"You miss the paper and accidentally light yourself on fire!")
@@ -210,15 +238,19 @@
user.IgniteMob()
return
- if(!(in_range(user, src))) //to prevent issues as a result of telepathically lighting a paper
- return
-
user.dropItemToGround(src)
user.visible_message("[user] lights [src] ablaze with [P]!", "You light [src] on fire!")
fire_act()
+ else
+ if(edit_mode != MODE_READING)
+ to_chat(user, "You look at the sheet while [edit_usr] edits it")
+ else
+ edit_mode = MODE_READING
+ ui_interact(user) // The other ui will be created with just read mode outside of this
. = ..()
+
/obj/item/paper/fire_act(exposed_temperature, exposed_volume)
..()
if(!(resistance_flags & FIRE_PROOF))
@@ -235,25 +267,58 @@
if(!ui)
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/paper)
assets.send(user)
- /// The x size is because we double the width for the editor
- ui = new(user, src, ui_key, "PaperSheet", name, 400, 600, master_ui, state)
+ // The x size is because we double the width for the editor
+ ui = new(user, src, ui_key, "PaperSheet", name, ui_x, ui_y, master_ui, state)
ui.set_autoupdate(FALSE)
ui.open()
+
+/obj/item/paper/ui_close(mob/user)
+ /// close the editing window and change the mode
+ if(edit_usr != null && user == edit_usr)
+ edit_mode = MODE_READING
+ edit_usr = null
+ current_stamp = null
+ stamp_class = null
+
+ . = ..()
+
+
+/obj/item/paper/proc/ui_force_close()
+ var/datum/tgui/ui = SStgui.try_update_ui(usr, src, "main");
+ if(ui)
+ ui.close()
+
+
/obj/item/paper/proc/ui_update()
var/datum/tgui/ui = SStgui.try_update_ui(usr, src, "main");
if(ui)
ui.update()
+
/obj/item/paper/ui_data(mob/user)
var/list/data = list()
+ // Should all this go in static data and just do a forced update?
data["text"] = info
- data["paper_state"] = icon_state /// TODO: show the sheet will bloodied or crinkling
- data["pen_color"] = pen_color
- data["paper_color"] = color || "white" // color might not be set
- data["edit_sheet"] = readonly || finalized ? FALSE : TRUE
- /// data["stamps_info"] = list(stamp_info)
+ data["max_length"] = MAX_PAPER_LENGTH
+ data["paper_state"] = icon_state /// TODO: show the sheet will bloodied or crinkling?
+ data["paper_color"] = !color || color == "white" ? "#FFFFFF" : color // color might not be set
data["stamps"] = stamps
+
+ if(edit_usr == null || user != edit_usr)
+ data["edit_mode"] = MODE_READING /// Eveyone else is just an observer
+ else
+ data["edit_mode"] = edit_mode
+
+ // pen info for editing
+ data["is_crayon"] = is_crayon
+ data["pen_font"] = pen_font
+ data["pen_color"] = pen_color
+
+ // stamping info for..stamping
+ data["stamp_class"] = stamp_class
+ data["field_counter"] = field_counter
+
return data
@@ -261,19 +326,73 @@
if(..())
return
switch(action)
+ if("stamp")
+ var/stamp_x = text2num(params["x"])
+ var/stamp_y = text2num(params["y"])
+ var/stamp_r = text2num(params["r"]) // rotation in degrees
+
+ if (isnull(stamps))
+ stamps = new/list()
+ if(stamps.len < MAX_PAPER_STAMPS)
+ // I hate byond when dealing with freaking lists
+ stamps += list(list(stamp_class, stamp_x, stamp_y,stamp_r)) /// WHHHHY
+
+ /// This does the overlay stuff
+ if (isnull(stamped))
+ stamped = new/list()
+ if(stamped.len < MAX_PAPER_STAMPS_OVERLAYS)
+ var/mutable_appearance/stampoverlay = mutable_appearance('icons/obj/bureaucracy.dmi', "paper_[current_stamp.icon_state]")
+ stampoverlay.pixel_x = rand(-2, 2)
+ stampoverlay.pixel_y = rand(-3, 2)
+ add_overlay(stampoverlay)
+ LAZYADD(stamped, current_stamp.icon_state)
+
+ edit_usr.visible_message("[edit_usr] stamps [src] with [current_stamp]!", "You stamp [src] with [current_stamp]!")
+ else
+ to_chat(usr, pick("You try to stamp but you miss!", "There is no where else you can stamp!"))
+
+ ui_update()
+ . = TRUE
+
if("save")
var/in_paper = params["text"]
- if(length(in_paper) > 0 && length(in_paper) < 1000) // Sheet must have less than 1000 charaters
- info = in_paper
- finalized = TRUE // once you have writen to a sheet you cannot write again
- to_chat(usr, "You have finished your paper masterpiece!");
- ui_update()
- else
+ var/paper_len = length(in_paper)
+ var/list/fields = params["form_fields"]
+ field_counter = params["field_counter"] ? text2num(params["field_counter"]) : field_counter
+
+ if(paper_len > MAX_PAPER_LENGTH)
+ // Side note, the only way we should get here is if
+ // the javascript was modified, somehow, outside of
+ // byond.
+ log_paper("[key_name(edit_usr)] writing to paper [name], and overwrote it by [paper_len-MAX_PAPER_LENGTH], aborting")
+ ui_force_close()
+ else if(paper_len == 0)
to_chat(usr, pick("Writing block strikes again!", "You forgot to write anthing!"))
- ui_update()
+ ui_force_close()
+ else
+ // Next find the sign marker and replace it with somones sig
+ // All other processing should of been done in the js module
+ in_paper = sign_regex.Replace(in_paper, "[edit_usr]")
+ // Do the same with form fields
+ log_paper("[key_name(edit_usr)] writing to paper [name]")
+ if(info != in_paper)
+ to_chat(usr, "You have added to your paper masterpiece!");
+ info = in_paper
+ if(!fields) //Possible runtiming
+ return
+ if(fields && fields.len > 0)
+ for(var/key in fields) // In case somone %sign in a field
+ form_fields[key] = sign_regex.Replace(fields[key], "[edit_usr]")
+
+ /// Switch ui to reading mode
+ edit_mode = MODE_READING
+ edit_usr = null
+ ui_update()
update_icon()
+
. = TRUE
+
/*
* Construction paper
*/
@@ -305,3 +424,10 @@
/obj/item/paper/crumpled/muddy
icon_state = "scrap_mud"
+
+#undef MAX_PAPER_LENGTH
+#undef MAX_PAPER_STAMPS
+#undef MAX_PAPER_STAMPS_OVERLAYS
+#undef MODE_READING
+#undef MODE_WRITING
+#undef MODE_STAMPING
diff --git a/tgui/packages/tgui/interfaces/Canister.js b/tgui/packages/tgui/interfaces/Canister.js
index 4e21b331f8..e369f798cd 100644
--- a/tgui/packages/tgui/interfaces/Canister.js
+++ b/tgui/packages/tgui/interfaces/Canister.js
@@ -1,5 +1,8 @@
+import { toFixed } from 'common/math';
+import { Fragment } from 'inferno';
import { useBackend } from '../backend';
-import { AnimatedNumber, Box, Button, Flex, Knob, LabeledList, NoticeBox, Section } from '../components';
+import { AnimatedNumber, Box, Button, Icon, Knob, LabeledControls, LabeledList, Section, Tooltip } from '../components';
+import { formatSiUnit } from '../format';
import { Window } from '../layouts';
export const Canister = (props, context) => {
@@ -20,82 +23,105 @@ export const Canister = (props, context) => {
return (
"+e+"
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o=n(9),r=n(73),a=n(50),i=n(27),c=n(36),l=n(18),d=n(125),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=i(e),t=c(t,!0),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function o(e,t,n,o,r,a,i){try{var c=e[a](i),l=c.value}catch(d){return void n(d)}c.done?t(l):Promise.resolve(l).then(o,r)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0;var r=window.Byond,a=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),i=null!==a&&a<=6;t.IS_IE8=i;var c=function(e,t){void 0===t&&(t={}),r.call(e,t)};t.callByond=c;var l=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,o=new Promise((function(e){window.__callbacks__.push(e)}));return r.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),o};t.callByondAsync=l;t.runCommand=function(e){return c("winset",{command:e})};var d=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l("winget",{id:e,property:t});case 2:return o=n.sent,n.abrupt("return",o[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function c(e){o(i,r,a,c,l,"next",e)}function l(e){o(i,r,a,c,l,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=d;t.winset=function(e,t,n){var o;return c("winset",((o={})[e+"."+t]=n,o))}},function(e,t,n){"use strict";e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var o=n(7),r=n(31),a=n(18),i=n(91),c=n(92),l=n(37),d=l.get,u=l.enforce,s=String(String).split("String");(e.exports=function(e,t,n,c){var l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||r(n,"name",t),u(n).source=s.join("string"==typeof t?t:"")),e!==o?(l?!p&&e[t]&&(d=!0):delete e[t],d?e[t]=n:r(e,t,n)):d?e[t]=n:i(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&d(this).source||c(this)}))},function(e,t,n){"use strict";var o=n(9),r=n(5),a=n(18),i=Object.defineProperty,c={},l=function(e){throw e};e.exports=function(e,t){if(a(c,e))return c[e];t||(t={});var n=[][e],d=!!a(t,"ACCESSORS")&&t.ACCESSORS,u=a(t,0)?t[0]:l,s=a(t,1)?t[1]:undefined;return c[e]=!!n&&!r((function(){if(d&&!o)return!0;var e={length:-1};d?i(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,u,s)}))}},function(e,t,n){"use strict";var o=n(60),r=n(24);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(129),r=n(18),a=n(135),i=n(14).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";var o=n(24),r=/"/g;e.exports=function(e,t,n,a){var i=String(o(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(a).replace(r,""")+'"'),c+">"+i+""+t+">"}},function(e,t,n){"use strict";var o=n(5);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o=n(9),r=n(14),a=n(50);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"CentCom",freq:1337,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:"Medical",freq:1355,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"AI Private",freq:1447,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,a,i=n(127),c=n(7),l=n(8),d=n(31),u=n(18),s=n(74),p=n(62),m=c.WeakMap;if(i){var f=new m,h=f.get,C=f.has,g=f.set;o=function(e,t){return g.call(f,e,t),t},r=function(e){return h.call(f,e)||{}},a=function(e){return C.call(f,e)}}else{var b=s("state");p[b]=!0,o=function(e,t){return d(e,b,t),t},r=function(e){return u(e,b)?e[b]:{}},a=function(e){return u(e,b)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(18),r=n(16),a=n(74),i=n(104),c=a("IE_PROTO"),l=Object.prototype;e.exports=i?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var o=n(129),r=n(7),a=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e])||a(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(9),i=n(117),c=n(11),l=n(79),d=n(58),u=n(50),s=n(31),p=n(12),m=n(143),f=n(158),h=n(36),C=n(18),g=n(76),b=n(8),N=n(44),v=n(54),V=n(51).f,y=n(159),k=n(20).forEach,x=n(57),_=n(14),w=n(22),L=n(37),B=n(81),S=L.get,I=L.set,T=_.f,A=w.f,E=Math.round,M=r.RangeError,P=l.ArrayBuffer,R=l.DataView,O=c.NATIVE_ARRAY_BUFFER_VIEWS,D=c.TYPED_ARRAY_TAG,j=c.TypedArray,F=c.TypedArrayPrototype,z=c.aTypedArrayConstructor,W=c.isTypedArray,H=function(e,t){for(var n=0,o=t.length,r=new(z(e))(o);o>n;)r[n]=t[n++];return r},G=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},U=function(e){var t;return e instanceof P||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},K=function(e,t){return W(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},q=function(e,t){return K(e,t=h(t,!0))?u(2,e[t]):A(e,t)},Y=function(e,t,n){return!(K(e,t=h(t,!0))&&b(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?T(e,t,n):(e[t]=n.value,e)};a?(O||(w.f=q,_.f=Y,G(F,"buffer"),G(F,"byteOffset"),G(F,"byteLength"),G(F,"length")),o({target:"Object",stat:!0,forced:!O},{getOwnPropertyDescriptor:q,defineProperty:Y}),e.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,u="set"+e,h=r[c],C=h,g=C&&C.prototype,_={},w=function(e,t){T(e,t,{get:function(){return function(e,t){var n=S(e);return n.view[l](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=S(e);n&&(o=(o=E(o))<0?0:o>255?255:255&o),r.view[u](t*a+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};O?i&&(C=t((function(e,t,n,o){return d(e,C,c),B(b(t)?U(t)?o!==undefined?new h(t,f(n,a),o):n!==undefined?new h(t,f(n,a)):new h(t):W(t)?H(C,t):y.call(C,t):new h(m(t)),e,C)})),v&&v(C,j),k(V(h),(function(e){e in C||s(C,e,h[e])})),C.prototype=g):(C=t((function(e,t,n,o){d(e,C,c);var r,i,l,u=0,s=0;if(b(t)){if(!U(t))return W(t)?H(C,t):y.call(C,t);r=t,s=f(n,a);var h=t.byteLength;if(o===undefined){if(h%a)throw M("Wrong length");if((i=h-s)<0)throw M("Wrong length")}else if((i=p(o)*a)+s>h)throw M("Wrong length");l=i/a}else l=m(t),r=new P(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new R(r)});u0;for(var c in i&&(a=Ce(n))&&he(t,o,n),n)_e(c,null,n[c],o,r,a,null);i&&fe(t,e,o,n,!0,a)}function Le(e,t,n){var o=O(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function Be(e,t,n,o,r,a){var i=new t(n,o),l=i.$N=Boolean(t.getDerivedStateFromProps||i.getSnapshotBeforeUpdate);if(i.$SVG=r,i.$L=a,e.children=i,i.$BS=!1,i.context=o,i.props===p&&(i.props=n),l)i.state=y(i,n,i.state);else if(c(i.componentWillMount)){i.$BR=!0,i.componentWillMount();var u=i.$PS;if(!d(u)){var s=i.state;if(d(s))i.state=u;else for(var m in u)s[m]=u[m];i.$PS=null}i.$BR=!1}return i.$LI=Le(i,n,o),i}function Se(e,t,n,o,r,a){var i=e.flags|=16384;481&i?Te(e,t,n,o,r,a):4&i?function(e,t,n,o,r,a){var i=Be(e,e.type,e.props||p,n,o,a);Se(i.$LI,t,i.$CX,o,r,a),Ee(e.ref,i,a)}(e,t,n,o,r,a):8&i?(!function(e,t,n,o,r,a){Se(e.children=O(function(e,t){return 32768&e.flags?e.type.render(e.props||p,e.ref,t):e.type(e.props||p,t)}(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Me(e,a)):512&i||16&i?Ie(e,t,r):8192&i?function(e,t,n,o,r,a){var i=e.children,c=e.childFlags;12&c&&0===i.length&&(c=e.childFlags=2,i=e.children=M());2===c?Se(i,n,r,o,r,a):Ae(i,n,t,o,r,a)}(e,n,t,o,r,a):1024&i&&function(e,t,n,o,r){Se(e.children,e.ref,t,!1,null,r);var a=M();Ie(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Ie(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||h(t,o,n)}function Te(e,t,n,o,r,i){var c=e.flags,l=e.props,u=e.className,s=e.children,p=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(a(u)||""===u||(o?m.setAttribute("class",u):m.className=u),16===p)_(m,s);else if(1!==p){var f=o&&"foreignObject"!==e.type;2===p?(16384&s.flags&&(e.children=s=E(s)),Se(s,m,n,f,null,i)):8!==p&&4!==p||Ae(s,m,n,f,null,i)}d(t)||h(t,m,r),d(l)||we(e,c,l,m,o),be(e.ref,m,i)}function Ae(e,t,n,o,r,a){for(var i=0;ii)for(p=s;p=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o=n(9),r=n(74),a=n(50),i=n(27),c=n(36),l=n(18),d=n(126),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=i(e),t=c(t,!0),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function o(e,t,n,o,r,a,i){try{var c=e[a](i),l=c.value}catch(d){return void n(d)}c.done?t(l):Promise.resolve(l).then(o,r)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0;var r=window.Byond,a=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),i=null!==a&&a<=6;t.IS_IE8=i;var c=function(e,t){void 0===t&&(t={}),r.call(e,t)};t.callByond=c;var l=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,o=new Promise((function(e){window.__callbacks__.push(e)}));return r.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),o};t.callByondAsync=l;t.runCommand=function(e){return c("winset",{command:e})};var d=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l("winget",{id:e,property:t});case 2:return o=n.sent,n.abrupt("return",o[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function c(e){o(i,r,a,c,l,"next",e)}function l(e){o(i,r,a,c,l,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=d;t.winset=function(e,t,n){var o;return c("winset",((o={})[e+"."+t]=n,o))}},function(e,t,n){"use strict";e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var o=n(7),r=n(31),a=n(18),i=n(91),c=n(92),l=n(37),d=l.get,u=l.enforce,s=String(String).split("String");(e.exports=function(e,t,n,c){var l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||r(n,"name",t),u(n).source=s.join("string"==typeof t?t:"")),e!==o?(l?!p&&e[t]&&(d=!0):delete e[t],d?e[t]=n:r(e,t,n)):d?e[t]=n:i(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&d(this).source||c(this)}))},function(e,t,n){"use strict";var o=n(9),r=n(5),a=n(18),i=Object.defineProperty,c={},l=function(e){throw e};e.exports=function(e,t){if(a(c,e))return c[e];t||(t={});var n=[][e],d=!!a(t,"ACCESSORS")&&t.ACCESSORS,u=a(t,0)?t[0]:l,s=a(t,1)?t[1]:undefined;return c[e]=!!n&&!r((function(){if(d&&!o)return!0;var e={length:-1};d?i(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,u,s)}))}},function(e,t,n){"use strict";var o=n(60),r=n(24);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(130),r=n(18),a=n(136),i=n(15).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";var o=n(24),r=/"/g;e.exports=function(e,t,n,a){var i=String(o(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(a).replace(r,""")+'"'),c+">"+i+""+t+">"}},function(e,t,n){"use strict";var o=n(5);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o=n(9),r=n(15),a=n(50);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"CentCom",freq:1337,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:"Medical",freq:1355,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"AI Private",freq:1447,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,a,i=n(128),c=n(7),l=n(8),d=n(31),u=n(18),s=n(75),p=n(62),m=c.WeakMap;if(i){var f=new m,h=f.get,C=f.has,g=f.set;o=function(e,t){return g.call(f,e,t),t},r=function(e){return h.call(f,e)||{}},a=function(e){return C.call(f,e)}}else{var b=s("state");p[b]=!0,o=function(e,t){return d(e,b,t),t},r=function(e){return u(e,b)?e[b]:{}},a=function(e){return u(e,b)}}e.exports={set:o,get:r,has:a,enforce:function(e){return a(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(18),r=n(16),a=n(75),i=n(104),c=a("IE_PROTO"),l=Object.prototype;e.exports=i?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var o=n(130),r=n(7),a=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?a(o[e])||a(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(7),a=n(9),i=n(117),c=n(11),l=n(80),d=n(58),u=n(50),s=n(31),p=n(12),m=n(144),f=n(159),h=n(36),C=n(18),g=n(77),b=n(8),N=n(44),v=n(54),V=n(51).f,y=n(160),k=n(20).forEach,x=n(57),_=n(15),w=n(22),L=n(37),B=n(82),S=L.get,I=L.set,T=_.f,A=w.f,E=Math.round,M=r.RangeError,P=l.ArrayBuffer,R=l.DataView,O=c.NATIVE_ARRAY_BUFFER_VIEWS,D=c.TYPED_ARRAY_TAG,j=c.TypedArray,F=c.TypedArrayPrototype,z=c.aTypedArrayConstructor,W=c.isTypedArray,H=function(e,t){for(var n=0,o=t.length,r=new(z(e))(o);o>n;)r[n]=t[n++];return r},U=function(e,t){T(e,t,{get:function(){return S(this)[t]}})},G=function(e){var t;return e instanceof P||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},K=function(e,t){return W(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},q=function(e,t){return K(e,t=h(t,!0))?u(2,e[t]):A(e,t)},Y=function(e,t,n){return!(K(e,t=h(t,!0))&&b(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?T(e,t,n):(e[t]=n.value,e)};a?(O||(w.f=q,_.f=Y,U(F,"buffer"),U(F,"byteOffset"),U(F,"byteLength"),U(F,"length")),o({target:"Object",stat:!0,forced:!O},{getOwnPropertyDescriptor:q,defineProperty:Y}),e.exports=function(e,t,n){var a=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,u="set"+e,h=r[c],C=h,g=C&&C.prototype,_={},w=function(e,t){T(e,t,{get:function(){return function(e,t){var n=S(e);return n.view[l](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=S(e);n&&(o=(o=E(o))<0?0:o>255?255:255&o),r.view[u](t*a+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};O?i&&(C=t((function(e,t,n,o){return d(e,C,c),B(b(t)?G(t)?o!==undefined?new h(t,f(n,a),o):n!==undefined?new h(t,f(n,a)):new h(t):W(t)?H(C,t):y.call(C,t):new h(m(t)),e,C)})),v&&v(C,j),k(V(h),(function(e){e in C||s(C,e,h[e])})),C.prototype=g):(C=t((function(e,t,n,o){d(e,C,c);var r,i,l,u=0,s=0;if(b(t)){if(!G(t))return W(t)?H(C,t):y.call(C,t);r=t,s=f(n,a);var h=t.byteLength;if(o===undefined){if(h%a)throw M("Wrong length");if((i=h-s)<0)throw M("Wrong length")}else if((i=p(o)*a)+s>h)throw M("Wrong length");l=i/a}else l=m(t),r=new P(i=l*a);for(I(e,{buffer:r,byteOffset:s,byteLength:i,length:l,view:new R(r)});u0;for(var c in i&&(a=Ce(n))&&he(t,o,n),n)_e(c,null,n[c],o,r,a,null);i&&fe(t,e,o,n,!0,a)}function Le(e,t,n){var o=O(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function Be(e,t,n,o,r,a){var i=new t(n,o),l=i.$N=Boolean(t.getDerivedStateFromProps||i.getSnapshotBeforeUpdate);if(i.$SVG=r,i.$L=a,e.children=i,i.$BS=!1,i.context=o,i.props===p&&(i.props=n),l)i.state=y(i,n,i.state);else if(c(i.componentWillMount)){i.$BR=!0,i.componentWillMount();var u=i.$PS;if(!d(u)){var s=i.state;if(d(s))i.state=u;else for(var m in u)s[m]=u[m];i.$PS=null}i.$BR=!1}return i.$LI=Le(i,n,o),i}function Se(e,t,n,o,r,a){var i=e.flags|=16384;481&i?Te(e,t,n,o,r,a):4&i?function(e,t,n,o,r,a){var i=Be(e,e.type,e.props||p,n,o,a);Se(i.$LI,t,i.$CX,o,r,a),Ee(e.ref,i,a)}(e,t,n,o,r,a):8&i?(!function(e,t,n,o,r,a){Se(e.children=O(function(e,t){return 32768&e.flags?e.type.render(e.props||p,e.ref,t):e.type(e.props||p,t)}(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Me(e,a)):512&i||16&i?Ie(e,t,r):8192&i?function(e,t,n,o,r,a){var i=e.children,c=e.childFlags;12&c&&0===i.length&&(c=e.childFlags=2,i=e.children=M());2===c?Se(i,n,r,o,r,a):Ae(i,n,t,o,r,a)}(e,n,t,o,r,a):1024&i&&function(e,t,n,o,r){Se(e.children,e.ref,t,!1,null,r);var a=M();Ie(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Ie(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||h(t,o,n)}function Te(e,t,n,o,r,i){var c=e.flags,l=e.props,u=e.className,s=e.children,p=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(a(u)||""===u||(o?m.setAttribute("class",u):m.className=u),16===p)_(m,s);else if(1!==p){var f=o&&"foreignObject"!==e.type;2===p?(16384&s.flags&&(e.children=s=E(s)),Se(s,m,n,f,null,i)):8!==p&&4!==p||Ae(s,m,n,f,null,i)}d(t)||h(t,m,r),d(l)||we(e,c,l,m,o),be(e.ref,m,i)}function Ae(e,t,n,o,r,a){for(var i=0;ii)for(p=s;p=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev'+(n?e:H(e,!0))+"\n":"
\n"},t.blockquote=function(e){return""+(n?e:H(e,!0))+"\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
\n":"
\n"},t.list=function(e,t,n){var o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+o+">\n"},t.listitem=function(e){return"\n\n"+e+"\n"+t+"
\n"},t.tablerow=function(e){return"\n"+e+" \n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
":"
"},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='"+n+""},t.image=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='":">"},t.text=function(e){return e},e}(),U=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),q=o.defaults,Y=V.unescape,$=function(){function e(e){this.options=e||q,this.options.renderer=this.options.renderer||new G,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new U,this.slugger=new K}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,o,r,a,i,c,l,d,u,s,p,m,f,h,C,g,b,N,v="",V=e.length;for(n=0;n
"+Q(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new G,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i
'+(n?e:H(e,!0))+"\n":""+(n?e:H(e,!0))+"\n"},t.blockquote=function(e){return"\n"+e+"\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
"+e+"
\n"},t.table=function(e,t){return t&&(t=""+t+""),""+e+""},t.br=function(){return this.options.xhtml?""+Q(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new U,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i